Organisations
Set an organisation's daily limits inside its allowance
Replaces the limits a day for each member, each agent connection and each organisation key, and the overrides.
PUT
/orgs/{org}/call-capsTL;DR
| Question | Answer |
|---|---|
| What does it do? | Set an organisation's daily limits inside its allowance. |
| What does it take? | A JSON body of type CallCapsInput. |
| What does it return? | Status 200 with a body of type CallCaps. |
| What can go wrong? | 400 the body is not valid; 401 not signed in; 403 only the owner or an admin may change them (orgs.forbidden), the plan does not include them (plan.policies_not_included), or the request came from an origin that may not make changes; 404 no such organisation, or the caller is not a member of it; 422 a number is over the allowance, or an override names someone or something it cannot; the details list each; 429 too many requests; 503 organisations are not set up on this server. Every failure uses the one error envelope. |
What it does
Replaces the limits a day for each member, each agent connection and each organisation key, and the overrides. A call past one is refused with 429 orgs.member_cap; the account's allowance still applies, and the counts reset at 00:00 UTC. Enterprise; each number at most the allowance. The owner or an admin.
Path parameters
| Field | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation's id or its slug. |
Request body
The body has the type CallCapsInput.
| Field | Type | Required | Description |
|---|---|---|---|
member | integer | null | yes | The most calls a day one member makes through every agent they connected to the organisation, or null for off. minimum 1; maximum 100000000. |
connection | integer | null | yes | The most calls a day one agent connection makes, or null for off. minimum 1; maximum 100000000. |
key | integer | null | yes | The most calls a day one organisation key from the Keys tab makes, or null for off. minimum 1; maximum 100000000. |
overrides | CallCapOverride[] | yes | Up to 200, one a member or key. |
overrides[].kind | "member" | "key" | yes | member: a member, every agent they connected to the organisation together. key: one organisation key or one agent connection. |
overrides[].id | string | yes | The member's account id, or the key's id. at least 1 character; at most 64 characters. |
overrides[].dailyCalls | integer | yes | The calls a day, at most the organisation allowance. minimum 1; maximum 100000000. |
Responses
| Status | Meaning | Body |
|---|---|---|
| 200 | The limits now. | CallCaps |
| 400 | The body is not valid. | ErrorResponse |
| 401 | Not signed in. | ErrorResponse |
| 403 | Only the owner or an admin may change them (orgs.forbidden), the plan does not include them (plan.policies_not_included), or the request came from an origin that may not make changes. | ErrorResponse |
| 404 | No such organisation, or the caller is not a member of it. | ErrorResponse |
| 422 | A number is over the allowance, or an override names someone or something it cannot; the details list each. | ErrorResponse |
| 429 | Too many requests. | ErrorResponse |
| 503 | Organisations are not set up on this server. | ErrorResponse |
Response body
A 200 answer has the type CallCaps.
| Field | Type | Required | Description |
|---|---|---|---|
member | integer | null | yes | The most calls a day one member makes through every agent they connected to the organisation, or null for off. minimum 1; maximum 100000000. |
connection | integer | null | yes | The most calls a day one agent connection makes, or null for off. minimum 1; maximum 100000000. |
key | integer | null | yes | The most calls a day one organisation key from the Keys tab makes, or null for off. minimum 1; maximum 100000000. |
overrides | CallCapOverride[] | yes | Up to 200, one a member or key. |
overrides[].kind | "member" | "key" | yes | member: a member, every agent they connected to the organisation together. key: one organisation key or one agent connection. |
overrides[].id | string | yes | The member's account id, or the key's id. at least 1 character; at most 64 characters. |
overrides[].dailyCalls | integer | yes | The calls a day, at most the organisation allowance. minimum 1; maximum 100000000. |
available | boolean | yes | False on a plan without the limits (anything but Enterprise): they are not applied, and only turning them off is allowed. |
plan | string | yes | |
allowance | integer | yes | The most calls a day an account in the organisation may make. Every limit is held to it. |
choices | CallCapChoice[] | yes | The members who can connect agents and the live keys, for an override. |
choices[].kind | "member" | "key" | yes | |
choices[].id | string | yes | |
choices[].label | string | yes | The member's address, the key's name, or the name the agent gave itself. |
choices[].via | "connection" | "key" | no | For a key: an agent connection, or a key from the Keys tab. |
choices[].member | string | null | no | For an agent connection: the address of the member who connected it. |
See also
| Doc | Why |
|---|---|
| API reference | Every endpoint, and the error envelope |
| Schemas | Every request and response type |
| Tool reference | The operations as callable tools |