Update campaign schedule

Use this endpoint to update the schedule of an existing campaign.

API at a glance

Description: Use this endpoint to update the schedule of an existing campaign.

Supported campaign types:

  • one_time
  • recurring
  • segment_triggered
  • event_triggered
  • live_content

Authentication & testing

Testing the API on this page

How to try it here

  • Use your User API Key as the Username (leave Password blank).
  • User API Key Location
  • Select the appropriate API endpoint based on your Blueshift region.
  • API - Select Region
  • Enter the necessary parameters and click Try It to run the request.
Authentication using Base64 encoding

Note for developers

API requests require authentication using HTTP Basic Authentication with an API key. The API key serves as the username, while the password field should be left empty. The format to encode is: your_api_key: (note the trailing colon).

This string must be Base64-encoded and included in the request's Authorization header as follows:

Authorization: Basic encoded_value

You can generate the encoded value using a trusted Base64 encoder.


Postman collection

Try it with Postman: Explore the API using Blueshift's Postman collection.


Things to know before you start

  • Campaigns in the following statuses cannot be updated:

    • completed
    • archived
    • executing
  • launched campaigns can be updated only if the campaign type is event-triggered. Even then, changes may take up to 20 minutes to take effect.

  • Other campaign types (one-time, recurring, segment-triggered) cannot be updated after launch.

Request parameters

Check out the request parameters

Path parameters

ParameterTypeRequiredDescription
campaign_uuidstring✅ YesSpecify the UUID of the campaign to update.

Specify the UUID of the campaign to update. You can find the campaign UUID in the URL of the campaign editor.

Schedule parameters

ParameterTypeRequiredDescription
startdatestring (ISO 8601)✅ YesStart date and time for the campaign.
enddatestring (ISO 8601)❌ NoEnd date and time for the campaign.
recurring_schedulestring❌ NoSchedule type for segment-triggered campaigns. Options: daily, continuously.
repeating_schedule_attributesobject❌ NoFor recurring campaigns. Contains recurrence config.

repeating_schedule_attributes fields

FieldTypeRequiredDescription
interval_sizeinteger❌ NoInterval size for recurrence.
interval_unitstring❌ NoUnit for the interval. Options: day, week, month.
day_of_monthstring❌ NoMonthly recurrence type. Options: nth_day, nth_weekday, last_day.
days_of_weekarray❌ NoArray of weekdays for recurrence. e.g. ["mon", "wed"]

Example requests & responses

Updating start and end date of a campaign
curl --request PATCH \
     --url https://api.getblueshift.com/api/v1/campaigns/09d6d2b1-684b-41c7-80d5-7001ce2653ac/update_schedule \
     --header 'accept: application/json' \
     --header 'authorization: Basic MmI1ZDM2MDI3ZWMzMWFhNzJlN2Y3NjA3OThlMzZlZDk6' \
     --header 'content-type: application/json' \
     --data '
{
  "startdate": "2025-07-01T14:02:36.000Z",
  "enddate": "2025-07-03T14:02:36.000Z"
}
'
{
  "success": true
}
Updating campaign with recurring schedule
curl --request PATCH \
     --url https://api.getblueshift.com/api/v1/campaigns/da2bcf5a-6b61-45c2-b421-c7e7c8e21afe/update_schedule \
     --header 'accept: application/json' \
     --header 'authorization: Basic MmI1ZDM2MDI3ZWMzMWFhNzJlN2Y3NjA3OThlMzZlZDk6' \
     --header 'content-type: application/json' \
     --data '
{
  "repeating_schedule_attributes": {
    "interval_size": 2,
    "interval_unit": "day",
    "day_of_month": "nth_day",
    "days_of_week": [
      "tue",
      "thu"
    ]
  },
  "startdate": "2025-07-01T09:00:00.000Z",
  "enddate": "2025-07-15T18:00:00.000Z",
  "recurring_schedule": "daily"
}
'
{
  "success": true
}
API error responses

Note
The following error codes are commonly returned by Blueshift APIs. Depending on the specific endpoint, not all may apply.

Status codeDescriptionExample responses
400 Bad RequestThe request is invalid due to missing or incorrect parameters. This includes missing fields, invalid values, formatting issues, or conflicts such as duplicate data.{ "errors": { "name": ["can't be blank"] } }

{ "errors": { "startdate": ["can't be blank"] } }
401 UnauthorizedAPI authentication failed due to an invalid or missing API key.{ "message": "Not authorized" }
403 ForbiddenThe API key does not have sufficient permissions to perform this action.{ "message": "Permission denied" }
404 Not FoundThe specified campaign was not found. Verify the campaign UUID.{ "message": "Campaign not found" }
422 Unprocessable EntityOne or more schedule parameters are invalid or not supported.{ "message": "Invalid schedule values" }
429 Too Many RequestsThe request limit has been exceeded. Reduce request frequency.{ "message": "Rate limit exceeded" }
500 Internal Server ErrorAn unexpected server error occurred. Contact support if the issue persists.{ "message": "Internal Server Error - Please contact support for more information." }
502 Bad GatewayThe server received an invalid response. Retry the request.{ "message": "Bad Gateway - Please retry the request." }
503 Service UnavailableThe service is temporarily unavailable. Try again later.{ "message": "Service Unavailable - The service is temporarily unavailable. Try again later." }
504 Gateway TimeoutThe server took too long to respond. Retry the request with exponential backoff.{ "message": "Gateway Timeout - The server took too long to respond. Retry with exponential backoff." }
Language
Credentials
Basic
base64
:
URL
Click Try It! to start a request and see the response here!