POST
https://app.evoriqa.com/api/v1/reseller/clients/{workspaceId}/capSet a client's credit cap
Sets the client's monthly credit cap. The cap floors at 1000 (a value below it, including 0, returns 422); `null` clears the cap. A positive cap on a client that is not credit-metered returns 422. Reseller endpoints additionally require the key to live on the organization owner's own (primary) workspace — any other workspace returns 403.
Requires scope reseller:write
Warning:
Access is gated — enable it before your first call
The API is off by default. A request succeeds only when all three switches are on: the platform master switch (off by default), your organisation’s API toggle, and your plan or client entitlement. Any one off returns 403 API access is not enabled for this workspace.
Parameters
| Name | In | Type | Required | Default | Description |
|---|---|---|---|---|---|
| workspaceId | path | string uuid | Required | — | The client workspace's id. |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
| cap | integer 1000–100000000, or null | Required | The monthly credit cap; null clears it. Floors at 1000. |
Request
curl
curl -X POST "https://app.evoriqa.com/api/v1/reseller/clients/{workspaceId}/cap" \
-H "x-api-key: $EVORIQA_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "cap": 50000 }'Node.js
const res = await fetch("https://app.evoriqa.com/api/v1/reseller/clients/{workspaceId}/cap", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.EVORIQA_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"cap": 50000
}),
});
const responseBody = await res.json();Python
import os
import requests
res = requests.post(
"https://app.evoriqa.com/api/v1/reseller/clients/{workspaceId}/cap",
headers={"Authorization": f"Bearer {os.environ['EVORIQA_API_KEY']}"},
json={
"cap": 50000
},
)
body = res.json()Response
200 OK
{
"success": true,
"data": {
"workspaceId": "d4c3b2a1-0f9e-4d8c-8b7a-6f5e4d3c2b1a",
"cap": 50000
}
}