---
title: "Auth Token Create"
method: POST
path: "/api/v1.auth-token.create"
tags: ["Auth Tokens"]
---

# Auth Token Create

`POST /api/v1.auth-token.create`

Create Auth Token

## Request body

- AuthTokenCreateIn
  - `namespace` string, nullable
  - `name` string, required
  - `prefix` string
  - `suffix` string, nullable
  - `expiry_ms` integer, nullable — Milliseconds from now until the token expires.
  - `metadata` object
  - `owner_id` string, required
  - `scopes` string[]
  - `enabled` boolean — Whether the token is enabled. Defaults to `true`.

## Response `200`

- AuthTokenCreateOut
  - `id` string, required
  - `created` string, date-time, required
  - `updated` string, date-time, required
  - `token` string, required

## Other responses

- `400`
- `401`
- `403`
- `422`

## Changes

- **2026-03-31** `cb1523fc3cdd` — 1 warning
  - the `expiry_ms` request property's min was set to `0.00`
- **2026-03-31** `f62be26d2a53` — 8 breaking, 4 warning, 2 info
  - the `created` response's property type/format changed from `integer`/`uint64` to `string`/`date-time` for status `200`
  - the `detail` response's property type/format changed from `string`/`` to `array`/`` for status `422`
  - the `updated` response's property type/format changed from `integer`/`uint64` to `string`/`date-time` for status `200`
  - removed the required property `code` from the response with the `422` status
  - …10 more

[Change history](https://skmtc.dev/svix/apis/diom-api/changes/api/v1.auth-token.create/post.md)

---

[API](https://skmtc.dev/svix/apis/diom-api.md) · [All operations](https://skmtc.dev/svix/apis/diom-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/svix/diom-api/revisions/4bfee3499c4c/schema)
