Cohesive

API Documentation

Reference for the Cohesive outreach API endpoints.

Base URL

https://getcohesiveai.com/api

All endpoints are scoped to a campaign by its ID.

Authentication

All requests must include an API key in the x-api-key header.

x-api-key: your_api_key_here

Typical Workflow

Most integrations follow this pattern to read conversations and take action on them:

  1. 1

    Fetch your campaigns

    Call GET /api/campaigns to list all campaigns and note the id of the campaign you want to work with.

  2. 2

    Browse the inbox

    Use GET /api/{campaignId}/inbox/all or GET /api/{campaignId}/inbox/replies to see sent emails or replies. Each entry includes the leadEmail you will need for the next step.

  3. 3

    Get the full conversation

    Call GET /api/{campaignId}/conversation?leadEmail=... to retrieve the complete email thread. The history array contains every message with fields like id (message ID), statsId, time, and emailBody.

  4. 4

    Reply or forward

    Use the values from the conversation thread to build your payload. For POST /api/{campaignId}/reply, map the message's statsId -> originalEmailStatsId, id -> originalEmailMessageId, and so on. For POST /api/{campaignId}/forward, pass the statsId and id as messageId along with the toEmails you want to forward to.

Campaigns

GET/api/campaigns

Fetch all campaigns. Returns an array of campaign objects.

Response 200 OK

FieldTypeDescription
idstringCampaign ID
createdAtnumberCreation timestamp (ms)
updatedAtnumberLast updated timestamp (ms)
statusCampaignStatusCampaign status
creationStatusstringCreation workflow status
namestringCampaign name

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X GET \
  -H "x-api-key: your_api_key_here" \
  "https://getcohesiveai.com/api/campaigns"

Inbox

GET/api/{campaignId}/inbox/all

Fetch all sent emails for a campaign.

Query Parameters

NameTypeRequiredDescription
offsetnumberNoPagination offset
sortBystringNoSort order for results
searchstringNoSearch filter

Response 200 OK

FieldTypeDescription
leadEmailstringLead's email address
leadNamestringLead's display name
category"reply" | "sent"Conversation category
lastTimestampnumberTimestamp of the last message (ms)
isInterestedbooleanWhether the lead is marked as interested
taglinestringShort summary of the conversation
tagsstring[]Tags applied to the conversation

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X GET \
  -H "x-api-key: your_api_key_here" \
  "https://getcohesiveai.com/api/{campaignId}/inbox/all?offset=0&sortBy=date&search=acme"
GET/api/{campaignId}/inbox/replies

Fetch all replies for a campaign.

Query Parameters

NameTypeRequiredDescription
offsetnumberNoPagination offset
sortBystringNoSort order for results
searchstringNoSearch filter
isInterestedstringNoFilter by interest status ("true" / "false")

Response 200 OK

FieldTypeDescription
leadEmailstringLead's email address
leadNamestringLead's display name
category"reply" | "sent"Conversation category
lastTimestampnumberTimestamp of the last message (ms)
isInterestedbooleanWhether the lead is marked as interested
taglinestringShort summary of the conversation
tagsstring[]Tags applied to the conversation

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X GET \
  -H "x-api-key: your_api_key_here" \
  "https://getcohesiveai.com/api/{campaignId}/inbox/replies?offset=0&isInterested=true"
GET/api/{campaignId}/conversation

Fetch the full conversation history with a lead.

Query Parameters

NameTypeRequiredDescription
leadEmailstringYesEmail address of the lead

Response 200 OK

FieldTypeDescription
fromEmailstringSender email address
toEmailstringRecipient email address
historyCohesiveCampaignMessage[]Array of messages in the conversation

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X GET \
  -H "x-api-key: your_api_key_here" \
  "https://getcohesiveai.com/api/{campaignId}/conversation?leadEmail=jane@example.com"

Actions

POST/api/{campaignId}/reply

Send a reply to a conversation.

Request Body (JSON)

FieldTypeRequiredDescription
senderEmailstringYesEmail address of the sender
replyEmailBodystringYesHTML body of the reply
originalEmailStatsIdstringYesStats ID of the original email
originalEmailMessageIdstringYesMessage ID of the original email
originalEmailTimestringYesTimestamp of the original email
originalEmailBodystringYesBody of the original email
ccstring | nullNoCC recipients
bccstring | nullNoBCC recipients
leadEmailstringYesLead's email address
messageIdstringYesMessage ID for threading
attachmentsAttachment[]NoArray of { url, filename, contentType }

Response 200 OK

FieldTypeDescription
messagestringSuccess confirmation message

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X POST \
  "https://getcohesiveai.com/api/{campaignId}/reply" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "senderEmail": "you@company.com",
    "replyEmailBody": "<p>Thanks for your interest!</p>",
    "originalEmailStatsId": "stat_123",
    "originalEmailMessageId": "msg_456",
    "originalEmailTime": "2025-01-15T10:30:00Z",
    "originalEmailBody": "<p>Original message</p>",
    "cc": null,
    "bcc": null,
    "leadEmail": "jane@example.com",
    "messageId": "msg_789",
    "attachments": []
  }'
POST/api/{campaignId}/forward

Forward a conversation to other recipients.

Request Body (JSON)

FieldTypeRequiredDescription
senderEmailstringYesEmail address of the sender
leadEmailstringYesLead's email address
statsIdstringYesStats ID of the email to forward
ccstring | nullNoCC recipients
bccstring | nullNoBCC recipients
toEmailsstringYesComma-separated recipient email addresses
messageIdstringYesMessage ID for threading
attachmentsAttachment[]NoArray of { url, filename, contentType }

Response 200 OK

FieldTypeDescription
messagestringSuccess confirmation message

Error Response 4xx / 5xx

FieldTypeDescription
errorstringError message describing what went wrong
curl -X POST \
  "https://getcohesiveai.com/api/{campaignId}/forward" \
  -H "x-api-key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "senderEmail": "you@company.com",
    "leadEmail": "jane@example.com",
    "statsId": "stat_123",
    "cc": null,
    "bcc": null,
    "toEmails": "team@company.com,manager@company.com",
    "messageId": "msg_789",
    "attachments": []
  }'

Types

CampaignStatus

Enum of possible campaign statuses:

"DRAFTED""ACTIVE""COMPLETED""STOPPED""PAUSED""ARCHIVED"
Attachment
FieldTypeDescription
urlstringURL of the attachment file
filenamestringOriginal file name
contentTypestringMIME type (e.g. "application/pdf")
CohesiveCampaignMessage
FieldTypeDescription
typestringMessage type
idstringUnique message identifier
timestringTimestamp of the message
fromstringSender email address
tostringRecipient email address
emailBodystringHTML body of the email
subjectstringEmail subject line
emailSequenceNumberstring | nullSequence number in the campaign
openCountnumber | nullNumber of times the email was opened
clickCountnumber | nullNumber of link clicks
campaignIdstringAssociated campaign ID
statsIdstringStats tracking ID
ccstring[]CC recipients
bccstring[]BCC recipients
attachmentsAttachment[]File attachments