Skip to main content
POST
/
scheduled-task
/
sync
curl --request POST \
  --url https://zeus-api.agentspro.cn/scheduled-task/sync \
  --header 'X-Internal-Secret: your-secret' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "add",
    "task_id": "task_123",
    "task": {
      "id": "task_123",
      "user_id": "user_456",
      "title": "Daily Email Digest",
      "prompt": "Check inbox and generate a summary of today'\''s emails",
      "repeat_type": "daily",
      "scheduled_time": "09:00",
      "timezone": "Asia/Shanghai"
    }
  }'
{
  "success": true,
  "action": "add",
  "task_id": "task_123"
}
This is an internal API called by the Web layer via the X-Internal-Secret header. It is not publicly exposed.
After the Web layer creates, updates, or deletes a scheduled task, it uses this endpoint to sync the task to the APScheduler scheduler in the AI Backend.
X-Internal-Secret
string
required
Internal API secret (environment variable INTERNAL_API_SECRET)
action
string
required
Action type: add | remove | update
task_id
string
required
Task ID
task
object
Task data (required for add and update actions)
success
boolean
Whether the operation succeeded
action
string
The action that was performed
task_id
string
Task ID
curl --request POST \
  --url https://zeus-api.agentspro.cn/scheduled-task/sync \
  --header 'X-Internal-Secret: your-secret' \
  --header 'Content-Type: application/json' \
  --data '{
    "action": "add",
    "task_id": "task_123",
    "task": {
      "id": "task_123",
      "user_id": "user_456",
      "title": "Daily Email Digest",
      "prompt": "Check inbox and generate a summary of today'\''s emails",
      "repeat_type": "daily",
      "scheduled_time": "09:00",
      "timezone": "Asia/Shanghai"
    }
  }'
{
  "success": true,
  "action": "add",
  "task_id": "task_123"
}