> ## Documentation Index
> Fetch the complete documentation index at: https://t3sa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Approve proposal

> Draft: specification in progress. Endpoints and fields may change.

Approves the proposal and releases the unsigned transactions to the custodian.
Approval does not move funds. `Idempotency-Key` is required. Scope: `admin`.


<Warning>Draft: specification in progress. Endpoints and fields may change.</Warning>


## OpenAPI

````yaml /en/api/openapi.yaml post /propostas/{id}/aprovar
openapi: 3.1.0
info:
  title: TESA API
  version: 0.1.0-rascunho
  description: >
    **Draft: specification in progress. Endpoints and fields may change.**


    TESA's B2B treasury infrastructure API. USDC comes in through Circle's CCTP

    (Ethereum and Solana) and is allocated to tokenized Treasuries (USDY and
    BUIDL).

    The API is non-custodial: it never receives a private key or a signed
    transaction.

    It returns unsigned transactions and approval requests, and the signer is
    the

    company or its custodian.


    Resource paths, field names, event names and error codes are in Portuguese
    by

    design. Amounts are USDC decimal strings with two decimal places, dates are
    ISO

    8601 UTC and lists use cursor pagination (`limite` and `apos`). All example

    values are illustrative.
  contact:
    name: TESA
    email: contact@t3sa.com
    url: https://t3sa.com
servers:
  - url: https://api.t3sa.com/v1
    description: Production (proposed URL, not live yet)
  - url: https://sandbox.api.t3sa.com/v1
    description: Sandbox (proposed URL, not live yet)
security:
  - bearerAuth: []
tags:
  - name: Organization
    description: The client company, owner of all keys and resources.
  - name: Wallets
    description: >-
      Company wallets linked by public address. No key ever passes through the
      API.
  - name: Positions
    description: A snapshot of the cash position, the same as in the dashboard.
  - name: Allocation policy
    description: Assets approved by the company and the proportion between them.
  - name: Proposals
    description: >-
      Every allocation movement starts as a proposal and only executes with
      approval.
  - name: Redemptions
    description: Return of USDC balance to a linked company wallet.
  - name: Records
    description: On-chain audit trail, with the hash of each transaction.
  - name: Yield and charges
    description: Yield calculated per period and the fee charged on it.
  - name: Webhooks
    description: Destinations that receive TESA events.
paths:
  /propostas/{id}/aprovar:
    post:
      tags:
        - Proposals
      summary: Approve proposal
      description: >
        Draft: specification in progress. Endpoints and fields may change.


        Approves the proposal and releases the unsigned transactions to the
        custodian.

        Approval does not move funds. `Idempotency-Key` is required. Scope:
        `admin`.
      operationId: aprovarProposta
      parameters:
        - $ref: '#/components/parameters/IdProposta'
        - $ref: '#/components/parameters/IdempotencyKeyObrigatorio'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Decisao'
      responses:
        '200':
          description: Proposal approved, with transactions awaiting signature.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Proposta'
              example:
                id: prop_8f2a1c
                tipo: rebalanceamento
                status: aprovada
                origem: tesa
                motivo: Spread de taxa entre BUIDL e USDY acima do limite da política
                movimentos:
                  - de: USDY
                    para: BUIDL
                    valor: '42105.50'
                alocacao_resultante:
                  - ativo: USDY
                    valor: '463160.50'
                    percentual: 55
                  - ativo: BUIDL
                    valor: '378949.50'
                    percentual: 45
                transacoes:
                  - id: tx_01
                    rede: ethereum
                    carteira_id: cart_3k9d
                    status: aguardando_assinatura
                    payload_nao_assinado: 0x02f8...
                    tx_hash: null
                criada_em: '2026-09-01T09:30:00Z'
                decidida_em: '2026-09-01T12:00:00Z'
                executada_em: null
        '401':
          $ref: '#/components/responses/NaoAutenticado'
        '403':
          $ref: '#/components/responses/SemPermissao'
        '404':
          $ref: '#/components/responses/NaoEncontrado'
        '409':
          $ref: '#/components/responses/Conflito'
      security:
        - bearerAuth: []
        - bearerAuth: []
          tesaTimestamp: []
          tesaSignature: []
components:
  parameters:
    IdProposta:
      name: id
      in: path
      required: true
      description: Proposal identifier, prefixed with `prop_`.
      schema:
        type: string
        examples:
          - prop_8f2a1c
    IdempotencyKeyObrigatorio:
      name: Idempotency-Key
      in: header
      required: true
      description: >-
        Required for this operation. A network failure must not create two
        operations.
      schema:
        type: string
        format: uuid
  schemas:
    Decisao:
      type: object
      properties:
        comentario:
          type: string
          examples:
            - Aprovado pela tesouraria
    Proposta:
      type: object
      properties:
        id:
          type: string
          examples:
            - prop_8f2a1c
        tipo:
          type: string
          enum:
            - alocacao
            - rebalanceamento
        status:
          type: string
          enum:
            - pendente
            - aprovada
            - rejeitada
            - executada
        origem:
          type: string
          enum:
            - tesa
            - cliente
        motivo:
          type: string
        movimentos:
          type: array
          items:
            $ref: '#/components/schemas/Movimento'
        alocacao_resultante:
          type: array
          items:
            $ref: '#/components/schemas/AtivoValor'
        transacoes:
          type: array
          description: Available from the `aprovada` status onward.
          items:
            $ref: '#/components/schemas/Transacao'
        criada_em:
          type: string
          format: date-time
        decidida_em:
          type:
            - string
            - 'null'
          format: date-time
        executada_em:
          type:
            - string
            - 'null'
          format: date-time
    Movimento:
      type: object
      properties:
        de:
          $ref: '#/components/schemas/Ativo'
        para:
          $ref: '#/components/schemas/Ativo'
        valor:
          $ref: '#/components/schemas/Valor'
    AtivoValor:
      type: object
      properties:
        ativo:
          $ref: '#/components/schemas/Ativo'
        valor:
          $ref: '#/components/schemas/Valor'
        percentual:
          type: number
          examples:
            - 60
    Transacao:
      type: object
      description: Unsigned transaction, delivered to the company's custodian for signing.
      properties:
        id:
          type: string
          examples:
            - tx_01
        rede:
          $ref: '#/components/schemas/Rede'
        carteira_id:
          type: string
        status:
          type: string
          enum:
            - aguardando_assinatura
            - transmitida
            - confirmada
            - falhou
        payload_nao_assinado:
          type: string
          examples:
            - 0x02f8...
        tx_hash:
          type:
            - string
            - 'null'
    Erro:
      type: object
      properties:
        erro:
          type: object
          properties:
            codigo:
              type: string
              examples:
                - saldo_insuficiente
            mensagem:
              type: string
            campo:
              type:
                - string
                - 'null'
            requisicao_id:
              type: string
              examples:
                - req_9d8c7b
    Ativo:
      type: string
      enum:
        - USDY
        - BUIDL
    Valor:
      type: string
      pattern: ^\d+\.\d{2}$
      description: USDC amount, a decimal string with two decimal places.
      examples:
        - '842110.00'
    Rede:
      type: string
      enum:
        - ethereum
        - solana
  responses:
    NaoAutenticado:
      description: Missing, invalid or revoked key, or invalid HMAC signature.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Erro'
    SemPermissao:
      description: Insufficient scope or IP outside the allowlist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Erro'
    NaoEncontrado:
      description: Resource does not exist or belongs to another organization.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Erro'
    Conflito:
      description: Idempotency conflict or action incompatible with the current status.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Erro'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The organization's API key (`tesa_live_...` in production,
        `tesa_test_...` in the sandbox).
    tesaTimestamp:
      type: apiKey
      in: header
      name: Tesa-Timestamp
      description: >-
        Optional in the current proposal. Request time in Unix seconds, used in
        the HMAC signature.
    tesaSignature:
      type: apiKey
      in: header
      name: Tesa-Signature
      description: >-
        Optional in the current proposal. Hex-encoded HMAC-SHA256 of the
        canonical message (timestamp, method, path and raw body).

````