curl --request POST \
--url https://app.octavehq.com/api/v2/agents/sequence/run \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"email": "john.doe@example.com",
"firstName": "<string>",
"lastName": "<string>",
"jobTitle": "<string>",
"companyDomain": "example.com",
"companyName": "<string>",
"linkedInProfile": "<string>",
"crmContactId": "<string>",
"crmLeadId": "<string>",
"crmAccountId": "<string>",
"lang": "<string>",
"requestId": "<string>",
"outputFormat": "text",
"runtimeContext": {
"1": "Reference her AWS SCA leadership role in the opening.",
"all": "Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances."
},
"runtimeInstructions": {
"1": "Lead with a specific personal detail — do not open with a generic intro.",
"all": "Keep emails under 150 words. Use a consultative tone, not salesy."
},
"playbookSelectionContext": "<string>",
"customContext": {
"persona": {
"oId": "pe_xxxxxxxxxxxxxxxxxxxxx"
},
"segment": {
"oId": "sg_xxxxxxxxxxxxxxxxxxxxx"
}
},
"fullSequenceMode": true,
"agentOId": "agent_123",
"experimentOId": "experiment_123",
"includeFullAnnotation": true
}
'import requests
url = "https://app.octavehq.com/api/v2/agents/sequence/run"
payload = {
"email": "john.doe@example.com",
"firstName": "<string>",
"lastName": "<string>",
"jobTitle": "<string>",
"companyDomain": "example.com",
"companyName": "<string>",
"linkedInProfile": "<string>",
"crmContactId": "<string>",
"crmLeadId": "<string>",
"crmAccountId": "<string>",
"lang": "<string>",
"requestId": "<string>",
"outputFormat": "text",
"runtimeContext": {
"1": "Reference her AWS SCA leadership role in the opening.",
"all": "Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances."
},
"runtimeInstructions": {
"1": "Lead with a specific personal detail — do not open with a generic intro.",
"all": "Keep emails under 150 words. Use a consultative tone, not salesy."
},
"playbookSelectionContext": "<string>",
"customContext": {
"persona": { "oId": "pe_xxxxxxxxxxxxxxxxxxxxx" },
"segment": { "oId": "sg_xxxxxxxxxxxxxxxxxxxxx" }
},
"fullSequenceMode": True,
"agentOId": "agent_123",
"experimentOId": "experiment_123",
"includeFullAnnotation": True
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
firstName: '<string>',
lastName: '<string>',
jobTitle: '<string>',
companyDomain: 'example.com',
companyName: '<string>',
linkedInProfile: '<string>',
crmContactId: '<string>',
crmLeadId: '<string>',
crmAccountId: '<string>',
lang: '<string>',
requestId: '<string>',
outputFormat: 'text',
runtimeContext: {
'1': 'Reference her AWS SCA leadership role in the opening.',
all: 'Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.'
},
runtimeInstructions: {
'1': 'Lead with a specific personal detail — do not open with a generic intro.',
all: 'Keep emails under 150 words. Use a consultative tone, not salesy.'
},
playbookSelectionContext: '<string>',
customContext: {
persona: {oId: 'pe_xxxxxxxxxxxxxxxxxxxxx'},
segment: {oId: 'sg_xxxxxxxxxxxxxxxxxxxxx'}
},
fullSequenceMode: true,
agentOId: 'agent_123',
experimentOId: 'experiment_123',
includeFullAnnotation: true
})
};
fetch('https://app.octavehq.com/api/v2/agents/sequence/run', 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://app.octavehq.com/api/v2/agents/sequence/run",
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([
'email' => 'john.doe@example.com',
'firstName' => '<string>',
'lastName' => '<string>',
'jobTitle' => '<string>',
'companyDomain' => 'example.com',
'companyName' => '<string>',
'linkedInProfile' => '<string>',
'crmContactId' => '<string>',
'crmLeadId' => '<string>',
'crmAccountId' => '<string>',
'lang' => '<string>',
'requestId' => '<string>',
'outputFormat' => 'text',
'runtimeContext' => [
'1' => 'Reference her AWS SCA leadership role in the opening.',
'all' => 'Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.'
],
'runtimeInstructions' => [
'1' => 'Lead with a specific personal detail — do not open with a generic intro.',
'all' => 'Keep emails under 150 words. Use a consultative tone, not salesy.'
],
'playbookSelectionContext' => '<string>',
'customContext' => [
'persona' => [
'oId' => 'pe_xxxxxxxxxxxxxxxxxxxxx'
],
'segment' => [
'oId' => 'sg_xxxxxxxxxxxxxxxxxxxxx'
]
],
'fullSequenceMode' => true,
'agentOId' => 'agent_123',
'experimentOId' => 'experiment_123',
'includeFullAnnotation' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.octavehq.com/api/v2/agents/sequence/run"
payload := strings.NewReader("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.octavehq.com/api/v2/agents/sequence/run")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/agents/sequence/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"found": true,
"message": "Additional information",
"data": {
"emails": [
{
"email": "<string>",
"subject": "<string>",
"coreValueProp": "",
"sections": {
"greeting": "",
"opening": "",
"body": "",
"closing": "",
"cta": "",
"ps": "",
"signature": ""
},
"metadata": {
"openerPattern": "<string>",
"hookTopic": "<string>",
"ctaVerb": "<string>",
"valuePropsUsed": [
"<string>"
],
"referencesUsed": [
"<string>"
]
}
}
],
"product": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"service": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"solution": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"playbook": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"persona": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"useCases": [
{
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
}
],
"referenceCustomers": [
{
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
}
],
"annotations": {
"annotations": [
{
"type": "<string>",
"title": "<string>",
"meta": null,
"description": "<string>",
"url": "<string>"
}
],
"metadata": null
}
}
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Sequence Agent
Provide either agentOId or experimentOId depending on what you want to run.
- Use
agentOIdto run a specific agent. - Use
experimentOIdto run a specific experiment. Only one of them should be set at a time.
curl --request POST \
--url https://app.octavehq.com/api/v2/agents/sequence/run \
--header 'Content-Type: application/json' \
--header 'api_key: <api-key>' \
--data '
{
"email": "john.doe@example.com",
"firstName": "<string>",
"lastName": "<string>",
"jobTitle": "<string>",
"companyDomain": "example.com",
"companyName": "<string>",
"linkedInProfile": "<string>",
"crmContactId": "<string>",
"crmLeadId": "<string>",
"crmAccountId": "<string>",
"lang": "<string>",
"requestId": "<string>",
"outputFormat": "text",
"runtimeContext": {
"1": "Reference her AWS SCA leadership role in the opening.",
"all": "Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances."
},
"runtimeInstructions": {
"1": "Lead with a specific personal detail — do not open with a generic intro.",
"all": "Keep emails under 150 words. Use a consultative tone, not salesy."
},
"playbookSelectionContext": "<string>",
"customContext": {
"persona": {
"oId": "pe_xxxxxxxxxxxxxxxxxxxxx"
},
"segment": {
"oId": "sg_xxxxxxxxxxxxxxxxxxxxx"
}
},
"fullSequenceMode": true,
"agentOId": "agent_123",
"experimentOId": "experiment_123",
"includeFullAnnotation": true
}
'import requests
url = "https://app.octavehq.com/api/v2/agents/sequence/run"
payload = {
"email": "john.doe@example.com",
"firstName": "<string>",
"lastName": "<string>",
"jobTitle": "<string>",
"companyDomain": "example.com",
"companyName": "<string>",
"linkedInProfile": "<string>",
"crmContactId": "<string>",
"crmLeadId": "<string>",
"crmAccountId": "<string>",
"lang": "<string>",
"requestId": "<string>",
"outputFormat": "text",
"runtimeContext": {
"1": "Reference her AWS SCA leadership role in the opening.",
"all": "Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances."
},
"runtimeInstructions": {
"1": "Lead with a specific personal detail — do not open with a generic intro.",
"all": "Keep emails under 150 words. Use a consultative tone, not salesy."
},
"playbookSelectionContext": "<string>",
"customContext": {
"persona": { "oId": "pe_xxxxxxxxxxxxxxxxxxxxx" },
"segment": { "oId": "sg_xxxxxxxxxxxxxxxxxxxxx" }
},
"fullSequenceMode": True,
"agentOId": "agent_123",
"experimentOId": "experiment_123",
"includeFullAnnotation": True
}
headers = {
"api_key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {api_key: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: 'john.doe@example.com',
firstName: '<string>',
lastName: '<string>',
jobTitle: '<string>',
companyDomain: 'example.com',
companyName: '<string>',
linkedInProfile: '<string>',
crmContactId: '<string>',
crmLeadId: '<string>',
crmAccountId: '<string>',
lang: '<string>',
requestId: '<string>',
outputFormat: 'text',
runtimeContext: {
'1': 'Reference her AWS SCA leadership role in the opening.',
all: 'Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.'
},
runtimeInstructions: {
'1': 'Lead with a specific personal detail — do not open with a generic intro.',
all: 'Keep emails under 150 words. Use a consultative tone, not salesy.'
},
playbookSelectionContext: '<string>',
customContext: {
persona: {oId: 'pe_xxxxxxxxxxxxxxxxxxxxx'},
segment: {oId: 'sg_xxxxxxxxxxxxxxxxxxxxx'}
},
fullSequenceMode: true,
agentOId: 'agent_123',
experimentOId: 'experiment_123',
includeFullAnnotation: true
})
};
fetch('https://app.octavehq.com/api/v2/agents/sequence/run', 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://app.octavehq.com/api/v2/agents/sequence/run",
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([
'email' => 'john.doe@example.com',
'firstName' => '<string>',
'lastName' => '<string>',
'jobTitle' => '<string>',
'companyDomain' => 'example.com',
'companyName' => '<string>',
'linkedInProfile' => '<string>',
'crmContactId' => '<string>',
'crmLeadId' => '<string>',
'crmAccountId' => '<string>',
'lang' => '<string>',
'requestId' => '<string>',
'outputFormat' => 'text',
'runtimeContext' => [
'1' => 'Reference her AWS SCA leadership role in the opening.',
'all' => 'Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.'
],
'runtimeInstructions' => [
'1' => 'Lead with a specific personal detail — do not open with a generic intro.',
'all' => 'Keep emails under 150 words. Use a consultative tone, not salesy.'
],
'playbookSelectionContext' => '<string>',
'customContext' => [
'persona' => [
'oId' => 'pe_xxxxxxxxxxxxxxxxxxxxx'
],
'segment' => [
'oId' => 'sg_xxxxxxxxxxxxxxxxxxxxx'
]
],
'fullSequenceMode' => true,
'agentOId' => 'agent_123',
'experimentOId' => 'experiment_123',
'includeFullAnnotation' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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://app.octavehq.com/api/v2/agents/sequence/run"
payload := strings.NewReader("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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://app.octavehq.com/api/v2/agents/sequence/run")
.header("api_key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.octavehq.com/api/v2/agents/sequence/run")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["api_key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"john.doe@example.com\",\n \"firstName\": \"<string>\",\n \"lastName\": \"<string>\",\n \"jobTitle\": \"<string>\",\n \"companyDomain\": \"example.com\",\n \"companyName\": \"<string>\",\n \"linkedInProfile\": \"<string>\",\n \"crmContactId\": \"<string>\",\n \"crmLeadId\": \"<string>\",\n \"crmAccountId\": \"<string>\",\n \"lang\": \"<string>\",\n \"requestId\": \"<string>\",\n \"outputFormat\": \"text\",\n \"runtimeContext\": {\n \"1\": \"Reference her AWS SCA leadership role in the opening.\",\n \"all\": \"Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances.\"\n },\n \"runtimeInstructions\": {\n \"1\": \"Lead with a specific personal detail — do not open with a generic intro.\",\n \"all\": \"Keep emails under 150 words. Use a consultative tone, not salesy.\"\n },\n \"playbookSelectionContext\": \"<string>\",\n \"customContext\": {\n \"persona\": {\n \"oId\": \"pe_xxxxxxxxxxxxxxxxxxxxx\"\n },\n \"segment\": {\n \"oId\": \"sg_xxxxxxxxxxxxxxxxxxxxx\"\n }\n },\n \"fullSequenceMode\": true,\n \"agentOId\": \"agent_123\",\n \"experimentOId\": \"experiment_123\",\n \"includeFullAnnotation\": true\n}"
response = http.request(request)
puts response.read_body{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"found": true,
"message": "Additional information",
"data": {
"emails": [
{
"email": "<string>",
"subject": "<string>",
"coreValueProp": "",
"sections": {
"greeting": "",
"opening": "",
"body": "",
"closing": "",
"cta": "",
"ps": "",
"signature": ""
},
"metadata": {
"openerPattern": "<string>",
"hookTopic": "<string>",
"ctaVerb": "<string>",
"valuePropsUsed": [
"<string>"
],
"referencesUsed": [
"<string>"
]
}
}
],
"product": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"service": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"solution": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"playbook": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"persona": {
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
},
"useCases": [
{
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
}
],
"referenceCustomers": [
{
"oId": "<string>",
"name": "<string>",
"description": "<string>",
"matchAnalysis": "<string>"
}
],
"annotations": {
"annotations": [
{
"type": "<string>",
"title": "<string>",
"meta": null,
"description": "<string>",
"url": "<string>"
}
],
"metadata": null
}
}
}{
"_metadata": {
"requestId": "requestId",
"timestamp": "2021-01-01T00:00:00.000Z",
"usage": 0,
"message": "message"
},
"message": "<string>"
}Runtime Context & Instructions
The API usesruntimeContext and runtimeInstructions to pass dynamic per-contact data to your agent at execution time. These are not the same fields as the MCP tool schema (which uses allEmailsContext / allEmailsInstructions).
| MCP Tool Field | API Field |
|---|---|
allEmailsContext | runtimeContext.all |
allEmailsInstructions | runtimeInstructions.all |
step1Context | runtimeContext.1 |
step1Instructions | runtimeInstructions.1 |
How keys work
BothruntimeContext and runtimeInstructions accept an object where keys control which email steps receive the content:
| Key | Scope |
|---|---|
"all" | Applied to every email in the sequence |
"1" | Applied to step 1 only |
"2" | Applied to step 2 only |
"3" | Applied to step 3 only |
"4" | Applied to step 4 only |
"all" — they don’t replace it. Use "all" when you have one block of context for the whole sequence (which is the most common case).
Context vs Instructions
runtimeContext— Factual information the agent should draw from: account research, LinkedIn data, recent activity, deal context. Think of this as “what the agent knows about this person.”runtimeInstructions— Behavioral directives that steer how the agent writes: tone, length, what to emphasize, what to avoid. Think of this as “how the agent should write.”
Example: Event follow-up with rich context
{
"agentOId": "ca_JxNickJCXUdxFQe2CFKCF",
"outputFormat": "text",
"firstName": "Sarah",
"lastName": "Jackson",
"companyName": "NICE Ltd",
"companyDomain": "nice.com",
"jobTitle": "Strategic Alliance Director",
"email": "sarah.jackson@nice.com",
"linkedInProfile": "https://www.linkedin.com/in/sarah-jackson-nice",
"runtimeContext": {
"all": "ACCOUNT RESEARCH:\nNICE Ltd expanded their AI partner program from 25 to 200 partners in 18 months. Sarah led the AWS SCA partnership and drove the partner enablement strategy.\n\nEVENT ATTENDANCE:\nAttended Partner Signal Live on 2025-03-15. Participated in the 'Scaling Partner-Led Growth' breakout session.\n\nLINKEDIN CONTEXT:\n12 years in strategic alliances. Previously at Genesys building channel programs. Posts frequently about partner ecosystem strategy."
},
"runtimeInstructions": {
"all": "Keep emails under 150 words. Reference specific details from the event and her LinkedIn background. Use a peer-to-peer tone — she's a senior alliances leader, not a prospect to be pitched.",
"1": "Lead with a specific detail from the event breakout session she attended. Do not use a generic 'thanks for attending' opener."
}
}
Example: Simple context (all steps)
If you only need one block of context for the whole sequence, use the"all" key:
{
"agentOId": "YOUR_AGENT_OID",
"firstName": "Alex",
"lastName": "Chen",
"companyName": "Datadog",
"jobTitle": "VP Engineering",
"email": "alex.chen@datadoghq.com",
"outputFormat": "text",
"runtimeContext": {
"all": "Datadog recently announced a new AI observability product. Alex's team is responsible for the core monitoring platform and has been hiring for ML engineers."
}
}
Authorizations
Body
Generate emails input
Email of the person to generate emails for
"john.doe@example.com"
First name of the person to generate emails for
Job title of the person to generate emails for
Company domain of the person to generate emails for
"example.com"
Company name of the person to generate emails for
LinkedIn profile of the person to generate emails for
Language of the person to generate emails for
Output format of the emails to generate
text, html, markdown, null Additional context (facts, research, account data) injected at runtime to personalize the generated sequence. Keys control which email steps receive the context: "all" applies to every email, "1"-"4" apply to a specific step (1-based index). Step-specific context is merged with the "all" context.
Show child attributes
Show child attributes
{ "1": "Reference her AWS SCA leadership role in the opening.", "all": "Account research: NICE Ltd expanded their AI partner program from 25 to 200 partners. Sarah leads strategic alliances." }
Behavioral directives that control how the agent writes the sequence — tone, structure, emphasis, constraints. Keys work the same way as runtimeContext: "all" applies to every email, "1"-"4" apply to a specific step (1-based index). Use runtimeInstructions for writing style directives. Use runtimeContext for factual data.
Show child attributes
Show child attributes
{ "1": "Lead with a specific personal detail — do not open with a generic intro.", "all": "Keep emails under 150 words. Use a consultative tone, not salesy." }
Playbook selection context of the person to generate emails for
Pins specific library entities for this run, overriding the agent's configured selection. Each field takes the oId of an entity in your workspace, and that exact entity is used with no re-matching. On motion agents, playbook.oId must be an active motion playbook; if the agent is configured with a specific motion, the playbook must belong to that motion or the request fails with a 400. product/service pin the offering unless the resolved motion playbook supplies its own (reported as a run warning).
Show child attributes
Show child attributes
{ "persona": { "oId": "pe_xxxxxxxxxxxxxxxxxxxxx" }, "segment": { "oId": "sg_xxxxxxxxxxxxxxxxxxxxx" } }
AgentOId is required when creating an agent in the application. You can find it in the Agents section of your dashboard.
"agent_123"
ExperimentOId is required when running an experiment
"experiment_123"
If true, returns full annotation data including metadata. If false or omitted (default), returns minimal annotations to reduce response size.