Pause or resume a schedule
const url = 'https://api.nuveki.ai/api/v0/schedules/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.nuveki.ai/api/v0/schedules/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "enabled": true }'enabled: false stops its runs until it is resumed. A resume is refused for a schedule made in another project than the key works in now, and for a one-time schedule whose run is behind it.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The schedule’s id.
Request Bodyrequired
Section titled “Request Bodyrequired”object
false pauses the schedule; true resumes it.
Example generated
{ "enabled": true}Responses
Section titled “Responses”object
The schedule’s id: read its runs with GET /api/v0/runs?scheduleId=.
What each run asks: the agent or team, by username.
object
What each run asks it.
False: paused, or a one-time run that has run.
object
Runs it makes in the next 30 days.
One run’s cost in dollars, measured from the target’s recent turns; null without enough of them to measure.
The next 30 days’ runs, in dollars; null when a run is not measured.
Example
{ "object": "schedule"}Headers
Section titled “Headers”unstable: /v0 may change without notice.
This request’s id: the X-Request-Id you sent, when it is at most 128 letters, digits and ._:-, otherwise one of ours. Every refusal carries it too; quote it to support.
The request broke a rule (an unknown field or parameter is one): message lists each.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}The key is missing, unknown, revoked or expired, or its organization has no admin left who could revoke it.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}KEY_PROJECT_MISSING: the key works in no project, so none of its schedules can run; an organization admin gives it one.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}No schedule of this key has this id: it is another key’s, or was deleted.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}SCHEDULE_IN_ANOTHER_PROJECT: the schedule was made in another project than the key works in now (make it again here). SCHEDULE_FINISHED: a one-time schedule with no run left (make a new one).
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}code RATE_LIMITED: this key’s requests to this route came too fast (a bearer that is not an API key is counted by its address), or this address passed 600 requests a minute (a ceiling every key behind one address shares). Wait retryAfter seconds.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}Headers
Section titled “Headers”Seconds to wait before trying again; the same as retryAfter.
The server failed before it could answer (a database outage, say). message is always Internal server error, with no detail; try again.
A refusal may carry more fields than these: a refusal by the organization’s budget adds its plan and figures: tier; the daily, monthly and per-minute amounts used and allowed and the credit balance, in US dollars (dailyBudgetUsedUsd, dailyBudgetLimitUsd, …); and its reset times.
object
The HTTP status name, or — when the organization’s budget refused the run — its reason: DAILY_LIMIT_EXCEEDED, MONTHLY_LIMIT_EXCEEDED, RATE_LIMIT_EXCEEDED, INSUFFICIENT_CREDITS, MODEL_NOT_ALLOWED, BUDGET_BLOCKED; or model_unavailable when the agent’s model, on someone’s own endpoint, cannot run: its connection is turned off, the model was removed, or the connection’s owner left its organization.
A refusal a program can act on without reading message: a key, run or capacity limit, or RATE_LIMITED when requests from one address or to one route came too fast.
Seconds to wait before trying again. A 429 that carries it also sends it as the Retry-After header.
Seconds until the organization’s budget resets, on a refusal by that budget.
True when the run’s own estimated cost is above the organization’s per-minute budget: no wait lets it through, so retryAfterSeconds is absent, and code is RUN_OVER_PER_MINUTE_BUDGET. Send a smaller request.
The conversation of a run stopped after it started: what it wrote and paid for before it stopped.
The run this refusal answers, kept with it: read it with GET /api/v0/runs/{id}, and quote it to support.
Example
{ "code": "KEY_RATE_LIMIT_EXCEEDED"}