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

# Exchange a token

> Exchange a signed client assertion for a bearer token.



## OpenAPI

````yaml openapi.json POST /token
openapi: 3.1.0
info:
  description: Push purchase orders and invoices into Pascal.
  title: Pascal Custom Source API
  version: '1'
servers:
  - url: https://app.teampascal.com/api/v1/custom-source
security: []
paths:
  /token:
    post:
      tags:
        - Authentication
      summary: Exchange a client assertion for an access token
      description: Exchange a signed client assertion for a bearer token.
      operationId: _token_token_post
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Body__token_token_post'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Bad Request
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Unauthorized
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Too Many Requests
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
          description: Service Unavailable
components:
  schemas:
    Body__token_token_post:
      properties:
        client_assertion:
          title: Client Assertion
          type: string
        client_assertion_type:
          title: Client Assertion Type
          type: string
        grant_type:
          title: Grant Type
          type: string
      required:
        - grant_type
        - client_assertion_type
        - client_assertion
      title: Body__token_token_post
      type: object
    TokenResponse:
      properties:
        access_token:
          title: Access Token
          type: string
        expires_in:
          title: Expires In
          type: integer
        token_type:
          title: Token Type
          type: string
      required:
        - access_token
        - token_type
        - expires_in
      title: TokenResponse
      type: object
    ErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/ErrorBody'
      required:
        - error
      title: ErrorEnvelope
      type: object
    ErrorBody:
      properties:
        code:
          title: Code
          type: string
        details:
          $ref: '#/components/schemas/JsonValue'
        message:
          title: Message
          type: string
      required:
        - code
        - message
      title: ErrorBody
      type: object
    JsonValue: {}

````