# Preview a trigger schedule (/en/docs/api/native/automation/previewTriggerSchedule)





Validate a schedule and preview up to five future firing times. The timezone is validated and a readable description is returned, without creating a trigger or run.

`POST /automation/v1/triggers/preview`

## Authentication [#authentication]

`Authorization: Bearer $PRAXIS_API_KEY`

## Request fields [#request-fields]

| Parameter | Type | Description |
| --- | --- | --- |
| header: Accept-Language | `string` | optional; Language for the readable description; supports Chinese (default) and English by language quality preference. |

### application/json [#applicationjson]

no additional fields.

| Field | Type | Description |
| --- | --- | --- |
| schedule | `object` / `object` / `object` | required; Choose a five-field cron (L/W/# supported), every of at least one minute, or at with a timezone. Uses the same validation as creation; at must be between now and one year ahead; every must resolve to positive integer milliseconds no longer than 366 days. |
| schedule (variant 1).cron | `string` | required; Five fields; supports L, W, #. DST gaps skip the day and overlaps run once. |
| schedule (variant 2).every | `string` / `object` | required; A duration: an ISO 8601 string such as PT5M, or an object with days, hours, minutes, seconds and milliseconds. It must convert to a whole number of milliseconds between 60000 and 31622400000 (1 minute to 366 days). |
| schedule (variant 2).every (variant 2).days | `integer` | optional; Number of days, a non-negative integer. minimum: 0 |
| schedule (variant 2).every (variant 2).hours | `integer` | optional; Number of hours, a non-negative integer. minimum: 0 |
| schedule (variant 2).every (variant 2).minutes | `integer` | optional; Number of minutes, a non-negative integer. minimum: 0 |
| schedule (variant 2).every (variant 2).seconds | `integer` | optional; Number of seconds, a non-negative integer. minimum: 0 |
| schedule (variant 2).every (variant 2).milliseconds | `integer` | optional; Number of milliseconds, a non-negative integer. minimum: 0 |
| schedule (variant 3).at | `string` | required; One-time firing instant with a Z or ±HH:MM timezone, between the request time and one calendar year later. Replace the example with a future instant in that range. pattern: "(Z\|[+-]\\d\\d:\\d\\d)$"; format: "date-time" |
| timezone | `string` | optional; IANA timezone, default UTC. DST gaps are skipped and repeated local times fire once. |

## Examples [#examples]

[SDK installation and example environment](/en/docs/api/native/automation)

```bash
curl --fail-with-body -X POST "https://api.deepraxis.ai/automation/v1/triggers/preview" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H "Content-Type: application/json" \
  --data '{
  "schedule": {
    "cron": "0 9 * * *"
  },
  "timezone": "UTC"
}'
```

```typescript
import { createAutomationClient } from '@deepraxis/sdk/automation';

function env(name: string): string {
  const value = process.env[name];
  if (!value) throw new Error(`Set ${name}`);
  return value;
}
const automation = createAutomationClient({
  apiKey: env('PRAXIS_API_KEY'),
  baseUrl: 'https://api.deepraxis.ai',
  maxRetries: 0,
  timeoutMs: 90_000,
});
const result = await automation.triggers.preview({
  "body": {
    "schedule": {
      "cron": "0 9 * * *"
    },
    "timezone": "UTC"
  }
});
console.log(result);
```

## Response [#response]

### HTTP 200 [#http-200]

Success

`application/json`

| Field | Type | Description |
| --- | --- | --- |
| description | `string` | required; Human-readable description of the rule; common cron expressions are spelled out and others echo the expression. The language follows Accept-Language, Chinese by default. |
| next_fire_times | `string[]` | required; Up to the next 5 firing times for the rule and time zone (RFC 3339 UTC). maxItems: 5 |

### Measured response [#measured-response]

HTTP 200

```json
{
  "description": "每天 09:00 · UTC",
  "next_fire_times": [
    "2026-10-13T09:00:00.000Z",
    "2026-10-14T09:00:00.000Z",
    "2026-10-15T09:00:00.000Z",
    "2026-10-16T09:00:00.000Z",
    "2026-10-17T09:00:00.000Z"
  ]
}
```

## Errors [#errors]

| HTTP | Codes and description |
| --- | --- |
| 400 | INVALID_PARAMS: Invalid request parameters, path, cursor, or body format. SCHEDULE_INVALID: The schedule or time boundaries are invalid. TIMEZONE_INVALID: The timezone is not a valid IANA timezone. INTERVAL_TOO_SHORT: The schedule interval is shorter than one minute. |
| default | RFC 9457 automation problem. 429 includes Retry-After. |

[Authentication and common errors](/en/docs/api/errors) · Retain the `X-Request-Id` response header for troubleshooting.
