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

# Grant consent

> Called from the consent UI after the user approves the requested scopes. Returns the authorization code.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/ucp/identity/authorize/consent
openapi: 3.1.0
info:
  title: Sly API
  description: >-
    The Agentic Economy Platform — stablecoin payments, agent wallets,
    multi-protocol commerce, and AI agent orchestration.
  version: 1.0.0
  contact:
    name: Sly
    url: https://getsly.ai
    email: support@getsly.ai
servers:
  - url: https://api.getsly.ai/v1
    description: Production
  - url: https://sandbox.getsly.ai/v1
    description: Sandbox
security:
  - bearerAuth: []
paths:
  /v1/ucp/identity/authorize/consent:
    post:
      tags:
        - UCP Identity
      summary: Grant consent
      description: >-
        Called from the consent UI after the user approves the requested scopes.
        Returns the authorization code.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                authorization_request_id:
                  type: string
                approved_scopes:
                  type: array
                  items:
                    type: string
                account_id:
                  type: string
                  format: uuid
              required:
                - authorization_request_id
                - approved_scopes
                - account_id
      responses:
        '200':
          description: Consent granted
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                  redirect_uri:
                    type: string
                    format: uri
                  state:
                    type: string
                required:
                  - code
                  - redirect_uri
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key (pk_test_* or pk_live_*), JWT session, agent token (agent_*),
        Ed25519 session (sess_*), or portal token (portal_*).

````