---
title: "Activate Schedule"
method: POST
path: "/api/v1/schedules/{schedule_id}/activate"
tags: ["schedules"]
---

# Activate Schedule

`POST /api/v1/schedules/{schedule_id}/activate`

Activate a schedule by its ID. This will only work on `IMPERATIVE` schedules that were created in the dashboard or using the imperative SDK functions like `schedules.create()`.

## Path parameters

- `schedule_id` string, required

## Response `200`

Schedule updated successfully

- ScheduleObject
  - `id` string — The unique ID of the schedule, prefixed with 'sched_'
  - `task` string — The id of the scheduled task that will be triggered by this schedule
  - `type` string — The type of schedule, `DECLARATIVE` or `IMPERATIVE`. Declarative schedules are declared in your code by setting the `cron` property on a `schedules.task`. Imperative schedules are created in the dashboard or by using the imperative SDK functions like `schedules.create()`.
  - `active` boolean — Whether the schedule is active or not
  - `deduplicationKey` string — The deduplication key used to prevent creating duplicate schedules
  - `externalId` string — The external ID of the schedule. Can be anything that is useful to you (e.g., user ID, org ID, etc.)
  - `generator` object
    - `type` 'CRON'
    - `expression` string — The cron expression used to generate the schedule
    - `description` string — The description of the generator in plain english
  - `timezone` string — Defaults to UTC. In IANA format, if set then it will trigger at the CRON frequency in that timezone and respect daylight savings time.
  - `nextRun` string, date-time — The next time the schedule will run
  - `environments` ScheduleEnvironment[]
    - `id` string
    - `type` string
    - `userName` string

## Other responses

- `401` — Unauthorized request
- `404` — Resource not found

---

[API](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api.md) · [All operations](https://skmtc.net/winsenlabs/apis/trigger-dev-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/winsenlabs/trigger-dev-v3-rest-api/versions/737c498e605b/schema)
