---
title: "A short-lived token for one Workbot turn"
method: POST
path: "/v1/workbot/run-token"
tags: ["Workbot"]
---

# A short-lived token for one Workbot turn

`POST /v1/workbot/run-token`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/workbot/run-token`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

For the Workbot app only. Mints the member-scoped MCP token a Workbot turn uses to reach the person's connected apps on the headless runner, for at most an hour. With `sessionId` and `messageId`, and where turns keep going on their own for the workspace, also returns a resume grant for that turn. With `sessionId` and where the session index is on for the workspace, also returns an index capability for that session. With scoped model access, also returns the member’s Gateway or managed Models route and bearer credential for the exact selected model, rechecking access for every turn. This response is server-to-server only and must not be forwarded to a browser or logged. Refused when Workbot is off for the member.

## Request body

- object
  - `ttlMs` integer
  - `readOnly` boolean
  - `sessionId` string
  - `messageId` string
  - `model` string
  - `modelAccessRequired` boolean

## Response `200`

The token.

- WorkbotRunToken
  - `token` string, required
  - `expiresAt` string, date-time, required
  - `resumeGrant` string
  - `modelAccess` object
    - `baseUrl` string, uri, required
    - `apiKey` string, required
    - `protocol` 'anthropic' | 'openai' | 'openai-responses', required
    - `model` string
    - `headers` object
      - `x-openwork-workbot-grant` string
  - `indexCapability` string

## Other responses

- `401`: The token is missing, expired or revoked, or the membership ended.
- `403`: Workbot or model access cannot start a turn.
- `429`: Too many tokens requested.

## Changes

- **2026-11-24** `22a65696ceb0`: 1 info
  - added the optional property `modelAccess/headers` to the response with the `200` status
- **2026-10-23** `c93387179b31`: 1 info
  - the `expiresAt` response's property pattern was changed from `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$` to `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z))$` for the status `200`
- **2026-10-21** `8b797799efc8`: 2 breaking, 1 warning, 2 info
  - the response's body type changed from `object` to no type for status `403`
  - removed the required property `error` from the response with the `403` status
  - removed the optional property `message` from the response with the `403` status
  - added `subschema #1, subschema #2` to the response body `anyOf` list for the response status `403`
  - …1 more
- **2026-10-20** `aef4d1db5034`: 1 info
  - added the optional property `indexCapability` to the response with the `200` status
- …earlier changes not shown

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/workbot/run-token/post.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
