---
title: "Create API key"
method: POST
path: "/public/v1/accounts/tokens/"
tags: ["API Keys"]
---

# Create API key

`POST /public/v1/accounts/tokens/`

## Request

- Base URL: `https://api-dashboard.influencers.club`
- URL: `https://api-dashboard.influencers.club/public/v1/accounts/tokens/`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/influencers/apis/core-api-concepts/docs/public/v1/accounts/tokens/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new API key. The token value is included in the response.

## Request body

- TokenCreateRequest
  - `name` string: Human-readable label for the token, shown in the token list. May be blank.
  - `scopes` string[]: Scopes to grant the token. Available value: `all`. Defaults to `all` if omitted.

## Response `201`

- Token
  - `id` integer, required: Unique identifier for the API key token.
  - `name` string, required: Human-readable label for the token.
  - `scopes` string[], required: Scopes granted to the token.
  - `active` boolean, required: Whether the token is currently active.
  - `expires_at` string, date-time, nullable: Expiration timestamp, or null if the token never expires.
  - `token` string: The API key value used as the Bearer credential. Returned in full on every read.
  - `created_at` string, date-time, required: When the token was created.
  - `last_used_at` string, date-time, nullable: When the token was last used to authenticate a request, or null if never used.

## Other responses

- `400`: Validation error
- `401`: Unauthorized — missing or invalid API key.
- `403`: Forbidden — caller is not permitted to perform this action.
- `422`: Unprocessable entity — validation failed.
- `429`: Too Many Requests — rate or capacity limit exceeded. Inspect the `Retry-After` header and the `retry_after` body field for the wait time in seconds.

## Changes

- **2026-08-18** `87e654ac822e`: 3 info
  - added the media type `application/json` for the response with the status `400`
  - added the non-success response with the status `403`
  - added the non-success response with the status `429`

[Operation history](https://skmtc.dev/influencers/apis/core-api-concepts/changes/public/v1/accounts/tokens/post.md)

---

[API](https://skmtc.dev/influencers/apis/core-api-concepts.md) - [All operations](https://skmtc.dev/influencers/apis/core-api-concepts/llms.txt) - [OpenAPI document](https://skmtc.dev/influencers/apis/core-api-concepts/revisions/11c76bf81bec?raw)
