Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.

Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
Dev guide

Scheduled changes

Manage scheduled changes for your Optimizely Feature Experimentation project.

You can schedule changes to an existing flag or rule, such as:

📘

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 more information, see Ensure consistent user bucketing.

With the Flags Scheduling REST API

See the Optimizely Flags Scheduling API 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 API endpoint.

EndpointPOST https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules

Request example

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"
}
'

Response example

{
  "id": 7695,
  "project_id": PROJECT_ID,
  "environment": "development",
  "environment_id": 24540890184,
  "flag_key": "scheduled_changes_flag",
  "created_at": "2025-09-15T19:53:59.083241",
  "created_by": "[email protected]",
  "updated_at": "2025-09-15T19:53:59.083241",
  "updated_by": "[email protected]",
  "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 API endpoint.

EndpointGET https://api.app.optimizely.com/flags-scheduling/projects/PROJECT_ID/flags/FLAG_KEY/schedules

Request example

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'

Response example

{
  "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": "[email protected]",
      "updated_at": "2025-09-15T19:44:35.447789",
      "updated_by": "[email protected]",
      "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 API endpoint.

🚧

Important

For PATCH requests, first GET the current scheduled changes, 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.

EndpointPATCH 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 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:

    Request example

    curl --request PATCH \
         --url https://api.app.optimizely.com/flags-scheduling/projects/24566260139/flags/scheduled_changes_flag/schedules/7694 \
         --header 'accept: application/json' \
         --header 'content-type: application/json' \
         --header 'authorization: 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"
    }
    '

    Response example

    {
      "id": 7694,
      "project_id": 24566260139,
      "environment": "development",
      "environment_id": 24540890184,
      "flag_key": "scheduled_changes_flag",
      "created_at": "2025-09-15T19:44:35.447789",
      "created_by": "[email protected]",
      "updated_at": "2025-09-15T20:39:50.799568",
      "updated_by": "[email protected]",
      "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 API endpoint.

EndpointDELETE 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 API endpoint to find the SCHEDULE_ID.

  2. Call the delete a scheduled change API endpoint.

    Request example

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

    Response example The endpoint returns no content if successful.

Create a scheduled change with the Feature Experimentation UI

See Manage scheduled changes in the user documentation for step-by-step examples.