API tokens
An API token lets a script or another program call the Discontinue API as you. Every request checks your role in the workspace at that moment. A token never does more than you can, and some things it cannot do at all. An AI assistant such as Claude can also work in your workspaces by signing in, without a token.
Who can do this: everyone with an account. A token belongs to you, not to a workspace.
Create a token
-
Select your name at the bottom of the sidebar. Account opens. Select API tokens.
-
Under Create a token, enter a name, such as the script that uses it.
-
Choose Read-only or Read & write. A read-only token can only read.
-
Choose the workspace the token works in, or All my workspaces.
-
Optionally, enter a number of days from 1 to 365 in Expires (days). Without it, the token does not expire.

The form for a new token, filled in for a read-only token. -
Select Create token. Copy the token from the box that says "Copy your token now, you will not see it again."
Call the API
-
Send the token in the
Authorizationheader of every request:curl https://discontinue.dev/api/v1/agents \ -H "Authorization: Bearer dpat_..." -
With a token for all your workspaces, also name the workspace in the
X-Workspace-Idheader.GET /api/v1/auth/melists your workspaces with their ids. -
To see what you can call, start at
/api/v1/api-docs/llms.txt. It lists the areas of the API, and every operation has a page with its parameters and a curl example. It shows only what your role and the token allow.
Connect an AI assistant
-
Open Account, then AI assistants. Copy the Server URL,
https://discontinue.dev/api/v1/mcp/manage. -
Add it to your assistant. Set up your assistant has the steps for Claude Code, Claude, Codex, Cursor and VS Code. In Claude Code:
claude mcp add --transport http --scope user discontinue https://discontinue.dev/api/v1/mcp/manage -
Sign in when the assistant opens your browser, and select Allow. The assistant acts as you in all your workspaces, with your role in each.
-
An assistant that cannot sign in sends a token instead:
claude mcp add --transport http --scope user discontinue https://discontinue.dev/api/v1/mcp/manage \ --header "Authorization: Bearer dpat_..."
Revoke a token or disconnect an assistant
- Open Account, then API tokens.
- Select Revoke next to the token, then Yes, revoke. The token stops working at once.
- To end an assistant's access, select Disconnect next to it under AI assistants, then Yes, disconnect.
Good to know
- A token cannot manage your account, your tokens or billing. It cannot delete a workspace or change its AI instructions or model defaults.
- Sent to the Server URL, a Read & write token for All my workspaces can create a workspace when you are a billing admin.
- A new role applies to your tokens at once. When you are removed from a workspace, your tokens stop working there.
- Changing or resetting your password revokes every token and disconnects every assistant. Deleting your account deletes your tokens.
- Work done with a token counts against the same plan limits and spend limits as work in the app. See Limits and cost controls.