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

# Create an identity transfer token

> Creates a new identity transfer token, which can be exchanged for a customer access token.



## OpenAPI

````yaml /api/customer-accounts/openapi.json post /identity_transfer
openapi: 3.0.0
info:
  title: Customer Accounts API
  description: >-
    Customer Accounts API is responsible for the authentication and
    authorization processes of customers in Text.
  version: 2.0.0
servers:
  - url: https://accounts.livechat.com/v2/customer
    description: Main production server URL
security: []
paths:
  /identity_transfer:
    post:
      tags:
        - Tokens
      summary: Create an identity transfer token
      description: >-
        Creates a new identity transfer token, which can be exchanged for a
        customer access token.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - bearer_type
                - client_id
              properties:
                bearer_type:
                  type: string
                  enum:
                    - agent
                    - customer
                  description: |-
                    The authorization token type.
                    - `agent` — use with an OAuth2 Agent Bearer Token.
                    - `customer` — use with an OAuth2 Bearer Token.
                customer_id:
                  type: string
                  format: uuid
                  description: >-
                    The customer ID for which the identity transfer token is
                    being issued. The customer must already exist. Required only
                    if `bearer_type=agent`.
                client_id:
                  type: string
                  format: hex
                  description: The client ID for which the token is being issued.
                code_challenge:
                  type: string
                  description: >-
                    A code challenge, as in the OAuth2 [PKCE
                    flow](/authentication/oauth-authorization#pkce-extension).
      responses:
        '200':
          description: 'OK: returns identity transfer token details.'
          content:
            application/json:
              schema:
                description: Identity transfer token
                type: object
                properties:
                  identity_transfer_token:
                    type: string
                    description: The identity transfer token value.
                  expires_in:
                    type: integer
                    format: uint64
                    description: The identity transfer token lifetime, in seconds.
        '401':
          description: Unauthorized, missing or invalid authorization
          content:
            application/json:
              schema:
                description: Default error object
                type: object
                properties:
                  oauth_exception:
                    type: string
                    enum:
                      - bad_request
                      - invalid_request
                      - unauthorized_client
                      - access_denied
                      - server_error
                      - temporarily_unavailable
                      - unsupported_grant_type
                      - invalid_grant
                      - invalid_client
                      - forbidden
                      - conflict
                      - resource_not_found
                    description: The OAuth 2.0 error code.
                  exception_description:
                    type: string
                    description: A human-readable description of the error.
        '500':
          description: Server Error
      security:
        - OAuth2 Bearer Token: []
        - OAuth2 Agent Bearer Token: []
components:
  securitySchemes:
    OAuth2 Bearer Token:
      description: This API uses OAuth2 tokens.
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com/v2/customer
          scopes: {}
    OAuth2 Agent Bearer Token:
      description: This API uses OAuth2 for agents with the Implicit grant flow.
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://accounts.livechat.com
          scopes: {}
        authorizationCode:
          authorizationUrl: https://accounts.livechat.com
          tokenUrl: https://accounts.livechat.com/token
          scopes: {}

````