---
title: "Create Personal Access Token"
method: POST
path: "/pats"
tags: ["Personal Access Tokens (PATs)"]
---

# Create Personal Access Token

`POST /pats`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/pats`
- Auth: one of:
  - API key in header `pxtoken`
  - OAuth 2 (implicit, authorization URL `https://api.carbonvoice.app/oauth/authorize`)

Creates a new Personal Access Token (PAT) for the current user. The full secret is only returned once in this response and will never be shown again. Both human users and agent users may call this endpoint; PATs are always scoped to the calling user.

## Request body

- CreatePatRequest
  - `name` string: Human-readable name for this Personal Access Token
  - `scopes` string[]: Scopes granted to this PAT. Defaults to cv:read and cv:write if omitted.
  - `expires_in_seconds` number: Optional time-to-live in seconds. Defaults to 1 year if omitted. Maximum 2 years.

## Response `201`

- CreatedPatResponse
  - `id` string, required
  - `name` string
  - `scopes` string[], required
  - `created_at` string, date-time, required
  - `expires_at` string, date-time
  - `revoked_at` string, date-time
  - `last_used_at` string, date-time
  - `display_token` string, required: Masked preview of the PAT. The full secret is only returned once at creation time.
  - `pat` string, required: Full PAT secret. This value is only returned once on creation and will never be shown again.

---

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