---
title: "listSchedules"
---

> Documentation Index
> Fetch the complete documentation index at: https://agenthold.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# listSchedules

Path: agenthold API › triggers

`GET /agents/{agentId}/schedules`

URL: `/api/v1/agents/{agentId}/schedules`

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `agentId` (`listSchedules.path.agentId`; string, required)

## Code samples

### cURL

```bash
curl --request GET \
  --url '<base-url>/api/v1/agents/<agentId>/schedules' \
  --cookie 'agenthold_session=<agenthold_session>'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/agents/<agentId>/schedules';
const options = {
  method: 'GET',
  headers: {cookie: 'agenthold_session=<agenthold_session>'}
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/agents/<agentId>/schedules"

headers = {"cookie": "agenthold_session=<agenthold_session>"}

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

print(response.text)
```

## Responses

### 200

The agent's schedules.

#### Example

```json
[
  {
    "name": "string",
    "cron": "string",
    "timezone": "string",
    "prompt": "string",
    "enabled": true,
    "id": "string",
    "agentId": "string",
    "sessionId": "string",
    "createdBy": {
      "id": "string",
      "email": "string",
      "name": "string",
      "avatarUrl": "string"
    },
    "nextRunAt": "2019-08-24T14:15:22Z",
    "lastRunAt": "2019-08-24T14:15:22Z",
    "lastError": "string",
    "createdAt": "2019-08-24T14:15:22Z"
  }
]
```

- `name` (`listSchedules.response.200.name`; string, required)
  - maxLength: `100` · minLength: `1`
- `cron` (`listSchedules.response.200.cron`; string, required) — Five fields (minute hour day month weekday) or @hourly, @daily, @weekly.
- `timezone` (`listSchedules.response.200.timezone`; string, required) — IANA time zone. Default UTC.
- `prompt` (`listSchedules.response.200.prompt`; string, required)
  - minLength: `1`
- `enabled` (`listSchedules.response.200.enabled`; boolean, required)
- `id` (`listSchedules.response.200.id`; string, required)
- `agentId` (`listSchedules.response.200.agentId`; string, required)
- `sessionId` (`listSchedules.response.200.sessionId`; string, required)
- `createdBy` (`listSchedules.response.200.createdBy`; object, required)
  - `id` (`listSchedules.response.200.createdBy.id`; string, required)
  - `email` (`listSchedules.response.200.createdBy.email`; string, required)
  - `name` (`listSchedules.response.200.createdBy.name`; string, required)
  - `avatarUrl` (`listSchedules.response.200.createdBy.avatarUrl`; string, required)
- `nextRunAt` (`listSchedules.response.200.nextRunAt`; string, required)
  - format: `date-time`
- `lastError` (`listSchedules.response.200.lastError`; string, required)
- `createdAt` (`listSchedules.response.200.createdAt`; string, required)
  - format: `date-time`
- `lastRunAt` (`listSchedules.response.200.lastRunAt`; string, optional)
  - format: `date-time`

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`listSchedules.response.404.error`; string, required)


Source: https://agenthold.dev/api/list-schedules/index.md
