---
title: "Create a new personal access token"
method: POST
path: "/publishers/{publisherId}/tokens"
tags: ["Token Management"]
---

# Create a new personal access token

`POST /publishers/{publisherId}/tokens`

## Request

- Base URL: `https://api.comfy.org`
- URL: `https://api.comfy.org/publishers/{publisherId}/tokens`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/comfy-org/apis/comfy-api/docs/publishers/:publisherId/tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `publisherId` string, required

## Request body

- PersonalAccessToken
  - `id` string, uuid: Unique identifier for the GitCommit
  - `name` string: Required. The name of the token. Can be a simple description.
  - `description` string: Optional. A more detailed description of the token's intended use.
  - `createdAt` string, date-time: [Output Only]The date and time the token was created.
  - `token` string: [Output Only]. The personal access token. Only returned during creation.

## Response `201`

Token created successfully

- object
  - `token` string: The newly created personal access token.

## Other responses

- `400`: Bad request, invalid input data.
- `403`: Forbidden
- `500`: Internal server error

---

[API](https://skmtc.dev/comfy-org/apis/comfy-api.md) - [All operations](https://skmtc.dev/comfy-org/apis/comfy-api/llms.txt) - [OpenAPI document](https://skmtc.dev/comfy-org/apis/comfy-api/revisions/fb3c490f87ef?raw)
