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

# Resolve an approval request

> Approve or deny a pending approval request. If approved, the gateway resumes the full task pipeline (stages 2–8: credit debit → compute → IPFS → fingerprint → receipt). If denied, the task is marked FAILED and no credits are consumed. Both JWT and API key authentication are supported — enabling programmatic resolution from SDKs and scripts without the dashboard.



## OpenAPI

````yaml PATCH /api/v1/approvals/{id}
openapi: 3.0.0
info:
  title: AgentChain & PRIOR API
  description: The centralized gateway for the decentralized compute network.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.agentchain.xyz
    description: Production
security: []
tags: []
paths:
  /api/v1/approvals/{id}:
    patch:
      tags:
        - Approval Queue
      summary: Resolve an approval request
      description: >-
        Approve or deny a pending approval request. If approved, the gateway
        resumes the full task pipeline (stages 2–8: credit debit → compute →
        IPFS → fingerprint → receipt). If denied, the task is marked FAILED and
        no credits are consumed. Both JWT and API key authentication are
        supported — enabling programmatic resolution from SDKs and scripts
        without the dashboard.
      operationId: ApprovalController_resolve
      parameters:
        - name: id
          required: true
          in: path
          description: Approval request ID
          schema:
            type: string
      requestBody:
        required: true
        description: Resolution payload
        content:
          application/json:
            schema:
              type: object
              required:
                - decision
              properties:
                decision:
                  type: string
                  enum:
                    - approved
                    - denied
                  description: Approval decision
                note:
                  type: string
                  description: >-
                    Optional note explaining the decision (e.g. "Verified
                    invoice with finance team")
      responses:
        '200':
          description: Approval resolved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  decision:
                    type: string
                    enum:
                      - approved
                      - denied
                  taskId:
                    type: string
                  receipt:
                    type: object
                    description: Full task receipt (only present when approved)
        '400':
          description: Invalid decision value
        '403':
          description: Not your approval request
        '404':
          description: Approval request not found
      security:
        - x-api-key: []
        - bearer: []
components:
  securitySchemes:
    x-api-key:
      type: apiKey
      in: header
      name: x-api-key
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````