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

# Create Token

> Generate a JWT token for a specific thread. The JWT can be used to authenticate subsequent requests scoped to this thread, such as WebSocket connections and message retrieval.



## OpenAPI

````yaml /api-reference/openapi.json post /threads/{thread_id}/token
openapi: 3.1.0
info:
  title: Puppeteer Core API
  description: >-
    Core API for the Puppeteer AI platform. Manages domain models,
    conversations, voice calls, simulations, and integrations.


    [Documentation](https://docs.puppeteerai.com)
  version: 1.0.0
servers:
  - url: https://api.puppeteerai.com
    description: Production
security: []
tags:
  - name: Auth
    description: JWT token generation and organization creation.
  - name: Messages
    description: >-
      Send and receive messages, retrieve conversation history, search, and
      create messages in threads.
  - name: Threads
    description: Create and manage threads, aliases, scheduled events, and bulk operations.
  - name: Voice
    description: Voice call handling, scheduling, batch calls, and WebSocket LLM.
paths:
  /threads/{thread_id}/token:
    post:
      tags:
        - Auth
      summary: Create Token
      description: >-
        Generate a JWT token for a specific thread. The JWT can be used to
        authenticate subsequent requests scoped to this thread, such as
        WebSocket connections and message retrieval.
      operationId: create_token_threads__thread_id__token_post
      parameters:
        - name: thread_id
          in: path
          required: true
          schema:
            type: string
            title: Thread Id
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            description: API key for your Puppeteer organization.
            title: Authorization
          description: API key for your Puppeteer organization.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TokenResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TokenResponse:
      properties:
        access_token:
          type: string
          title: Access Token
          description: The generated JWT token.
      type: object
      required:
        - access_token
      title: TokenResponse
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````