---
title: "Schedules"
description: "REST endpoints for schedules. Bearer-auth required."
section: "API"
group: "REST"
order: 55
---

## GET /api/schedules

List schedules.

**Query parameters**

- `limit` (optional): Page size (1–100, default 100).
- `after` (optional): Keyset cursor — return the page after this row (next page).
- `before` (optional): Keyset cursor — return the page before this row (prev page).
- `ids` (optional): Comma-separated list of IDs. Narrows results to these IDs within the caller's accessible scope (does not bypass access checks).
- `filter` (optional): Nested filter expression (`<Entity>Filter`): AND/OR/NOT + per-field comparison operators + relation traversal. JSON-encoded on the query string.
- `orderBy` (optional): Multi-key sort (`<Entity>OrderBy[]`): array of `{ field: direction }` applied in order. Directions: asc/desc plus the four explicit nulls variants. JSON-encoded on the query string.
- `workspace_id` (optional): Filter schedules to this workspace.
- `enabled` (optional): Filter by enabled state.
- `include_deleted` (optional): Soft-deleted schedule visibility. `false` (default) — active rows only. `true` — active plus soft-deleted. `only` — soft-deleted only (trash view).
- `name` (optional): Case-insensitive substring match on name.
- `source` (optional): Narrow by source. `workspace` = this workspace's rows plus those visible via installed integrations; `integration` = only rows made visible by installed integrations; omit = union.
- `missed_run_policy` (optional): Shorthand: filter where `missedRunPolicy` equals this value.
- `created_by` (optional): Shorthand: filter where `createdBy` equals this value.
- `runtime_user_id` (optional): Shorthand: filter where `runtimeUserId` equals this value.

**Response**

```json
{
  "data": [
    {
      "id": "<...>",
      "workspaceId": "<...>",
      "name": "<...>",
      "cronExpr": "<...>",
      "timezone": "<...>",
      "nextRunAt": "<...>",
      "lastFiredAt": "<...>",
      "missedRunPolicy": "<...>",
      "payload": "<...>",
      "enabled": "<...>",
      "createdBy": "<...>",
      "runtimeUserId": "<...>",
      "createdAt": "<...>",
      "updatedAt": "<...>"
    }
  ],
  "pageInfo": {
    "total": "number",
    "hasNextPage": "boolean",
    "hasPreviousPage": "boolean",
    "startCursor": "string",
    "endCursor": "string"
  }
}
```

## POST /api/schedules

Create schedule

**Request body**

```json
{
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone?": "string",
  "missedRunPolicy?": "skip | fire",
  "payload?": {},
  "enabled?": "boolean"
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone": "string",
  "nextRunAt": "string",
  "lastFiredAt": "string",
  "missedRunPolicy": "skip | fire",
  "payload": {},
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## GET /api/schedules/{id}

Get a schedule by ID.

**Path parameters**

- `id` (required): Schedule to retrieve.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone": "string",
  "nextRunAt": "string",
  "lastFiredAt": "string",
  "missedRunPolicy": "skip | fire",
  "payload": {},
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## PATCH /api/schedules/{id}

Update schedule

**Path parameters**

- `id` (required): The schedule's prefixed ID.

**Request body**

```json
{
  "name?": "string",
  "cronExpr?": "string",
  "timezone?": "string",
  "missedRunPolicy?": "skip | fire",
  "payload?": {},
  "enabled?": "boolean",
  "runtimeUserId?": "string"
}
```

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone": "string",
  "nextRunAt": "string",
  "lastFiredAt": "string",
  "missedRunPolicy": "skip | fire",
  "payload": {},
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## DELETE /api/schedules/{id}

Soft-delete a schedule.

**Path parameters**

- `id` (required): Schedule to soft-delete.

**Response**

```json
{
  "success": "boolean"
}
```

## POST /api/schedules/{id}/fire

Fire schedule now

Emits schedule.fired immediately without advancing nextRunAt. Works even when the schedule is disabled — intended for testing wired-up triggers.

**Path parameters**

- `id` (required): The schedule's prefixed ID.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone": "string",
  "nextRunAt": "string",
  "lastFiredAt": "string",
  "missedRunPolicy": "skip | fire",
  "payload": {},
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```

## DELETE /api/schedules/{id}/purge

Permanently delete a soft-deleted schedule.

**Path parameters**

- `id` (required): Soft-deleted schedule to permanently delete.

**Response**

```json
{
  "success": "boolean"
}
```

## POST /api/schedules/{id}/restore

Restore a soft-deleted schedule.

**Path parameters**

- `id` (required): Soft-deleted schedule to restore.

**Response**

```json
{
  "id": "string",
  "workspaceId": "string",
  "name": "string",
  "cronExpr": "string",
  "timezone": "string",
  "nextRunAt": "string",
  "lastFiredAt": "string",
  "missedRunPolicy": "skip | fire",
  "payload": {},
  "enabled": "boolean",
  "createdBy": "string",
  "runtimeUserId": "string",
  "createdAt": "string",
  "updatedAt": "string"
}
```
