Skip to main content
POST
/
api
/
v2
/
agents
/
sequence
/
run
Sequence Agent
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": {
    "all": ""
  },
  "runtimeInstructions": {
    "all": ""
  },
  "playbookSelectionContext": "<string>",
  "customContext": {
    "playbook": {
      "oId": "<string>"
    },
    "product": {
      "oId": "<string>"
    },
    "service": {
      "oId": "<string>"
    },
    "persona": {
      "oId": "<string>"
    },
    "segment": {
      "oId": "<string>"
    }
  },
  "agentOId": "agent_123",
  "experimentOId": "experiment_123",
  "includeFullAnnotation": true
}
'
{
  "_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": ""
        }
      }
    ],
    "product": {
      "data": {
        "type": "PRODUCT",
        "internalName": "<string>",
        "summary": "<string>",
        "capabilities": [
          "Capability 1",
          "Capability 2"
        ],
        "differentiatedValue": [
          "Differentiated Value 1",
          "Differentiated Value 2"
        ],
        "statusQuo": [
          "Status Quo 1",
          "Status Quo 2"
        ],
        "challengesAddressed": [
          "Challenge 1",
          "Challenge 2"
        ],
        "customerBenefits": [
          "Benefit 1",
          "Benefit 2"
        ],
        "customFields": [
          {
            "title": "<string>",
            "value": [
              "<string>"
            ]
          }
        ]
      },
      "oId": "<string>",
      "name": "<string>",
      "internalName": "Product Internal Name",
      "description": "Product Description",
      "primaryUrl": "https://www.product.com",
      "qualifyingQuestions": [
        {
          "question": "<string>",
          "rationale": "<string>",
          "fitType": "GOOD",
          "weight": "MEDIUM",
          "archivedAt": "<string>"
        }
      ],
      "matchConfidence": "LOW",
      "matchAnalysis": "<string>"
    },
    "playbook": {
      "oId": "<string>",
      "name": "<string>",
      "description": "<string>",
      "type": "LEGACY",
      "keyInsight": [
        "<string>"
      ],
      "matchConfidence": "LOW",
      "matchAnalysis": "<string>"
    },
    "persona": {
      "oId": "<string>",
      "name": "<string>",
      "internalName": "Sally the Sales Leader",
      "qualifyingQuestions": [
        {
          "question": "<string>",
          "rationale": "<string>",
          "fitType": "GOOD",
          "weight": "MEDIUM",
          "archivedAt": "<string>"
        }
      ],
      "matchConfidence": "LOW",
      "matchAnalysis": "<string>"
    },
    "outputType": "SCOPED_PLAYBOOK",
    "annotations": {
      "annotations": [
        {
          "type": "<string>",
          "title": "<string>",
          "meta": null,
          "description": "<string>",
          "url": "<string>"
        }
      ],
      "metadata": null
    }
  }
}

Authorizations

api_key
string
header
required

Body

application/json

Generate emails input

email
string | null

Email of the person to generate emails for

Example:

"john.doe@example.com"

firstName
string | null

First name of the person to generate emails for

lastName
string | null
jobTitle
string | null

Job title of the person to generate emails for

companyDomain
string | null

Company domain of the person to generate emails for

Example:

"example.com"

companyName
string | null

Company name of the person to generate emails for

linkedInProfile
string | null

LinkedIn profile of the person to generate emails for

crmContactId
string | null
crmLeadId
string | null
crmAccountId
string | null
lang
string | null

Language of the person to generate emails for

requestId
string | null
outputFormat
enum<string> | null
default:text

Output format of the emails to generate

Available options:
text,
html,
markdown
runtimeContext
object

Runtime context of the person to generate emails for

runtimeInstructions
object

Runtime instructions of the person to generate emails for

playbookSelectionContext
string | null

Playbook selection context of the person to generate emails for

customContext
object
agentOId
string

AgentOId is required when creating an agent in the application. You can find it in the Agents section of your dashboard.

Example:

"agent_123"

experimentOId
string

ExperimentOId is required when running an experiment

Example:

"experiment_123"

includeFullAnnotation
boolean

If true, returns full annotation data including metadata. If false or omitted (default), returns minimal annotations to reduce response size.

Response

Generate emails successful

_metadata
object
required
found
boolean
required

Whether the operation was successful

Example:

true

message
string | null

Message

Example:

"Additional information"

data
object