---
title: "Generate an API token. Should be done from the GenPage dashboard."
method: POST
path: "/api/external/v1/generate-api-token"
tags: ["Authentication"]
---

# Generate an API token. Should be done from the GenPage dashboard.

`POST /api/external/v1/generate-api-token`

This endpoint returns the generated token to be used in the external integration.
The token is bound to the workspace it was generated for and cannot be used
against any other workspace. It never expires; delete it to revoke access.

## Request body

- object
  - `name` string, required — A label for the key, shown in the dashboard.
  - `workspace_id` integer, required — The workspace the key may act on.

## Response `200`

- object
  - `token` string

## Other responses

- `401`
- `403`

## Changes

- **2026-08-17** `dd3f47f72f7a` — 1 info
  - added the non-success response with the status `403`

[Change history](https://skmtc.dev/genpage/apis/genpage-external-api-documentation/changes/api/external/v1/generate-api-token/post.md)

---

[API](https://skmtc.dev/genpage/apis/genpage-external-api-documentation.md) · [All operations](https://skmtc.dev/genpage/apis/genpage-external-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/genpage/genpage-external-api-documentation/revisions/29a37db12acb/schema)
