---
title: "Create Token"
method: POST
path: "/v1/agent-tokens"
tags: ["agent-tokens"]
---

# Create Token

`POST /v1/agent-tokens`

## Request

- Base URL: `https://api.cybret.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.cybret.ai/v1/agent-tokens`
- Auth: HTTP bearer

## Request body

- CreateAgentTokenRequest: Mint body. Omitted scopes are findings:read only. Write is opt-in.
  - `label` string, required
  - `scopes` string[]
  - `expires_at` string, date-time, nullable

## Response `201`

Successful Response

- CreatedAgentToken: One-time create response. ``token`` is returned once.
  - `token_id` string, required
  - `label` string, required
  - `token_prefix` string, nullable
  - `scopes` string[], required
  - `created_at` string, date-time, required
  - `last_used_at` string, date-time, nullable
  - `expires_at` string, date-time, nullable
  - `token` string, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/cybret/apis/api-scanner-control-plane.md) · [All operations](https://skmtc.dev/cybret/apis/api-scanner-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/cybret/apis/api-scanner-control-plane/revisions/4c9b522246af?raw)
