---
title: "Create Token"
method: POST
path: "/threads/{thread_id}/token"
tags: ["Auth"]
---

# Create Token

`POST /threads/{thread_id}/token`

## Request

- Base URL: `https://api.puppeteerai.com`
- URL: `https://api.puppeteerai.com/threads/{thread_id}/token`
- Auth: none declared. Required headers: `Authorization`

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.

## Path parameters

- `thread_id` string, required

## Headers

- `Authorization` string, required: API key for your Puppeteer organization.

## Response `200`

Successful Response

- TokenResponse
  - `access_token` string, required: The generated JWT token.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api.md) - [All operations](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getpuppeteer/apis/puppeteer-core-api/revisions/94b4e928b42f?raw)
