---
title: "Create Api Token"
method: POST
path: "/api/my/tokens"
---

# Create Api Token

`POST /api/my/tokens`

## Request

- Base URL: `https://api.drillflow.de` (the document declares no server; this is the origin it was published from)
- URL: `https://api.drillflow.de/api/my/tokens`
- Auth: none declared

## Request body

- ApiTokenCreate: Mint a long-lived token for an agent (C2). Pro, and cookie-only.
  - `label` string, required
  - `expires_in_days` integer, nullable

## Response `201`

Successful Response

- ApiTokenCreated: The only response that ever carries the raw token — it is not stored, only its sha256 is, so this is the user's single chance to copy it.
  - `id` integer, required
  - `label` string, required
  - `hint` string, required
  - `created_at` integer, required
  - `last_used_at` integer, nullable
  - `expires_at` integer, nullable
  - `token` string, required

## Other responses

- `422`: Validation Error

---

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