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

# POST /api/v1/token/exchange

> Validates your `aon_live_...` API key and mints a 5-minute (`300s`), domain-scoped RS256 JWT bound to the requested `audience` hostname.



## OpenAPI

````yaml POST /api/v1/token/exchange
openapi: 3.1.0
info:
  title: AgentOnboard Identity API
  version: 1.0.0
  description: >-
    Public HTTP endpoints for minting 5-minute domain-scoped RS256 agent tokens,
    inspecting API key ownership, and fetching public JWKS signing keys.
servers:
  - url: https://agentonboard.xyz
    description: Production Identity Engine
security: []
paths:
  /api/v1/token/exchange:
    post:
      summary: Exchange API Key for 5-Minute JWT
      description: >-
        Validates your `aon_live_...` API key and mints a 5-minute (`300s`),
        domain-scoped RS256 JWT bound to the requested `audience` hostname.
      operationId: exchangeToken
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - audience
              properties:
                audience:
                  type: string
                  description: >-
                    Target service hostname or URL (normalized to a bare
                    lowercase hostname such as `notes.com`).
                  example: notes.com
      responses:
        '200':
          description: Signed 5-minute RS256 JWT.
          content:
            application/json:
              schema:
                type: object
                required:
                  - token
                  - token_type
                  - expires_in
                  - expires_at
                  - audience
                  - user
                properties:
                  token:
                    type: string
                    description: Raw signed RS256 JWT string.
                    example: >-
                      eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImFvbl8yMDI2X3YxIn0...
                  token_type:
                    type: string
                    enum:
                      - Bearer
                    example: Bearer
                  expires_in:
                    type: integer
                    description: Token lifetime in seconds (always 300).
                    example: 300
                  expires_at:
                    type: integer
                    description: Unix epoch timestamp (seconds) when the token expires.
                    example: 1740000300
                  audience:
                    type: string
                    description: Normalized target hostname encoded in the `aud` claim.
                    example: notes.com
                  user:
                    type: object
                    required:
                      - email
                    properties:
                      email:
                        type: string
                        example: ada@example.com
        '400':
          description: Missing or invalid `audience` parameter.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: missing_audience
                  message:
                    type: string
                    example: Field 'audience' (or 'domain') is required in request body
        '401':
          description: Missing, invalid, or revoked API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: invalid_api_key
                  message:
                    type: string
                    example: Invalid or nonexistent API key
        '500':
          description: Internal server error.
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Your AgentOnboard API key (`aon_live_...`), created on
        https://agentonboard.xyz/dashboard.

````

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