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

# Approve OAuth authorization



## OpenAPI

````yaml /openapi.json post /oauth/authorize
openapi: 3.1.0
info:
  title: Peel API
  version: '2026-03-21'
  description: >-
    Public Peel API for creating APIs from URLs, inspecting them, calling
    generated endpoints, revising builds, and exporting OpenAPI or MCP
    definitions.
servers:
  - url: https://api.peel.sh
security: []
tags:
  - name: APIs
    description: Create, list, inspect, revise, rebuild, and export APIs.
  - name: Account
    description: Credits and account usage surfaces used by CLI, REST, and MCP clients.
  - name: Device Auth
    description: CLI browser-login device flow helpers.
  - name: Endpoint Execution
    description: Execute generated endpoints through a stable API resource.
  - name: OAuth
    description: OAuth discovery and token flows for hosted MCP clients.
  - name: MCP
    description: Hosted MCP transport and discovery surface.
paths:
  /oauth/authorize:
    post:
      tags:
        - OAuth
      summary: Approve OAuth authorization
      operationId: authorizeOAuthPublicPost
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - client_id
                - code_challenge
                - redirect_uri
              properties:
                client_id:
                  type: string
                code_challenge:
                  type: string
                code_challenge_method:
                  type: string
                  default: S256
                csrf_token:
                  type: string
                redirect_uri:
                  type: string
                  format: uri
                scope:
                  type: string
                state:
                  type: string
              additionalProperties: true
      responses:
        '302':
          description: Redirects back to the client with an authorization code.
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
components:
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
            additionalProperties: true
    Unauthorized:
      description: Missing or invalid auth.
      headers:
        WWW-Authenticate:
          schema:
            type: string
          description: OAuth bearer challenge with MCP resource metadata when available.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
            additionalProperties: true

````