Skip to main content
GET
/
v1
/
agents
/
{agent_id}
/
self-schedules
List Self-Schedules
curl --request GET \
  --url https://api.xpander.ai/v1/agents/{agent_id}/self-schedules \
  --header 'x-api-key: <api-key>'
import requests

url = "https://api.xpander.ai/v1/agents/{agent_id}/self-schedules"

headers = {"x-api-key": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};

fetch('https://api.xpander.ai/v1/agents/{agent_id}/self-schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.xpander.ai/v1/agents/{agent_id}/self-schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.xpander.ai/v1/agents/{agent_id}/self-schedules"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-api-key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://api.xpander.ai/v1/agents/{agent_id}/self-schedules")
.header("x-api-key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.xpander.ai/v1/agents/{agent_id}/self-schedules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'

response = http.request(request)
puts response.read_body
[
  {
    "id": "<string>",
    "agent_id": "<string>",
    "run_at": "2023-11-07T05:31:56Z",
    "status": "<string>",
    "task_id": "<string>",
    "prompt": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}
Self-schedules are one-shot future runs an agent books for itself at runtime (when self-scheduling is enabled). This endpoint lists them — it does not create them. Optionally filter by status.

Query Parameters

status
string
Filter by status: scheduled, completed, or failed.

Response

[]
array
Array of self-schedules.

Example Request

curl -X GET -H "x-api-key: <your-api-key>" \
  "https://api.xpander.ai/v1/agents/<agent-id>/self-schedules?status=scheduled"

Example Response

[
  {
    "id": "<schedule-id>",
    "agent_id": "<agent-id>",
    "task_id": "<task-id>",
    "prompt": "Follow up on the open incident.",
    "run_at": "2026-07-01T09:00:00Z",
    "status": "scheduled",
    "created_at": "2026-06-30T09:00:00Z",
    "updated_at": "2026-06-30T09:00:00Z"
  }
]

Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

agent_id
string
required

Query Parameters

status
string | null

Filter by status: scheduled, completed, or failed.

Response

Successful Response

id
string
required

Self-schedule id. Pass it to DELETE to cancel.

agent_id
string
required

Owning agent id.

run_at
string<date-time>
required

When the run fires (UTC).

status
string
required

scheduled, completed, or failed.

task_id
string | null

Execution thread the run continues, if any.

prompt
string | null

Instruction for the scheduled run.

created_at
string<date-time> | null

Creation timestamp.

updated_at
string<date-time> | null

Last update timestamp.