---
title: Scheduled changes
slug: feature-experimentation/docs/scheduled-changes
docTags: 
createdAt: 2026-08-05T20:40:02.000Z
---

You can schedule changes to an existing [flag](docId\:eH-UMm_rOn_GdGDGLV6__) or [rule](docId:-yq2-thNRv7-SgwCXpG90), such as:

- Turn a flag [on or off](docId\:F8tdFPnxECabBXsQkBqDt).
- [Play or pause](docId\:F8tdFPnxECabBXsQkBqDt) a rule.
- Update the percentage of traffic included in a rule.
- Update the targeted [audience](docId\:UDBvr5a8WHNkyOqzPhOr9).

:::hint{type="info"}
**Note**
If you intend to change the traffic's ramp percentage after running the experiment, you will need to implement a user profile service before starting the experiment.

For information, see [Ensure consistent user bucketing](docId:0mbVhcaiWJm6M96ZohwI-).
:::

## With the Flags Scheduling REST API

\<Add\_API\_Key />

See the [Optimizely Flags Scheduling API](docId\:J1ie3gX0PpvkjVkLq6dU6) reference documentation for the available endpoints to schedule changes in Feature Experimentation.

### Create a schedule change for a flag in an environment

Use the [Create a Schedule Change for a flag in an environment](docId:5JDNk8Vt292j5_pBeJkAS) API endpoint.

**Endpoint** – `POST https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules`

**Example request**

```curl
curl --request POST \
     --url https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/scheduled_changes_flag/schedules \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --data '
{
  "schedule": {
    "time": "11:00",
    "time_zone": "Etc/UTC",
    "date": "2025-09-16"
  },
  "account_id": ACCOUNT_ID,
  "actions": [
    {
      "subject": {
        "key": "a-b-test",
        "type": "rule"
      },
      "changed_element": "status",
      "value": "on"
    }
  ],
  "environment": "development"
}
'
```

**Example response**

```json
{
  "id": 7695,
  "project_id": PROJECT_ID,
  "environment": "development",
  "environment_id": ENVIRONMENT_ID,
  "flag_key": "scheduled_changes_flag",
  "created_at": "2025-09-15T19:53:59.083241",
  "created_by": "user@optimizely.com",
  "updated_at": "2025-09-15T19:53:59.083241",
  "updated_by": "user@optimizely.com",
  "completed_at": null,
  "status": "pending",
  "actions": [
    {
      "subject": {
        "key": "a-b-test",
        "type": "rule"
      },
      "changed_element": "status",
      "value": "on"
    }
  ],
  "schedule": {
    "date": "2025-09-16",
    "time": "11:00",
    "time_zone": "Etc/UTC",
    "utc_time": "2025-09-16T11:00:00Z"
  },
  "revision": 1
}
```

### List scheduled changes of a flag

Use the [List Scheduled changes of a flag](docId\:J1ie3gX0PpvkjVkLq6dU6) API endpoint.

**Endpoint** – `GET https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules`

**Example request**

```curl
curl --request GET \
     --url 'https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules?page_no=1&page_size=100' \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN'
```

**Example response**

```json
{
  "items": [
    {
      "id": 7694,
      "project_id": PROJECT_ID,
      "environment": "development",
      "environment_id": ENVIRONMENT_ID,
      "flag_key": "scheduled_changes_flag",
      "created_at": "2025-09-15T19:44:35.447789",
      "created_by": "user@optimizely.com",
      "updated_at": "2025-09-15T19:44:35.447789",
      "updated_by": "user@optimizely.com",
      "completed_at": null,
      "status": "pending",
      "actions": [
        {
          "subject": {
            "key": "scheduled_changes_flag",
            "type": "flag"
          },
          "changed_element": "status",
          "value": "on"
        }
      ],
      "schedule": {
        "date": "2025-09-16",
        "time": "12:30",
        "time_zone": "America/Chicago",
        "utc_time": "2025-09-16T17:30:00Z"
      },
      "revision": 1
    }
  ],
  "total": 1,
  "has_more": false
}
```

### Update the scheduled change for a flag in an environment

Use the [Update the Scheduled Change for a flag in an environment](docId\:wUbqNWEMvm7WavEbNufNt) API endpoint.

:::hint{type="warning"}
**Important**
For `PATCH` requests, first [GET  the current scheduled changes](docId\:pohjtLfclIuo8rAPe2M6h), merge only the fields you need to change, and then send the `PATCH`. This helps prevent overwriting existing settings you did not intend to modify.
:::

**Endpoint** – `PATCH https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules/SCHEDULE_ID`

1. (Optional) Use the [List scheduled changes of a flag](docId\:pohjtLfclIuo8rAPe2M6h) API endpoint to find the SCHEDULE\_ID.
2. Call the update scheduled change API endpoint. The following example shows how to turn a flag off:
   **Example request**

```curl
curl --request PATCH \
     --url https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/scheduled_changes_flag/schedules/SCHEDULE_ID \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'authorization: Bearer TOKEN' \
     --data '
{
  "schedule": {
    "time": "12:30",
    "date": "2025-09-30",
    "time_zone": "Etc/UTC"
  },
  "actions": [
    {
      "subject": {
        "key": "scheduled_changes_flag",
        "type": "flag"
      },
      "changed_element": "status",
      "value": "off"
    }
  ],
  "environment": "development"
}
'
```

**Example response**

```json
{
  "id": 7694,
  "project_id": PROJECT_ID,
  "environment": "development",
  "environment_id": ENVIRONMENT_ID,
  "flag_key": "scheduled_changes_flag",
  "created_at": "2025-09-15T19:44:35.447789",
  "created_by": "user@optimizely.com",
  "updated_at": "2025-09-15T20:39:50.799568",
  "updated_by": "user@optimizely.com",
  "completed_at": null,
  "status": "pending",
  "actions": [
    {
      "subject": {
        "key": "scheduled_changes_flag",
        "type": "flag"
      },
      "changed_element": "status",
      "value": "off"
    }
  ],
  "schedule": {
    "date": "2025-09-30",
    "time": "12:30",
    "time_zone": "Etc/UTC",
    "utc_time": "2025-09-30T12:30:00Z"
  },
  "revision": 1
}
```

### Delete a scheduled change for a flag in an environment

Use the [Delete a Scheduled Change for a flag in an environment](docId\:LBi_r01F7OIQCILsbrNF7) API endpoint.

**Endpoint** – `DELETE https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules/SCHEDULE_ID`

1. (Optional) Use the [List scheduled changes of a flag](docId\:pohjtLfclIuo8rAPe2M6h) API endpoint to find the SCHEDULE\_ID.
2. Call the delete a scheduled change API endpoint.
   **Example request**

```curl
curl --request DELETE \
     --url https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/scheduled_changes_flag/schedules/SCHEDULE_ID \
     --header 'accept: application/json' \
     --header 'authorization: Bearer TOKEN'
```

**Example response**
The endpoint returns no content if successful.

## Create a scheduled change with the Feature Experimentation UI

See [Manage scheduled changes](docId\:p46i-zfIwefbf8noQwHhr) in the user documentation for step-by-step examples.
