POST /user/subscription_tokens/{provider}
Save your subscription token for a provider.
TypeScript SDKThe npm client, generated from the API spec.Python SDKThe PyPI client, sync and async.
| Method | Path |
|---|---|
| POST | /v1/user/subscription_tokens/{provider} |
Replaces whatever was stored. The token is saved DISABLED and routes nothing until `POST /v1/user/subscription_tokens/{provider}/verify` succeeds. Only `claude` routes today; generate its token with `claude setup-token`.
Path parameters
providerenumrequired
Named for the harness the token drives, not the vendor behind it: a developer connects "my Claude subscription", and the path segment they type is `claude`.
one of
claudecodexcurl -X POST "https://api.ellipsis.dev/v1/user/subscription_tokens/{provider}" \
-H "Authorization: Bearer $ELLIPSIS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"..."}'import os
from ellipsis import Ellipsis
client = Ellipsis(api_key=os.environ["ELLIPSIS_API_TOKEN"])
result = client.user.subscription_tokens.set(
"claude",
"...",
)
print(result)import { Ellipsis } from '@ellipsis-dev/sdk';
const client = new Ellipsis({
apiKey: process.env.ELLIPSIS_API_TOKEN!,
});
const result = await client.user.subscriptionTokens.set(
'claude',
{ token: '...' },
);
console.log(result);Request
Example request body
{
"token": "string"
}
Body parameters
tokenstringrequired
The subscription OAuth token. For `claude`, the `sk-ant-oat…` token `claude setup-token` prints.
Response
Example response · 200
{
"configured": false,
"enabled": false,
"provider": "claude",
"token_last4": "string"
}