curl --request POST \
--url https://api.unifygtm.com/sequences/v1/enrollments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailbox_emails": [
"jsmith@example.com"
],
"allowed_concurrent_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.unifygtm.com/sequences/v1/enrollments"
payload = {
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailbox_emails": ["jsmith@example.com"],
"allowed_concurrent_sequence_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
person_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mailbox_emails: ['jsmith@example.com'],
allowed_concurrent_sequence_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.unifygtm.com/sequences/v1/enrollments', 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.unifygtm.com/sequences/v1/enrollments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'person_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mailbox_emails' => [
'jsmith@example.com'
],
'allowed_concurrent_sequence_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.unifygtm.com/sequences/v1/enrollments"
payload := strings.NewReader("{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.unifygtm.com/sequences/v1/enrollments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unifygtm.com/sequences/v1/enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sequence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_paused": true
},
"person": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>"
},
"mailbox": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"display_name": "<string>",
"is_paused": true,
"is_unauthorized": true
},
"enrolled_by_play": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"reply_email_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"classifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "AUTOMATED"
}
],
"received_at": "2023-11-07T05:31:56Z"
},
"status": "DRAFT",
"is_blocked": true,
"is_bounced": true,
"is_canceled": true,
"is_excluded": true,
"is_opted_out": true,
"is_paused": true,
"is_replied": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"status": "bad_request",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"object_api_name": "<string>",
"attribute_api_name": "<string>"
}
],
"message": "<string>"
}{
"status": "unauthorized",
"message": "<string>"
}{
"status": "not_found",
"message": "<string>"
}{
"status": "conflict",
"message": "<string>",
"active_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "MANUAL_APPROVAL_REQUIRED",
"active_enrollments": [
{
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "DRAFT",
"policy": "ALLOWED"
}
],
"blocking_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unapproved_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"status": "rate_limited",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Create enrollment
Enroll a person in a sequence.
curl --request POST \
--url https://api.unifygtm.com/sequences/v1/enrollments \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailbox_emails": [
"jsmith@example.com"
],
"allowed_concurrent_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'import requests
url = "https://api.unifygtm.com/sequences/v1/enrollments"
payload = {
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"person_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mailbox_emails": ["jsmith@example.com"],
"allowed_concurrent_sequence_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
sequence_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
person_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
mailbox_emails: ['jsmith@example.com'],
allowed_concurrent_sequence_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('https://api.unifygtm.com/sequences/v1/enrollments', 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.unifygtm.com/sequences/v1/enrollments",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'sequence_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'person_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'mailbox_emails' => [
'jsmith@example.com'
],
'allowed_concurrent_sequence_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$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.unifygtm.com/sequences/v1/enrollments"
payload := strings.NewReader("{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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.post("https://api.unifygtm.com/sequences/v1/enrollments")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.unifygtm.com/sequences/v1/enrollments")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sequence_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"person_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"mailbox_emails\": [\n \"jsmith@example.com\"\n ],\n \"allowed_concurrent_sequence_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"sequence": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"is_paused": true
},
"person": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"linkedin_url": "<string>"
},
"mailbox": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"email": "jsmith@example.com",
"display_name": "<string>",
"is_paused": true,
"is_unauthorized": true
},
"enrolled_by_play": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"reply_email_message": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"subject": "<string>",
"classifications": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"category": "AUTOMATED"
}
],
"received_at": "2023-11-07T05:31:56Z"
},
"status": "DRAFT",
"is_blocked": true,
"is_bounced": true,
"is_canceled": true,
"is_excluded": true,
"is_opted_out": true,
"is_paused": true,
"is_replied": true,
"started_at": "2023-11-07T05:31:56Z",
"ended_at": "2023-11-07T05:31:56Z"
}{
"status": "bad_request",
"errors": [
{
"code": "<string>",
"path": [
"<string>"
],
"object_api_name": "<string>",
"attribute_api_name": "<string>"
}
],
"message": "<string>"
}{
"status": "unauthorized",
"message": "<string>"
}{
"status": "not_found",
"message": "<string>"
}{
"status": "conflict",
"message": "<string>",
"active_sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"active_enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"reason": "MANUAL_APPROVAL_REQUIRED",
"active_enrollments": [
{
"sequence_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"enrollment_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "DRAFT",
"policy": "ALLOWED"
}
],
"blocking_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"unapproved_sequence_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"status": "rate_limited",
"message": "<string>"
}{
"status": "error",
"message": "<string>"
}Overview
Create an enrollment to add a person to a sequence. The request body specifies:| Property | Behavior |
|---|---|
sequence_id | The sequence to enroll the person in. |
person_id | The person to enroll. |
mailbox_emails | Candidate mailbox addresses to send from. One is selected at enrollment time. At least one and at most ten addresses are accepted. |
409 Conflict.Authorizations
Body
Request body for enrolling a person in a sequence.
String UUID value.
String UUID value.
Candidate mailbox addresses to send from. One is selected at enrollment time. At most 10 addresses are accepted.
1 - 10 elementsString value representing an email address.
Active sequence IDs that the caller explicitly approved for simultaneous enrollment. Omit this field unless the user reviewed those enrollments.
String UUID value.
Response
Response returned when an enrollment is created.
Response returned when an enrollment is created.
String UUID value.
String value representing an RFC 3339 datetime.
String value representing an RFC 3339 datetime.
Sequence details embedded in enrollment responses.
Show child attributes
Show child attributes
Person details embedded in enrollment responses.
Show child attributes
Show child attributes
Mailbox details embedded in enrollment responses.
Show child attributes
Show child attributes
The play that created the enrollment, if applicable.
Show child attributes
Show child attributes
Reply email message details embedded in enrollment responses.
Show child attributes
Show child attributes
Status of a sequence enrollment.
DRAFT, IN_PROGRESS, FINISHED String value representing an RFC 3339 datetime.
String value representing an RFC 3339 datetime.