---
title: "Create Api Token"
method: POST
path: "/v1/accounts/{account_id}/api-tokens"
---

# Create Api Token

`POST /v1/accounts/{account_id}/api-tokens`

## Request

- Base URL: `https://api.portveil.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.portveil.com/v1/accounts/{account_id}/api-tokens`
- Auth: none declared

Mint a scoped agent token. Requires the account token itself — agent
tokens can never mint new tokens. Plaintext is shown once.

## Path parameters

- `account_id` string, required

## Headers

- `authorization` string, nullable

## Request body

- ApiTokenCreate
  - `name` string, required
  - `scopes` string[], required
  - `device_id` string, nullable

## Response `201`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/portveil/apis/portveil-control-plane.md) · [All operations](https://skmtc.dev/portveil/apis/portveil-control-plane/llms.txt) · [OpenAPI document](https://skmtc.dev/portveil/apis/portveil-control-plane/revisions/48ad5689e525?raw)
