---
title: "Create an API token"
method: POST
path: "/tokens"
tags: ["authentication"]
---

# Create an API token

`POST /tokens`

OAuth2 Client Credentials grant. Returns a Bearer access token.

**Regular clients:** token is scoped to the client's account — no additional parameters needed.

**Super-user clients** (account_id 10000): two options:
- Pass `account_guid` in the request body to receive a token scoped to that specific campaign account.
- Omit `account_guid` to receive an unscoped super-user token (`scope: super`). All subsequent requests using this token must include an `X-Account-GUID` header with the target campaign account GUID.

## Request body

- TokenCreateBody
  - `grant_type` 'client_credentials', required — Must be 'client_credentials'
  - `client_id` string, required — OAuth2 client_id
  - `client_secret` string, required — OAuth2 client_secret
  - `account_guid` string — Super-user clients only: campaign account GUID to scope this token to. Omit to receive an unscoped super-user token that requires X-Account-GUID on every request.

## Response `200`

Token created successfully

## Other responses

- `400` — Bad request — missing or invalid fields
- `401` — Unauthorized — invalid credentials

---

[API](https://skmtc.net/rasa/apis/rasa-io-api.md) · [All operations](https://skmtc.net/rasa/apis/rasa-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rasa/rasa-io-api/revisions/60891bc551db/schema)
