Claude Subscription Settings API
Read and change how much Claude Pro or Max subscription quota Vorflux leaves unused. The leftover percent is the remaining quota, from 0 to 99, at which Vorflux stops using a subscription, so that share stays available for other tools. This is the same Stop at remaining quota, percent setting that the web app shows.
The account has one default. Each subscription connection can also have its own override. A connection without an override uses the account default. A value of 0 means Vorflux uses the subscription until its quota runs out.
Who can call these endpoints
- Use an account API key. Workspace API keys get
403. - Read endpoints need the
sessions:readscope (Read in the Create API Key dialog). Write endpoints needsessions:write(Write). - Vorflux checks the key owner: the user who owns a personal key, or the user who created a service key. The key owner must be an active member of the account.
- When role-based access control is on, the key owner also needs the
settings:readpermission for reads. To change the account default, the key owner needssettings:write. To change a connection override, the key owner needsresources:write. - Only an account owner or admin can change the account default. Per-connection edit rules are in Set a Connection Override.
Every change is written to the audit log with the API key as the actor.
Example
# Read the account default
curl https://us1.vorflux.com/api/v1/claude-subscription-settings/default \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY"
# Keep 20% of every Claude subscription for other tools
curl -X PUT https://us1.vorflux.com/api/v1/claude-subscription-settings/default \
-H "Authorization: Bearer vfx_sk_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"leftoverPercent": 20}'Get the Account Default
/api/v1/claude-subscription-settings/defaultRequires sessions:read permission. Returns 0 when no default is set.
Response 200 OK
{
"leftoverPercent": 20
}Update the Account Default
/api/v1/claude-subscription-settings/defaultRequires sessions:write permission. The key owner must be an account owner or admin. Connections without an override use the new value immediately.
Request
{
"leftoverPercent": 20
}| Param | Default | Description |
|---|---|---|
leftoverPercent | required | Integer from 0 to 99, with no decimal point (30.0 is rejected). Use 0 to use subscriptions until their quota runs out. |
Response 200 OK
{
"leftoverPercent": 20
}List Connections
/api/v1/claude-subscription-settings/connectionsRequires sessions:read permission. Returns the Claude subscription connections that the key owner can see, with the account default. A member also sees teammates' personal connections, with canEdit set to false. Connections are sorted by providerId.
| Param | Default | Description |
|---|---|---|
pageSize | 50 | Number of connections per page, from 1 to 100. |
pageToken | — | The nextPageToken from the previous page. The token is opaque: pass it back unchanged and do not build your own. |
Response 200 OK
{
"accountLeftoverPercent": 20,
"connections": [
{
"providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c",
"name": "Team Claude Max",
"scope": "ALL",
"owner": null,
"leftoverPercentOverride": 30,
"effectiveLeftoverPercent": 30,
"accountLeftoverPercent": 20,
"canEdit": true,
"overrideUpdatedAt": "2026-10-29T18:00:00Z",
"overrideUpdatedByUserId": "5e4d3c2b-1a09-4f8e-b7d6-c5b4a3928170"
}
],
"nextPageToken": "M2YyYjhjMWUtOWE0ZC00ZTdiLThjMjEtNWQ2ZTdmOGE5YjBj"
}nextPageToken is left out on the last page.
Connection object
| Param | Default | Description |
|---|---|---|
providerId | string | ID of the connection. Use it in the per-connection endpoints. |
name | string | Display name of the connection. |
scope | string | ALL for a shared connection, or INDIVIDUAL for a personal one. |
owner | object | null | The user who owns a personal connection, as {"id", "name"}. null for a shared connection. |
leftoverPercentOverride | integer | null | The override for this connection. null means the account default applies. |
effectiveLeftoverPercent | integer | The value Vorflux uses: the override if set, otherwise the account default. |
accountLeftoverPercent | integer | The account default. |
canEdit | boolean | Whether the key owner can change the override. |
overrideUpdatedAt | string | RFC 3339 time of the last override change. Left out when there is no override. |
overrideUpdatedByUserId | string | User who last changed the override. Left out when there is no override. |
Get a Connection
/api/v1/claude-subscription-settings/connections/{providerId}Requires sessions:read permission. Returns 404 Not Found if the connection does not exist or the key owner cannot see it.
Response 200 OK
{
"providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c",
"name": "Team Claude Max",
"scope": "ALL",
"owner": null,
"leftoverPercentOverride": 30,
"effectiveLeftoverPercent": 30,
"accountLeftoverPercent": 20,
"canEdit": true,
"overrideUpdatedAt": "2026-10-29T18:00:00Z",
"overrideUpdatedByUserId": "5e4d3c2b-1a09-4f8e-b7d6-c5b4a3928170"
}Set a Connection Override
/api/v1/claude-subscription-settings/connections/{providerId}Requires sessions:write permission. The key owner can edit a connection when one of these is true: they own the personal connection, the connection is shared with the whole account (any member can change it), or they are an account owner or admin. Otherwise the request returns 403 Forbidden. The canEdit field shows the result in advance.
Request
{
"leftoverPercent": 30
}| Param | Default | Description |
|---|---|---|
leftoverPercent | required | Integer from 0 to 99, with no decimal point. To remove the override, use DELETE. |
Response 200 OK
The updated connection object.
{
"providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c",
"name": "Team Claude Max",
"scope": "ALL",
"owner": null,
"leftoverPercentOverride": 30,
"effectiveLeftoverPercent": 30,
"accountLeftoverPercent": 20,
"canEdit": true,
"overrideUpdatedAt": "2026-10-29T18:00:00Z",
"overrideUpdatedByUserId": "5e4d3c2b-1a09-4f8e-b7d6-c5b4a3928170"
}Returns 409 Conflict if the connection owner or access changed during the request. Send the request again.
Clear a Connection Override
/api/v1/claude-subscription-settings/connections/{providerId}Requires sessions:write permission and the same edit rights as setting an override. No request body needed. The connection goes back to the account default. Clearing a connection that has no override also succeeds.
Response 200 OK
{
"providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c",
"name": "Team Claude Max",
"scope": "ALL",
"owner": null,
"leftoverPercentOverride": null,
"effectiveLeftoverPercent": 20,
"accountLeftoverPercent": 20,
"canEdit": true
}Update Connections in Bulk
/api/v1/claude-subscription-settings/connectionsRequires sessions:write permission and edit rights on every connection in the request. Vorflux applies all changes together: if one change fails, no change is saved.
Request
{
"changes": [
{ "providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c", "leftoverPercent": 30 },
{ "providerId": "7a1c2d3e-4b5f-4a6b-9c7d-8e9f0a1b2c3d", "leftoverPercent": null }
]
}| Param | Default | Description |
|---|---|---|
changes | required | 1 to 100 changes. Each providerId can appear only once. |
changes[].providerId | required | ID of the connection to change. |
changes[].leftoverPercent | required | Integer from 0 to 99 with no decimal point, or null to clear the override. |
Response 200 OK
{
"results": [
{
"connection": { "providerId": "3f2b8c1e-9a4d-4e7b-8c21-5d6e7f8a9b0c", "leftoverPercentOverride": 30, "effectiveLeftoverPercent": 30 },
"previousLeftoverPercentOverride": null,
"changed": true
},
{
"connection": { "providerId": "7a1c2d3e-4b5f-4a6b-9c7d-8e9f0a1b2c3d", "leftoverPercentOverride": null, "effectiveLeftoverPercent": 20 },
"previousLeftoverPercentOverride": null,
"changed": false
}
]
}Results are in request order. Each connection is a full connection object; the example shortens them. changed is false when the connection already had the requested value.
Errors
Errors use the standard {"error": "..."} body. This API returns these errors:
| Status | When |
|---|---|
| 400 | leftoverPercent is missing or not an integer from 0 to 99, pageSize is not an integer from 1 to 100, pageToken cannot be decoded, or a bulk request has 0 or more than 100 changes, a missing providerId, or a duplicate providerId. |
| 401 | The Authorization header is missing, or the API key is not valid or was revoked. |
| 403 | The key is a workspace key, lacks the required scope, or its owner lacks the required role or edit rights. |
| 404 | The connection does not exist or the key owner cannot see it. |
| 405 | The method is not supported on this path. |
| 409 | The connection owner or access changed during the request. Send the request again. |
| 413 | The request body is larger than 1 KB, or 64 KB for a bulk update. |
| 429 | The key made more than 60 requests per minute (short bursts up to 10). Wait and send the request again. |
| 503 | Vorflux could not check the key owner. Send the request again. |