curl --request POST \
--url https://client-api.salesfinity.co/v2/sequencer/enrollment-runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "507f1f77bcf86cd799439011",
"sequence": "<string>",
"source": {
"contacts": [
"<string>"
],
"contact_list": "<string>",
"prospects": [
{
"contact": "<string>",
"email": "<string>",
"linkedin_username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"account": "<string>",
"title": "<string>",
"timezone": "<string>",
"phone_number": "<string>",
"phone_type": "mobile",
"custom_fields": [
{
"label": "<string>",
"value": {}
}
]
}
],
"preview_id": "<string>"
},
"owner_id": "<string>",
"force_include": [
"<string>"
]
}
'import requests
url = "https://client-api.salesfinity.co/v2/sequencer/enrollment-runs"
payload = {
"user_id": "507f1f77bcf86cd799439011",
"sequence": "<string>",
"source": {
"contacts": ["<string>"],
"contact_list": "<string>",
"prospects": [
{
"contact": "<string>",
"email": "<string>",
"linkedin_username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"account": "<string>",
"title": "<string>",
"timezone": "<string>",
"phone_number": "<string>",
"phone_type": "mobile",
"custom_fields": [
{
"label": "<string>",
"value": {}
}
]
}
],
"preview_id": "<string>"
},
"owner_id": "<string>",
"force_include": ["<string>"]
}
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({
user_id: '507f1f77bcf86cd799439011',
sequence: '<string>',
source: {
contacts: ['<string>'],
contact_list: '<string>',
prospects: [
{
contact: '<string>',
email: '<string>',
linkedin_username: '<string>',
first_name: '<string>',
last_name: '<string>',
account: '<string>',
title: '<string>',
timezone: '<string>',
phone_number: '<string>',
phone_type: 'mobile',
custom_fields: [{label: '<string>', value: {}}]
}
],
preview_id: '<string>'
},
owner_id: '<string>',
force_include: ['<string>']
})
};
fetch('https://client-api.salesfinity.co/v2/sequencer/enrollment-runs', 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://client-api.salesfinity.co/v2/sequencer/enrollment-runs",
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([
'user_id' => '507f1f77bcf86cd799439011',
'sequence' => '<string>',
'source' => [
'contacts' => [
'<string>'
],
'contact_list' => '<string>',
'prospects' => [
[
'contact' => '<string>',
'email' => '<string>',
'linkedin_username' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'account' => '<string>',
'title' => '<string>',
'timezone' => '<string>',
'phone_number' => '<string>',
'phone_type' => 'mobile',
'custom_fields' => [
[
'label' => '<string>',
'value' => [
]
]
]
]
],
'preview_id' => '<string>'
],
'owner_id' => '<string>',
'force_include' => [
'<string>'
]
]),
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://client-api.salesfinity.co/v2/sequencer/enrollment-runs"
payload := strings.NewReader("{\n \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\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://client-api.salesfinity.co/v2/sequencer/enrollment-runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.salesfinity.co/v2/sequencer/enrollment-runs")
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 \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run_id": "enroll_1a2b3c4d",
"status": "queued",
"sequence": "507f1f77bcf86cd799439011",
"total": 123,
"processed": 123,
"enrolled": 123,
"skipped_count": 123,
"held_count": 123,
"truncated": true,
"sample_skipped": [
{}
],
"error": "<string>",
"finished_at": "2023-11-07T05:31:56Z"
}{
"message": [
"limit must not be greater than 100"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Too many requests",
"error": "Too Many Requests",
"statusCode": 429
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500
}Start an enrolment run
Queues up to 5000 prospects and returns immediately with a run_id. Poll the run for progress. Validation of the sequence, the owner and the source happens before queueing, so a 4xx means the request was wrong rather than that enrolment failed halfway.
curl --request POST \
--url https://client-api.salesfinity.co/v2/sequencer/enrollment-runs \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"user_id": "507f1f77bcf86cd799439011",
"sequence": "<string>",
"source": {
"contacts": [
"<string>"
],
"contact_list": "<string>",
"prospects": [
{
"contact": "<string>",
"email": "<string>",
"linkedin_username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"account": "<string>",
"title": "<string>",
"timezone": "<string>",
"phone_number": "<string>",
"phone_type": "mobile",
"custom_fields": [
{
"label": "<string>",
"value": {}
}
]
}
],
"preview_id": "<string>"
},
"owner_id": "<string>",
"force_include": [
"<string>"
]
}
'import requests
url = "https://client-api.salesfinity.co/v2/sequencer/enrollment-runs"
payload = {
"user_id": "507f1f77bcf86cd799439011",
"sequence": "<string>",
"source": {
"contacts": ["<string>"],
"contact_list": "<string>",
"prospects": [
{
"contact": "<string>",
"email": "<string>",
"linkedin_username": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"account": "<string>",
"title": "<string>",
"timezone": "<string>",
"phone_number": "<string>",
"phone_type": "mobile",
"custom_fields": [
{
"label": "<string>",
"value": {}
}
]
}
],
"preview_id": "<string>"
},
"owner_id": "<string>",
"force_include": ["<string>"]
}
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({
user_id: '507f1f77bcf86cd799439011',
sequence: '<string>',
source: {
contacts: ['<string>'],
contact_list: '<string>',
prospects: [
{
contact: '<string>',
email: '<string>',
linkedin_username: '<string>',
first_name: '<string>',
last_name: '<string>',
account: '<string>',
title: '<string>',
timezone: '<string>',
phone_number: '<string>',
phone_type: 'mobile',
custom_fields: [{label: '<string>', value: {}}]
}
],
preview_id: '<string>'
},
owner_id: '<string>',
force_include: ['<string>']
})
};
fetch('https://client-api.salesfinity.co/v2/sequencer/enrollment-runs', 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://client-api.salesfinity.co/v2/sequencer/enrollment-runs",
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([
'user_id' => '507f1f77bcf86cd799439011',
'sequence' => '<string>',
'source' => [
'contacts' => [
'<string>'
],
'contact_list' => '<string>',
'prospects' => [
[
'contact' => '<string>',
'email' => '<string>',
'linkedin_username' => '<string>',
'first_name' => '<string>',
'last_name' => '<string>',
'account' => '<string>',
'title' => '<string>',
'timezone' => '<string>',
'phone_number' => '<string>',
'phone_type' => 'mobile',
'custom_fields' => [
[
'label' => '<string>',
'value' => [
]
]
]
]
],
'preview_id' => '<string>'
],
'owner_id' => '<string>',
'force_include' => [
'<string>'
]
]),
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://client-api.salesfinity.co/v2/sequencer/enrollment-runs"
payload := strings.NewReader("{\n \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\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://client-api.salesfinity.co/v2/sequencer/enrollment-runs")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://client-api.salesfinity.co/v2/sequencer/enrollment-runs")
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 \"user_id\": \"507f1f77bcf86cd799439011\",\n \"sequence\": \"<string>\",\n \"source\": {\n \"contacts\": [\n \"<string>\"\n ],\n \"contact_list\": \"<string>\",\n \"prospects\": [\n {\n \"contact\": \"<string>\",\n \"email\": \"<string>\",\n \"linkedin_username\": \"<string>\",\n \"first_name\": \"<string>\",\n \"last_name\": \"<string>\",\n \"account\": \"<string>\",\n \"title\": \"<string>\",\n \"timezone\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"phone_type\": \"mobile\",\n \"custom_fields\": [\n {\n \"label\": \"<string>\",\n \"value\": {}\n }\n ]\n }\n ],\n \"preview_id\": \"<string>\"\n },\n \"owner_id\": \"<string>\",\n \"force_include\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"run_id": "enroll_1a2b3c4d",
"status": "queued",
"sequence": "507f1f77bcf86cd799439011",
"total": 123,
"processed": 123,
"enrolled": 123,
"skipped_count": 123,
"held_count": 123,
"truncated": true,
"sample_skipped": [
{}
],
"error": "<string>",
"finished_at": "2023-11-07T05:31:56Z"
}{
"message": [
"limit must not be greater than 100"
],
"error": "Bad Request",
"statusCode": 400
}{
"message": "Forbidden resource",
"error": "Forbidden",
"statusCode": 403
}{
"message": "Too many requests",
"error": "Too Many Requests",
"statusCode": 429
}{
"message": "Internal server error",
"error": "Internal Server Error",
"statusCode": 500
}run_id. Poll the run for progress. Validation of the sequence, the owner and the source happens before queueing, so a 4xx means the request was wrong rather than that enrolment failed halfway.Authorizations
Team-scoped API key generated in the Salesfinity dashboard under Settings -> Connections & API. A missing or invalid key returns HTTP 403.
Body
The team member this call acts as. Must be an active member of the team the API key belongs to.
"507f1f77bcf86cd799439011"
The sequence to enrol into.
Show child attributes
Show child attributes
Who owns the resulting enrollments. Defaults to user_id.
Prospect keys from a preview to add despite a rule blocking them. They are held for approval, not waved through.
Response
Success.
A background enrolment.
"enroll_1a2b3c4d"
queued, fetching, running, completed, failed, cancelled 24-character hexadecimal id.
"507f1f77bcf86cd799439011"
A sample of refusals with reasons.