---
title: "👤 Create a new Personal Access Token for the calling user and the specified account."
method: POST
path: "/token/create"
tags: ["security", "default"]
---

# 👤 Create a new Personal Access Token for the calling user and the specified account.

`POST /token/create`

## Request

- Base URL: `{{ server_url }}/v1`
- URL: `{{ server_url }}/v1/token/create`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/athenian/apis/title/docs/token/create/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- CreateTokenRequest: Request body of `/token/create` - creating a new Personal Access Token.
  - `account` integer, required: Account ID.
  - `name` string, required

## Response `200`

Value and ID of the generated Personal Access Token.

- CreatedToken: Value and ID of the generated Personal Access Token.
  - `id` integer, required: Token identifier - can be used in `/token/{id}` DELETE.
  - `token` string, required: Secret token - not stored server-side!

## Other responses

- `404`: The user does not belong to the specified account or no such account exists.
- `409`: There is another token with the same name belonging to the user in the account.

---

[API](https://skmtc.dev/athenian/apis/title.md) - [All operations](https://skmtc.dev/athenian/apis/title/llms.txt) - [OpenAPI document](https://skmtc.dev/athenian/apis/title/revisions/110c9f7cffdd?raw)
