---
title: "Rotate public API token"
method: POST
path: "/workspaces/{workspace_id}/api-token"
tags: ["publicAPI"]
---

# Rotate public API token

`POST /workspaces/{workspace_id}/api-token`

Rotates the Public API token for a partner-managed workspace. A new token is generated, persisted according to the platform’s security rules, and the previous token is invalidated immediately. Each successful rotation returns the new raw token value and the rotated_at timestamp. Subsequent calls rotate the token again; the operation is not idempotent. Workspace ownership and billing eligibility checks apply. Partners are expected to update their integrations to use the newly issued token as soon as it is returned.

## Path parameters

- `workspace_id` string, required

## Headers

- `X-TL-Partner-Id` string, required

## Response `201`

Token rotated

- PartnerAPIPublicTokenResponse — Response payload for retrieving or rotating a workspace Public API token. Returns the workspace_id and the raw token value, and, for rotation calls, the rotated_at timestamp that indicates when the previous token became invalid.
  - `workspace_id` string, required — Unique identifier for the workspace
  - `token` string, required — Raw Public API token value
  - `rotated_at` string, date-time — Timestamp when the token was rotated and became invalid.

---

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