Update a sequence
curl --request PATCH \
--url https://api.open.cx/sequences/{sequence_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Sequence",
"custom_id": "<string>",
"is_continuous": true,
"filter": {
"or": [
{
"and": [
{
"type": "<string>"
}
]
}
]
},
"steps": [
{
"action": {
"type": "send_emails",
"data": {
"from_email": "<string>",
"email_subject": "<string>",
"email_body": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": true
}
},
"delay_in_minutes": 1
}
]
}
'import requests
url = "https://api.open.cx/sequences/{sequence_id}"
payload = {
"name": "New Sequence",
"custom_id": "<string>",
"is_continuous": True,
"filter": { "or": [{ "and": [{ "type": "<string>" }] }] },
"steps": [
{
"action": {
"type": "send_emails",
"data": {
"from_email": "<string>",
"email_subject": "<string>",
"email_body": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": True
}
},
"delay_in_minutes": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Sequence',
custom_id: '<string>',
is_continuous: true,
filter: {or: [{and: [{type: '<string>'}]}]},
steps: [
{
action: {
type: 'send_emails',
data: {
from_email: '<string>',
email_subject: '<string>',
email_body: '<string>',
email_sender_name: '<string>',
email_is_transactional: true
}
},
delay_in_minutes: 1
}
]
})
};
fetch('https://api.open.cx/sequences/{sequence_id}', 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.open.cx/sequences/{sequence_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'New Sequence',
'custom_id' => '<string>',
'is_continuous' => true,
'filter' => [
'or' => [
[
'and' => [
[
'type' => '<string>'
]
]
]
]
],
'steps' => [
[
'action' => [
'type' => 'send_emails',
'data' => [
'from_email' => '<string>',
'email_subject' => '<string>',
'email_body' => '<string>',
'email_sender_name' => '<string>',
'email_is_transactional' => true
]
],
'delay_in_minutes' => 1
]
]
]),
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.open.cx/sequences/{sequence_id}"
payload := strings.NewReader("{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.open.cx/sequences/{sequence_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.open.cx/sequences/{sequence_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}AI Outbound Sequencing
Update a sequence
Update a sequence. Use when driving the outbound-sequencing engine programmatically.
PATCH
/
sequences
/
{sequence_id}
Update a sequence
curl --request PATCH \
--url https://api.open.cx/sequences/{sequence_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "New Sequence",
"custom_id": "<string>",
"is_continuous": true,
"filter": {
"or": [
{
"and": [
{
"type": "<string>"
}
]
}
]
},
"steps": [
{
"action": {
"type": "send_emails",
"data": {
"from_email": "<string>",
"email_subject": "<string>",
"email_body": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": true
}
},
"delay_in_minutes": 1
}
]
}
'import requests
url = "https://api.open.cx/sequences/{sequence_id}"
payload = {
"name": "New Sequence",
"custom_id": "<string>",
"is_continuous": True,
"filter": { "or": [{ "and": [{ "type": "<string>" }] }] },
"steps": [
{
"action": {
"type": "send_emails",
"data": {
"from_email": "<string>",
"email_subject": "<string>",
"email_body": "<string>",
"email_sender_name": "<string>",
"email_is_transactional": True
}
},
"delay_in_minutes": 1
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'New Sequence',
custom_id: '<string>',
is_continuous: true,
filter: {or: [{and: [{type: '<string>'}]}]},
steps: [
{
action: {
type: 'send_emails',
data: {
from_email: '<string>',
email_subject: '<string>',
email_body: '<string>',
email_sender_name: '<string>',
email_is_transactional: true
}
},
delay_in_minutes: 1
}
]
})
};
fetch('https://api.open.cx/sequences/{sequence_id}', 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.open.cx/sequences/{sequence_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'New Sequence',
'custom_id' => '<string>',
'is_continuous' => true,
'filter' => [
'or' => [
[
'and' => [
[
'type' => '<string>'
]
]
]
]
],
'steps' => [
[
'action' => [
'type' => 'send_emails',
'data' => [
'from_email' => '<string>',
'email_subject' => '<string>',
'email_body' => '<string>',
'email_sender_name' => '<string>',
'email_is_transactional' => true
]
],
'delay_in_minutes' => 1
]
]
]),
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.open.cx/sequences/{sequence_id}"
payload := strings.NewReader("{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.open.cx/sequences/{sequence_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.open.cx/sequences/{sequence_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"New Sequence\",\n \"custom_id\": \"<string>\",\n \"is_continuous\": true,\n \"filter\": {\n \"or\": [\n {\n \"and\": [\n {\n \"type\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"steps\": [\n {\n \"action\": {\n \"type\": \"send_emails\",\n \"data\": {\n \"from_email\": \"<string>\",\n \"email_subject\": \"<string>\",\n \"email_body\": \"<string>\",\n \"email_sender_name\": \"<string>\",\n \"email_is_transactional\": true\n }\n },\n \"delay_in_minutes\": 1\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"statusCode": 123,
"message": "<string>",
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the sequence
Body
application/json
Response
Default Response
Was this page helpful?
⌘I