---
title: "Create User Token"
method: POST
path: "/user/me/tokens"
tags: ["Tokens"]
---

# Create User Token

`POST /user/me/tokens`

## Request

- Base URL: `http://localhost:8000`
- URL: `http://localhost:8000/user/me/tokens`
- Auth: HTTP bearer

Create a new PAT. The plaintext token is returned once.

## Headers

- `API-Version` '1'

## Request body

- PATCreateRequest
  - `name` string, required: User-chosen label, e.g. 'My Cursor agent'
  - `scopes` string[], required: Scopes to grant, e.g. ['carts:write','bookings:read']
  - `expires_at` string, date-time, nullable: Optional expiry; null means never

## Response `201`

Successful Response

- PATCreateResponse: Returned once at creation — the only time the plaintext secret is visible.
  - `id` integer, required
  - `name` string, required
  - `scopes` string[], required
  - `token` string, required: Plaintext token — store securely, shown only once
  - `expires_at` string, date-time, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/totalparks/apis/total-parks-public-api.md) · [All operations](https://skmtc.dev/totalparks/apis/total-parks-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/totalparks/apis/total-parks-public-api/revisions/dcb4c822e2c6?raw)
