---
title: "Create a New Authentication Token"
method: POST
path: "/v1/tokens"
tags: ["Tokens"]
---

# Create a New Authentication Token

`POST /v1/tokens`

## Request body

- Token
  - `id` string
  - `created_at` integer
  - `updated_at` integer
  - `last_login` string
  - `api_access` 'disabled' | 'enabled' — Enable/disable API access. If disabled, it can only be used to open tunnel connections or forward webhooks but not change any existing configuration
  - `description` string
  - `scopes` TokenScopes
    - `tunnels` string[]
    - `buckets` string[]

## Response `201`

Create a new token

- TokenCreateResponse
  - `key` string — Token key, this is an alias to token ID
  - `secret` string — This is the only time secret is revealed as it is already encrypted by the system

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.dev/webhookrelay/apis/webhook-relay.md) · [All operations](https://skmtc.dev/webhookrelay/apis/webhook-relay/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/webhookrelay/webhook-relay/revisions/ce8fd4d3cf19/schema)
