curl --request PUT \
--url https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"structureId": "<string>",
"inProgressContactsTargetStepId": 2,
"saveCurrentStructure": false
}
'import requests
url = "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure"
payload = {
"structureId": "<string>",
"inProgressContactsTargetStepId": 2,
"saveCurrentStructure": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
structureId: '<string>',
inProgressContactsTargetStepId: 2,
saveCurrentStructure: false
})
};
fetch('https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'structureId' => '<string>',
'inProgressContactsTargetStepId' => 2,
'saveCurrentStructure' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure"
payload := strings.NewReader("{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}"
response = http.request(request)
puts response.read_bodySet the sequence's structure
Coming soon. This endpoint will be available by late October 2026.
ai-sdr:write scope (or a broader one that includes it).
Rebuild the sequence’s steps from a sequence structure.
Steps that contacts have already used, and the steps leading to them, are archived and stay in the sequence’s history. All other current steps are removed, and the structure’s steps become the sequence’s steps. GET /v3/sequences/ai-sdr/{sequence_id}/structure/migration-preview shows which steps are archived, removed and added, and how many contacts are affected.
A sequence with used steps can change its structure only when structure changes after sending are enabled for your account. Its contacts in progress are then handled according to inProgressContactsMode.
curl --request PUT \
--url https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"structureId": "<string>",
"inProgressContactsTargetStepId": 2,
"saveCurrentStructure": false
}
'import requests
url = "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure"
payload = {
"structureId": "<string>",
"inProgressContactsTargetStepId": 2,
"saveCurrentStructure": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
structureId: '<string>',
inProgressContactsTargetStepId: 2,
saveCurrentStructure: false
})
};
fetch('https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'structureId' => '<string>',
'inProgressContactsTargetStepId' => 2,
'saveCurrentStructure' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure"
payload := strings.NewReader("{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.reply.io/v3/sequences/ai-sdr/{sequence_id}/structure")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"structureId\": \"<string>\",\n \"inProgressContactsTargetStepId\": 2,\n \"saveCurrentStructure\": false\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
Authenticate every request with a Bearer token. Pass your Reply API key in the
Authorization header:
Authorization: Bearer <your-api-key>
Get your API key from the Reply dashboard: Settings → API Key.
Path Parameters
Sequence id
x >= 1Body
Applies a sequence structure to the sequence by id. The structure's steps become the sequence's steps.
Structure id: g-{number} for library structures, c-{number} for structures saved by users (e.g. g-3, c-128).
1What happens to the sequence's contacts in progress, paused ones included. Required when the sequence has used steps and contacts in progress.
restart, moveToStep, finish Required when inProgressContactsMode is moveToStep: the structureStepId of a step in stepsToAdd of GET /v3/sequences/ai-sdr/{sequence_id}/structure/migration-preview.
2
When true, the sequence's current steps are also saved as a personal sequence structure named as the preview's snapshotName (<sequence name> – before <yyyy-MM-dd>, at most 50 characters). The structure change completes even if saving fails.
Response
Structure applied