---
title: POST /api/v1/runs/schedules
description: Create Schedule
locale: en
version: 0.2.0
canonical: https://enterium-developer-docs.pages.dev/developers/api/runs/post-runs-schedules/
---

> Documentation index: https://enterium-developer-docs.pages.dev/developers/llms.txt — every page of this portal has a Markdown twin at <route>.md; the frozen API contract is at https://enterium-developer-docs.pages.dev/developers/api/openapi.json.

:::note
Generated from the OpenAPI contract — do not edit by hand. Interactive explorer with full schemas: [https://entherium.duckdns.org:8443/reference](https://entherium.duckdns.org:8443/reference); frozen spec for this build: [openapi.json](/developers/api/openapi.json). Group: [runs](../).
:::

Create Schedule

create a schedule (validates pipeline + cron; computes next_fire_at).

**Auth:** `Authorization: Bearer <token>` required

## Request

```sh
curl -sS -X POST "https://entherium.duckdns.org:8443/api/v1/runs/schedules" \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{"cron":"<cron>","enabled":"<enabled>","entity":"<entity>","max_targets_per_fire":"<max_targets_per_fire>","mode":"<mode>","name":"<name>","params":"<params>","pipeline_id":"<pipeline_id>","selector":"<selector>","steps":"<steps>"}'
```

## Response `201`

The contract carries no example for this response; schema: `RunScheduleRead`. Field-level shape: [interactive explorer](https://entherium.duckdns.org:8443/reference).

## Returns

`RunScheduleRead` — Successful Response

| Field | Type | Description |
| --- | --- | --- |
| `cron` | `string` |  |
| `enabled` | `boolean` |  |
| `entity` | `string` |  |
| `guid` | `integer` |  |
| `last_fire_summary` | `object` |  |
| `last_fired_at` | `string \| null` |  |
| `max_targets_per_fire` | `integer` |  |
| `mode` | `string` |  |
| `name` | `string` |  |
| `next_fire_at` | `string \| null` |  |
| `params` | `object` |  |
| `pipeline_id` | `string` |  |
| `selector` | `object` |  |
| `steps` | `array of string \| null` |  |

## Parameters

| Parameter | In | Required | Type | Default | Constraints | Description |
| --- | --- | --- | --- | --- | --- | --- |
| `Idempotency-Key` | header | no | `string` | — | uuid | Optional. |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `cron` | `string` | yes |  |
| `enabled` | `boolean` | no |  |
| `entity` | `string` | yes |  |
| `max_targets_per_fire` | `integer` | no |  |
| `mode` | `string` | no |  |
| `name` | `string` | yes |  |
| `params` | `object` | no |  |
| `pipeline_id` | `string` | yes |  |
| `selector` | `object` | yes |  |
| `steps` | `array of string \| null` | no |  |

## Errors

| Code | Meaning | Body |
| --- | --- | --- |
| `401` | Missing or invalid authentication credentials | `ErrorResponse` |
| `422` | Validation Error | `HTTPValidationError` |

Every error body is `{detail, code?, request_id, doc_url}` — `request_id` is the value to quote, `doc_url` points at the [Errors reference](../../../reference/errors/).
