Update Multiple Sequence Schedules

We're looking to update more than one sequence schedule at a time but don't know the correct format. Also, does Platform API support variables? We would like to only have to change the date in one place for intervals rather than in 12 different parts of the body of code. Our sequence schedule changes weekly and need to automate. When I copy and paste it twice it has an error. Is there a best practice for trying to change multiple sequence schedules in one body of code?

This is the code for updating one....(I'm a beginner so please dumb it down if you need to :slight_smile: )

{
"name": "A_AV_Bryan",
"version": 6,
"intervals": [
{
"start": "2021-12-27T17:00:00.784Z",
"end": "2021-12-27T18:00:00.784Z"
}
],
"timeZone": "America/New_York",
"sequence": {
"id": "5a98b227-972d-463c-89cf-93bd6c4c53d8",
"name": "A_AV_Bryan",
"selfUri": "/api/v2/outbound/sequences/5a98b227-972d-3c-89cf-d6c4c53d8"
}
}

There is no option to multiple that I am aware of.

Updats are done through;
PUT /api/v2/outbound/sequences/{sequenceId}

Which can only update a single sequenceId per request.
The ID in the URL locates the object. The sequence element described in the JSON has to match the ID in the URI because it's update to that Id.

The most efficient way to do what you want is to write a script to do it in any of the SDKs they make available.
There is no templating or variables in the JSON, you're expected to use an SDK to achieve that sort of flexibility or write your own interface and automation.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.