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

# Create Connection Token

> Request a new connection token



## OpenAPI

````yaml post /connections/{connection_id}/token
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /connections/{connection_id}/token:
    post:
      tags:
        - connection
      summary: Create Connection Token
      description: Request a new connection token
      operationId: create_connection_token_connections__connection_id__token_post
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            description: A unique identifier for the connection
            title: Connection Id
          description: A unique identifier for the connection
        - name: authorization
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - name: x-api-key
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Api-Key
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateTokenRequest'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionTokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CreateTokenRequest:
      properties:
        scope:
          type: string
          enum:
            - access
          description: The intended scope of the token to be generated
          examples:
            - access
      type: object
      required:
        - scope
      title: CreateTokenRequest
    ConnectionTokenResponse:
      properties:
        connection_token:
          type: string
          title: Connection Token
          description: The generated connection token
          examples:
            - eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
      type: object
      required:
        - connection_token
      title: ConnectionTokenResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````