Unify and manage your data

Run agent immediately

Learn more about run agent immediately.

Use the Run agent immediately to run an agent once, on demand, without creating or keeping a schedule.

HTTP method and endpoint

Use the following HTTP method and endpoint path to run an agent immediately.

POST {TenantURL}/ai/agentflow/api/v202605/{tenant_id}/schedules/run-now

The following table describes the endpoint path parameters.

ParameterTypeRequiredDescription
TenantURLStringYesThe base URL for your tenant.
tenant_idStringYesThe unique identifier of your tenant.

Request headers

The following request headers must be included.

HeaderValueRequired
Authorization<access_token>Yes
Content-Typeapplication/jsonYes

Request body

The following table describes the request body parameters.

ParameterTypeRequiredDescriptionAccepted values / Default
nameStringNoThe display name for this run.—
queryStringYesThe prompt or query to send to the agent.—
agent_idStringYesThe unique identifier of the agent to run.—

Example request

Use the following example to see how a complete request is structured, with headers and a JSON body.

POST {TenantURL}/ai/agentflow/api/v202605/tenant-xyz/schedules/run-now
Authorization: <access_token>
Content-Type: application/json

{
  "name": "Manual support check",
  "query": "Check for urgent support tickets",
  "agent_id": "my-support-agent"
}

Response body

The following table describes the fields returned in the response body.

ParameterTypeDescription
schedule_idStringThe unique identifier of the schedule.
tenant_idStringThe unique identifier of the tenant.
agent_idStringThe unique identifier of the agent that theschedule runs.
nameStringThe display name.
queryStringThe prompt or query sent to the agent on each run.
schedule_typeStringThe type of schedule: recurring or run-once.
cron_expressionStringThe cron expression for the schedule, when schedule_type is recurring.
interval_minutesIntegerThe interval in minutes between runs, when schedule_type is recurring.
statusStringThe status of the schedule: active, paused, running, cancelled, completed, or failed.
next_run_atStringThe date and time of the next scheduled run.
last_run_atStringThe date and time of the last run.
run_countIntegerThe number of times this schedule has run.
run_onceBooleanWhether this is a one-time (run-once) schedule. When true, the schedule runs once. When false, the schedule is recurring.
last_conversation_idStringThe unique identifier of the conversation from the most recent run.
created_byStringThe unique identifier of the user who created the schedule.
created_atStringThe date and time when the schedule was created.
updated_atStringThe date and time when the record was last updated.

Example response

The following example shows a successful response for a recurring schedule.
{
  "schedule_id": "sched-abc123",
  "tenant_id": "tenant-xyz",
  "agent_id": "my-support-agent",
  "name": "Daily support escalation check",
  "query": "Check for urgent support tickets",
  "schedule_type": "recurring",
  "cron_expression": "0 9 * * MON-FRI",
  "interval_minutes": 60,
  "status": "active",
  "next_run_at": "2025-05-14T09:00:00Z",
  "last_run_at": "2025-05-13T09:00:00Z",
  "run_count": 5,
  "run_once": false,
  "last_conversation_id": "conv-abc123",
  "created_by": "user@example.com",
  "created_at": "2025-05-01T10:00:00Z",
  "updated_at": "2025-05-13T15:30:00Z"
}
The following example shows a successful response for a one time agent run.
{
"schedule_id": "sched-abc123",
"tenant_id": "tenant-xyz",
"agent_id": "my-support-agent",
"name": "Manual support check",
"query": "Check for urgent support tickets",
"schedule_type": "run-once",
"cron_expression": null,
"interval_minutes": null,
"status": "active",
"next_run_at": "2025-05-14T09:00:00Z",
"last_run_at": null,
"run_count": 0,
"run_once": true,
"last_conversation_id": null,
"created_by": "user@example.com",
"created_at": "2025-05-13T09:00:00Z",
"updated_at": "2025-05-13T09:00:00Z"
}

The following table lists the possible error responses returned by this API.

HTTP statusDescriptionRecommended action
422 Unprocessable EntityValidation ErrorReview the request parameters or body, correct the invalid values, and resend the request.