> ## 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.

# List Link Tokens

> List link-token metadata without returning bearer secrets or consumer contact fields

<RequestExample>
  ```bash cURL theme={null}
  curl --get 'https://api.subtotal.com/link-tokens' \
    --header "X-Api-Key: $SUBTOTAL_API_KEY" \
    --data-urlencode 'customer_id=customer-example-001' \
    --data-urlencode 'status=active'
  ```
</RequestExample>

Authenticate from your backend with `X-Api-Key` or an OAuth access token with `connections:read`. An active client and the `customer_id` query parameter are required. Optionally filter by `active`, `expired`, or `revoked`.

Returns metadata only, with no raw tokens or resource IDs and no pagination. See [token recovery and lifecycle](/docs/subtotal-link/link-tokens#idempotency-and-token-recovery).


## OpenAPI

````yaml get /link-tokens
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers: []
security: []
paths:
  /link-tokens:
    get:
      tags:
        - link_tokens
      summary: List Link Tokens
      description: >-
        List link-token metadata without returning bearer secrets or consumer
        contact fields
      operationId: list_link_tokens_link_tokens_get
      parameters:
        - name: customer_id
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 64
            title: Customer Id
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/LinkTokenStatus'
              - type: 'null'
            title: Status
        - 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
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListLinkTokensResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    LinkTokenStatus:
      type: string
      enum:
        - active
        - expired
        - revoked
      title: LinkTokenStatus
    ListLinkTokensResponse:
      properties:
        link_tokens:
          items:
            $ref: '#/components/schemas/LinkTokenMetadataResponse'
          type: array
          title: Link Tokens
      type: object
      required:
        - link_tokens
      title: ListLinkTokensResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LinkTokenMetadataResponse:
      properties:
        customer_id:
          type: string
          title: Customer Id
        status:
          $ref: '#/components/schemas/LinkTokenStatus'
        created_at:
          type: string
          format: date-time
          title: Created At
        expires_at:
          type: string
          format: date-time
          title: Expires At
        revoked_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Revoked At
      type: object
      required:
        - customer_id
        - status
        - created_at
        - expires_at
        - revoked_at
      title: LinkTokenMetadataResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````