---
title: "Create a single access token"
method: POST
path: "/admin/accesstokens/create"
tags: ["Internal", "Admin"]
---

# Create a single access token

`POST /admin/accesstokens/create`

## Request body

- object
  - `name` string
  - `scopes` string[]

## Response `200`

The new external API user

- ExternalAPIUser
  - `createdAt` string, date-time
  - `lastUsedAt` string, date-time
  - `id` string
  - `accessToken` string
  - `displayName` string
  - `type` string
  - `scopes` string[]
  - `displayColor` integer
  - `isBot` boolean

## Other responses

- `400` — Bad request
- `401` — Basic auth failure
- `default` — Unexpected error

## Changes

- **2024-07-02** `618b7ae59cc5` — 1 info
  - endpoint added
- **2021-09-23** `02fef72d775b` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/owncast/apis/owncast-apis/changes/admin/accesstokens/create/post.md)

---

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