Set how many sandboxes an end user may hold and keep awake
Sets the end user's own limits; `null` removes one, so the project's default for its end users counts again, or Pod's default when the project has none.
Sets the end user's own limits; null removes one, so the project's default for its end users counts again, or Pod's default when the project has none. The organization's and the project's limits still count on top. A create or a wake past a limit answers quota_exceeded naming it. A limit lowered below what the end user holds now stops nothing that runs: it refuses the next create or wake.
A key with the end_users:write scope.
Request
curl -X PUT "https://api.pod.mapier.ai/v1/end_users/enu_3ahrz6dmv29gqy5ckt18fp/limits" \
-H "Authorization: Bearer $POD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"max_sandboxes":0}'Parameters
| Name | In | Type | Required | What it is |
|---|---|---|---|---|
end_user_id | path | string | Yes | |
Idempotency-Key | header | string | No | Makes a repeat of this call safe for 24 hours. |
Body
| Field | Type | Required | What it is |
|---|---|---|---|
max_sandboxes | integer | null | No | Sandboxes the end user may hold. null removes the end user's own limit. At least 0. |
max_awake | integer | null | No | Sandboxes the end user may keep awake. null removes the end user's own limit. At least 0. |
Answer
200. The end user, with the limits that count for it now.
{
"id": "enu_3ahrz6dmv29gqy5ckt18fp",
"project": "prj_3ahrz6dmv29gqy5ckt18fp",
"ref": "example",
"trust_domain": "organisation",
"created_at": "2026-11-23T12:00:00.000Z",
"limits": {
"max_sandboxes": {
"value": 0,
"from": "end_user"
},
"max_awake": {
"value": 0,
"from": "end_user"
}
},
"spend_cap": {
"amount_cents": null,
"on_reach": "refuse",
"from": "end_user",
"currency": "example",
"period": "example",
"spent_cents": null,
"reached": false
},
"display_name": null,
"metadata": {},
"tags": ["example"],
"state": "active",
"suspended_at": null,
"policy": {
"wakes_per_hour": null,
"idle_s": null,
"max_size": null,
"max_vcpu": null
},
"tokens_valid_after": null
}| Field | Type | Always | What it is |
|---|---|---|---|
id | string | Yes | |
project | string | Yes | |
ref | string | Yes | Your own id for your user. Pod keeps it and shows it back; it never reads it. |
trust_domain | "organisation" | "end_user" | Yes | Whose trust domain the end user's sandboxes share: the organization's, or one of the end user's own, so no processor core switches between two end users without the processor's mitigations. |
created_at | string | Yes | RFC 3339 in UTC with milliseconds, for example 2026-11-23T17:04:05.123Z. |
limits | EndUserLimits | Yes | |
spend_cap | EndUserSpendCap | Yes | |
display_name | string | null | Yes | |
metadata | EndUserMetadata | Yes | Up to 16 string values of your own. Pod keeps them and shows them back; it never reads them. |
tags | string[] | Yes | |
state | "active" | "suspended" | "deleted" | Yes | suspended: creates, wakes and tokens refused (account_restricted, limit: end_user). deleted: gone; its sandboxes are deleted. |
suspended_at | string | null | Yes | |
policy | EndUserPolicy | Yes | What every sandbox of the end user is held to; null fields hold nothing. Set with updateEndUser. |
tokens_valid_after | string | null | Yes | Tokens made before this time are refused (revokeEndUserTokens). |
Errors
The refusals this call is known for: invalid, not_found. Any call can also answer unauthorized, rate_limited, unavailable or internal; the error list says what each means and when to send the call again.
In the SDKs
| Client | Call |
|---|---|
| TypeScript | pod.endUsers.setLimits(id, { … }) |
| Python | pod.end_users.set_limits(id, {…}) |