Segment email sequences
The email sequence of one segment, with preview, test sends and saved versions.
Return the segment email sequence
/v1/segments/{segmentId}/email-sequencesegment-email-sequences.getParameters
400 workspace_required).Response 200
data is a EmailSequenceModel.
curl -X GET "https://api.ken.so/v1/segments/812/email-sequence" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": {
"id": 2210,
"campaignId": 4821,
"segmentId": 1207,
"name": "Engineering leaders",
"isActive": true,
"steps": [
{
"id": 8841,
"stepOrder": 1,
"variant": "a",
"subject": "Onboarding new engineers at {{company}}",
"body": "Hi {{first_name}},\n\nMost engineering teams lose a new hire's first two weeks to setup and access requests. We help teams like yours get that down to two days.\n\nWorth a 15-minute look next week?\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 0,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
},
{
"id": 8842,
"stepOrder": 2,
"variant": "a",
"subject": "",
"body": "Hi {{first_name}}, following up on this. Happy to send a 2-minute video instead if that is easier.\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 3,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
}
],
"createdAt": "2026-09-23T15:02:11Z",
"modifiedAt": "2026-10-14T09:41:27Z"
}
}Replace the segment email sequence
/v1/segments/{segmentId}/email-sequencesegment-email-sequences.replaceSame refusals as the campaign email sequence replace, link_reputation_blocked and the expectedModifiedAt check included.
Parameters
400 workspace_required).Request body
application/json, optional.
modifiedAt from your last read. When the live sequence changed since, the replace is refused with 409 conflict and detail code stale_write, so you do not overwrite someone else's edit.Response 200
data is a EmailSequenceModel.
curl -X PUT "https://api.ken.so/v1/segments/812/email-sequence" \
-H "Authorization: Bearer $KEN_API_KEY" \
-H "Ken-Version: 2026-11-02" \
-H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"isActive": true,
"steps": [
{
"id": 812,
"stepOrder": 1,
"variant": "string",
"name": "string",
"subject": "string",
"body": "string",
"bodyFormat": "string",
"waitDays": 1,
"isActive": true,
"openTrackingEnabled": true,
"handwrittenEnabled": true,
"handwrittenBackground": "string",
"handwrittenIntro": "string",
"studioTemplateVersionId": 812
}
],
"expectedModifiedAt": "2026-09-23T15:02:11Z"
}'{
"success": true,
"data": {
"id": 2210,
"campaignId": 4821,
"segmentId": 1207,
"name": "Engineering leaders",
"isActive": true,
"steps": [
{
"id": 8841,
"stepOrder": 1,
"variant": "a",
"subject": "Onboarding new engineers at {{company}}",
"body": "Hi {{first_name}},\n\nMost engineering teams lose a new hire's first two weeks to setup and access requests. We help teams like yours get that down to two days.\n\nWorth a 15-minute look next week?\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 0,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
},
{
"id": 8842,
"stepOrder": 2,
"variant": "a",
"subject": "",
"body": "Hi {{first_name}}, following up on this. Happy to send a 2-minute video instead if that is easier.\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 3,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
}
],
"createdAt": "2026-09-23T15:02:11Z",
"modifiedAt": "2026-10-14T09:41:27Z"
}
}Delete the segment email sequence
/v1/segments/{segmentId}/email-sequencesegment-email-sequences.deleteParameters
400 workspace_required).Response 204
curl -X DELETE "https://api.ken.so/v1/segments/812/email-sequence" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
HTTP/1.1 204 No Content
Preview the segment email sequence for one contact
/v1/segments/{segmentId}/email-sequence/previewsegment-email-sequences.previewPass contactId, or useRandom=true to preview a random contact of the segment; with neither the call is 400 validation_failed on contactId. senderEmailId works as on the campaign preview.
Parameters
senderEmailId: its names, signature and unsubscribe host fill the steps, and sender names it. An inbox that is not one of the campaign's, or none, previews from the first sender.400 workspace_required).Response 200
data is a EmailSequencePreviewModel.
curl -X GET "https://api.ken.so/v1/segments/812/email-sequence/preview" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": {
"steps": [
{
"stepNumber": 1,
"subject": "string",
"body": "string",
"waitDays": 1,
"variables": [
{
"name": "string",
"type": "string",
"value": "string",
"placeholder": "string"
}
],
"language": "string",
"mirrorSubject": "string",
"mirrorBody": "string",
"qaScore": 1
}
],
"contact": {
"id": 812,
"fullName": "string",
"company": "string",
"title": "string",
"email": "[email protected]"
},
"sender": {
"id": 812,
"email": "[email protected]",
"status": "string",
"warmupReputation": 1,
"healthScore": 0.5
},
"senders": [
{
"id": 812,
"email": "[email protected]",
"status": "string",
"warmupReputation": 1,
"healthScore": 0.5
}
]
}
}Send the segment email sequence to test recipients
/v1/segments/{segmentId}/email-sequence/test-sendsegment-email-sequences.test-sendThe recipient, sender and quota rules of the campaign test send apply.
Parameters
400 workspace_required).Request body
application/json, optional.
Response 200
data is a EmailSequenceTestSendModel.
curl -X POST "https://api.ken.so/v1/segments/812/email-sequence/test-send" \
-H "Authorization: Bearer $KEN_API_KEY" \
-H "Ken-Version: 2026-11-02" \
-H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"contactId": 812,
"targetEmails": "string",
"senderEmailId": 812,
"language": "string"
}'{
"success": true,
"data": {
"stepsSent": 1,
"emailsAttempted": 1,
"emailsSent": 1,
"sentTo": [
"string"
],
"failures": [
"string"
],
"notes": [
"string"
]
}
}List saved versions of a segment email sequence, newest first
/v1/segments/{segmentId}/email-sequence/versionssegment-email-sequences.list-versionslimit is 1 to 100 and defaults to 20. Requires ReadAccess.
Parameters
400 workspace_required).Response 200
data is a list of SequenceVersionModel. Each item has these fields. The response also carries pagination.
curl -X GET "https://api.ken.so/v1/segments/812/email-sequence/versions?limit=1" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": [
{
"id": 812,
"versionNumber": 1,
"createdAt": "2026-09-23T15:02:11Z",
"createdByUserId": 812,
"createdByEmail": "[email protected]",
"isRevert": true,
"revertedFromVersionId": 812,
"revertedFromVersionNumber": 1,
"revertedFromCreatedAt": "2026-09-23T15:02:11Z"
}
],
"pagination": {
"nextCursor": "eyJpZCI6ODE1fQ",
"hasMore": true,
"total": 1,
"isTotalCapped": true
}
}Save a new segment email sequence version
/v1/segments/{segmentId}/email-sequence/versionssegment-email-sequences.save-versionOmit steps to snapshot the live sequence. With sourceVersionId, omitted or empty steps keep that version's steps, and a non-empty list overlays them. A link the URL reputation check refuses is 400 validation_failed with one link_reputation_blocked detail per link (field, stepId, stepOrder, rule, url), as on the sequence replace. Requires SequenceEditAccess.
Parameters
400 workspace_required).Request body
application/json, optional.
Response 200
data is a EmailSequenceVersionSaveModel.
curl -X POST "https://api.ken.so/v1/segments/812/email-sequence/versions" \
-H "Authorization: Bearer $KEN_API_KEY" \
-H "Ken-Version: 2026-11-02" \
-H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"isActive": true,
"steps": [
{
"id": 812,
"stepOrder": 1,
"variant": "string",
"name": "string",
"subject": "string",
"body": "string",
"bodyFormat": "string",
"waitDays": 1,
"isActive": true,
"openTrackingEnabled": true,
"handwrittenEnabled": true,
"handwrittenBackground": "string",
"handwrittenIntro": "string",
"studioTemplateVersionId": 812
}
],
"sourceVersionId": 812
}'{
"success": true,
"data": {
"sequence": {
"id": 2210,
"campaignId": 4821,
"segmentId": 1207,
"name": "Engineering leaders",
"isActive": true,
"steps": [
{
"id": 8841,
"stepOrder": 1,
"variant": "a",
"subject": "Onboarding new engineers at {{company}}",
"body": "Hi {{first_name}},\n\nMost engineering teams lose a new hire's first two weeks to setup and access requests. We help teams like yours get that down to two days.\n\nWorth a 15-minute look next week?\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 0,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
},
{
"id": 8842,
"stepOrder": 2,
"variant": "a",
"subject": "",
"body": "Hi {{first_name}}, following up on this. Happy to send a 2-minute video instead if that is easier.\n\n{{sender_first_name}}",
"bodyFormat": "plain",
"waitDays": 3,
"isActive": true,
"openTrackingEnabled": false,
"handwrittenEnabled": false
}
],
"createdAt": "2026-09-23T15:02:11Z",
"modifiedAt": "2026-10-14T09:41:27Z"
},
"version": {
"id": 812,
"versionNumber": 1,
"createdAt": "2026-09-23T15:02:11Z",
"createdByUserId": 812,
"createdByEmail": "[email protected]",
"isRevert": true,
"revertedFromVersionId": 812,
"revertedFromVersionNumber": 1,
"revertedFromCreatedAt": "2026-09-23T15:02:11Z"
},
"versionWarning": "string"
}
}Return one segment email sequence version
/v1/segments/{segmentId}/email-sequence/versions/{versionId}segment-email-sequences.get-versionParameters
400 workspace_required).Response 200
data is a EmailSequenceVersionDetailModel.
curl -X GET "https://api.ken.so/v1/segments/812/email-sequence/versions/812" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": {
"id": 812,
"versionNumber": 1,
"createdAt": "2026-09-23T15:02:11Z",
"createdByUserId": 812,
"createdByEmail": "[email protected]",
"isRevert": true,
"revertedFromVersionId": 812,
"revertedFromVersionNumber": 1,
"revertedFromCreatedAt": "2026-09-23T15:02:11Z",
"snapshot": {
"schemaVersion": 1,
"name": "string",
"isActive": true,
"steps": [
{
"stepOrder": 1,
"variant": "string",
"name": "string",
"subject": "string",
"body": "string",
"bodyFormat": "string",
"waitDays": 1,
"isActive": true,
"handwrittenEnabled": true,
"handwrittenBackground": "string",
"handwrittenIntro": "string"
}
]
}
}
}Restore a segment email sequence to a saved version
/v1/segments/{segmentId}/email-sequence/versions/{versionId}/restoresegment-email-sequences.restore-versionA link the URL reputation check refuses is 400 validation_failed with one link_reputation_blocked detail per link; its field is steps.subject or steps.body and stepId is the live step the restore would overwrite. Requires SequenceEditAccess.
Parameters
400 workspace_required).Response 200
data is a SequenceRestoreModel.
curl -X POST "https://api.ken.so/v1/segments/812/email-sequence/versions/812/restore" \ -H "Authorization: Bearer $KEN_API_KEY" \ -H "Ken-Version: 2026-11-02" \ -H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID"
{
"success": true,
"data": {
"newVersionNumber": 1,
"versionWarning": "string"
}
}