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

# Approve or decline a proposal

> Approves or declines something Ask proposed. Approve only after the user agrees in your app. Sending the same decision again returns the proposal unchanged; the opposite decision on a settled proposal returns 409.



## OpenAPI

````yaml /partner-openapi.gen.json post /partner/v0.1/proposals/{proposal_id}
openapi: 3.1.0
info:
  title: Circuit partner API
  version: '0.1'
servers:
  - url: https://api.circuit.org
security: []
paths:
  /partner/v0.1/proposals/{proposal_id}:
    post:
      summary: Approve or decline a proposal
      description: >-
        Approves or declines something Ask proposed. Approve only after the user
        agrees in your app. Sending the same decision again returns the proposal
        unchanged; the opposite decision on a settled proposal returns 409.
      operationId: decide
      parameters:
        - name: proposal_id
          in: path
          required: true
          example: prop_cd968859-fe26-4c0a-953e-34a3ab68171b
          schema:
            type: string
            examples:
              - prop_cd968859-fe26-4c0a-953e-34a3ab68171b
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                decision:
                  $ref: '#/components/schemas/Decision'
                  description: Send `approve` only after the user agreed in your app.
                  examples:
                    - approve
              additionalProperties: false
              required:
                - decision
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                description: >-
                  Something Ask proposed, such as a trade or an agent start,
                  that waits for your approval.
                type: object
                properties:
                  id:
                    description: The proposal's id, starting with `prop_`.
                    type: string
                  title:
                    description: >-
                      What it does, starting with a verb, such as "Buy 0.04 ETH
                      on Lighter" or "Start Macro Trend".
                    type: string
                  status:
                    $ref: '#/components/schemas/PartnerProposalStatus'
                  error:
                    description: Why it failed when `status` is `failed`. Null otherwise.
                    type:
                      - string
                      - 'null'
                  session:
                    description: >-
                      The session it started or changed, starting with `ses_`.
                      Null for trades.
                    type:
                      - string
                      - 'null'
                required:
                  - id
                  - title
                  - status
        default:
          description: Failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerFailure'
      security:
        - permit: []
components:
  schemas:
    Decision:
      oneOf:
        - description: Carry the proposal out.
          type: string
          const: approve
        - description: Drop the proposal.
          type: string
          const: decline
    PartnerProposalStatus:
      oneOf:
        - description: Waiting for you to approve or decline it.
          type: string
          const: review
        - description: Approved, and Circuit is carrying it out.
          type: string
          const: processing
        - description: Carried out.
          type: string
          const: done
        - description: Declined, or it expired before anyone approved it.
          type: string
          const: declined
        - description: It could not be carried out. `error` says why.
          type: string
          const: failed
    PartnerFailure:
      description: >-
        A failed call. Handle it by HTTP status and `code`, and show `error` to
        the user.
      type: object
      properties:
        error:
          description: A message you can show the user.
          type: string
        code:
          description: >-
            A stable code such as `BAD_REQUEST`, `NOT_FOUND`, `CONFLICT` or
            `UNAUTHORIZED`. New codes can appear.
          type: string
      required:
        - error
        - code
  securitySchemes:
    permit:
      description: The permit the user approved for your app.
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.