List an agent’s schedules
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/schedules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/schedules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"object": "schedule",
"id": "sch_8c1e2f3a4b5c6d7e8f",
"agent_id": "<string>",
"procedure_id": "<string>",
"name": "Morning warranty check",
"cron": "0 9 * * 1-5",
"time_zone": "America/New_York",
"description": "Every weekday at 09:00",
"inputs": {},
"notify": {
"on": "failure",
"emails": [
"jsmith@example.com"
],
"chat_apps": false
},
"status": "active",
"procedure": {
"id": "<string>",
"title": "<string>",
"kind": "<string>",
"status": "<string>"
},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run": {
"object": "schedule_run",
"id": "srun_3f9a0c1b2d4e5f6a7b",
"schedule_id": "<string>",
"trigger": "schedule",
"status": "running",
"due_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"result": "<string>",
"error": "<string>",
"escalations": 123,
"cost_cents": 123
},
"created_by": {
"type": "user",
"email": "jane@acme.com"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>",
"limits": {
"schedules": 123,
"used": 123,
"min_minutes": 123,
"runs_at_once": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Schedules
List an agent’s schedules
GET
/
v1
/
agents
/
{agent_id}
/
schedules
List an agent’s schedules
curl --request GET \
--url https://guidinghand.ai/v1/agents/{agent_id}/schedules \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://guidinghand.ai/v1/agents/{agent_id}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://guidinghand.ai/v1/agents/{agent_id}/schedules"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"object": "list",
"data": [
{
"object": "schedule",
"id": "sch_8c1e2f3a4b5c6d7e8f",
"agent_id": "<string>",
"procedure_id": "<string>",
"name": "Morning warranty check",
"cron": "0 9 * * 1-5",
"time_zone": "America/New_York",
"description": "Every weekday at 09:00",
"inputs": {},
"notify": {
"on": "failure",
"emails": [
"jsmith@example.com"
],
"chat_apps": false
},
"status": "active",
"procedure": {
"id": "<string>",
"title": "<string>",
"kind": "<string>",
"status": "<string>"
},
"next_run_at": "2023-11-07T05:31:56Z",
"last_run": {
"object": "schedule_run",
"id": "srun_3f9a0c1b2d4e5f6a7b",
"schedule_id": "<string>",
"trigger": "schedule",
"status": "running",
"due_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z",
"conversation_id": "<string>",
"result": "<string>",
"error": "<string>",
"escalations": 123,
"cost_cents": 123
},
"created_by": {
"type": "user",
"email": "jane@acme.com"
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
],
"has_more": true,
"next_cursor": "<string>",
"limits": {
"schedules": 123,
"used": 123,
"min_minutes": 123,
"runs_at_once": 123
}
}{
"error": {
"type": "invalid_request",
"message": "<string>",
"code": "<string>",
"test_case_ids": [
"<string>"
],
"decided_by": {
"type": "person",
"email": "<string>",
"key_id": "<string>"
},
"conversation_id": "<string>",
"agent_id": "<string>",
"approval_id": "<string>",
"question_id": "<string>"
}
}Authorizations
An org API key (gh_live_…) from Settings → API keys in the console.
Path Parameters
The agent’s id.