Skip to main content
POST
/
v1
/
agents
/
{agent_id}
/
scheduled-tasks
/
{task_id}
/
run
Run Scheduled Task Now
curl --request POST \
  --url https://api.xpander.ai/v1/agents/{agent_id}/scheduled-tasks/{task_id}/run \
  --header 'x-api-key: <api-key>'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}
Trigger a scheduled task right away without waiting for its next cron match. Useful for testing a task or running it on demand. The run is executed asynchronously; inspect it via the agent’s tasks.

Example Request

curl -X POST -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/agents/<agent-id>/scheduled-tasks/<task-id>/run"

Example Response

{
  "id": "<task-id>",
  "status": "running"
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required
task_id
string
required

Response

Successful Response