Skip to main content
POST
Regenerate an agent's access token
Rotates an agent’s token, for example after it leaked. Any process using the old token loses gateway access right away. See How it works for how the gateway identifies agents. Mints a new gateway access token and invalidates the old one. A hosted agent’s sandbox is restarted with the new token.
Availability: Cloud · Community (self-hosted) · Enterprise (self-hosted)

Authorizations

Authorization
string
header
required

A workspace API key (oc_…) or organization API key (oc_org_…). Workspace-scoped endpoints called with an organization key also need X-Workspace-Id.

Path Parameters

agentId
string
required

Response

The new token

accessToken
string
Example:

"aoc_…"