Run an agent or team on a schedule
const url = 'https://api.nuveki.ai/api/v0/schedules';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"agent":"data.analyst","team":"research-team","input":"Summarize last week’s support tickets by theme.","metadata":{"ticket":"SUP-1042"},"mentions":"route","idempotencyKey":"ticket-SUP-1042-summary","cron":"30 8 * * 1-5","at":"2026-11-20T09:00","timezone":"America/New_York","name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.nuveki.ai/api/v0/schedules \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "agent": "data.analyst", "team": "research-team", "input": "Summarize last week’s support tickets by theme.", "metadata": { "ticket": "SUP-1042" }, "mentions": "route", "idempotencyKey": "ticket-SUP-1042-summary", "cron": "30 8 * * 1-5", "at": "2026-11-20T09:00", "timezone": "America/New_York", "name": "example" }'Each time it comes due, the schedule starts one of this key’s runs — input (with metadata, mentions) asked of the agent or team exactly as POST /api/v0/runs asks it, held to every limit a run is (reach, the key’s project, spend caps, run rate). Its runs never wait: read them with GET /api/v0/runs?scheduleId=. A repeat (cron) runs at most every 15 minutes; a one-time run (at) runs once and the schedule then stays, disabled. While the key’s project is archived its schedules make no runs and report no nextRunAt; they pick up again when it is unarchived, and a one-time run due meanwhile is skipped. When the key stops working in that project (taken out, moved to another, revoked) or the project is deleted, they are turned off; make them again where the key works. A key holds at most 25, and each is one of the organization’s workflows: past the plan’s workflow limit the create is refused with 400 and the plan’s own message. The answer estimates what its runs cost over 30 days, from the target’s own recent turns. Send an Idempotency-Key (or idempotencyKey) so a retry makes no second schedule.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The agent to answer, by username. Not with team. Leave out both to let the run choose among what this key may run.
Example
data.analystThe team to answer, by username: its agents this key may run take the request together. Not with agent.
Example
research-teamWhat to ask, with any material the agent needs.
Example
Summarize last week’s support tickets by theme.Your own labels for the run’s conversation, kept with it and never read as an instruction.
object
Example
{ "ticket": "SUP-1042"}route: an @mention in the input routes to an agent or team this key may run, as in a chat. ignore: the input is plain text. A run with output or tools: 'none' is one agent’s turn, so its mentions are always ignored, and route beside either is refused.
Your own unique value for this request, so a retry cannot start a second run: a repeat with the same value is answered with the first run, while this key keeps it. Reusing a value for a different request is refused (422). A run that was refused, failed, interrupted or abandoned by a caller that hung up frees its value, so the retry runs; an answered run, or one you cancelled, keeps it. On REST you may send the Idempotency-Key header instead.
Example
ticket-SUP-1042-summaryRepeat on this 5-field cron, read in timezone: at most every 15 minutes. Leave out for a one-time run at at.
Example
30 8 * * 1-5A one-time run’s local time in timezone (YYYY-MM-DDTHH:mm, no offset), still ahead. With cron, the first run.
Example
2026-11-20T09:00The IANA time zone cron and at are read in.
Example
America/New_YorkYour name for the schedule; by default, the agent and input.
Responses
Section titled “Responses”The schedule (200 when an idempotency key answered with an earlier one).
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 schedule, made now.
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"}The agent or team is not one this key may run (a roster-only key runs only what is deployed to its project), or a continued run names a different target or one that has left the key’s reach. A model the organization’s plan does not include is refused by its budget, named in error. KEY_PROJECT_MISSING: the key works in no project, since its project was deleted or the key was taken out of it; an organization admin gives it one. PROJECT_ARCHIVED: the key’s project is archived, so nothing runs in it until it is unarchived. CONVERSATION_IN_ANOTHER_PROJECT: the conversation was filed while the key worked in another project; start 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"}SCHEDULE_LIMIT_REACHED: the key holds 25 schedules, the most one key may. Delete one first.
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"}IDEMPOTENCY_KEY_REUSED: this idempotency key made a different schedule (scheduleId names it). Use a new value for a new request.
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"}