Enroll contacts into a sequence
Per-contact outcomes are reported in enrolled[], skipped[] and errors[] under a 200. A contact that already has a live enrollment is skipped, never reset: resetting would resend step 1 to someone in the middle of the drip. The sequence must be active.
Authentication
The following security requirement applies to this operation.
Read the authentication guideParameters
sequenceIdpathrequiredsequenceIdstringrequiredOriginal schema
{
"type": "string"
}Request body
Bodyobjectrequired
- required
[ "contactIds" ]
contactIdsarrayrequired
Ids of the contacts to enroll. Duplicates are de-duplicated.
- example
[ "c1d2e3f4a5b6c7d8e9f0a1b2" ]
Array itemstringchannelIdsarray
Ids of the usable channels - it is a FILTER, not a list matched to contacts. For each contact the first channel in this list that BELONGS TO that contact is chosen; if none belongs, that contact is reported inside errors[]. If omitted, channel selection is left to send time.
Array itemstringOriginal schema
{
"$ref": "#/components/schemas/EnrollContactsDto"
}Responses
Status codes and shapes declared for this operation. Read each description for the meaning of that response.
200Response schema
Response 200object
- required
[ "success", "enrolled", "skipped", "errors" ]
successbooleanrequired- enum
[ true ]
enrolledarrayrequired
Array itemobject
- required
[ "id", "sequenceId", "contactId", "channelId", "status", "currentStepOrder", "nextRunAt", "lastStepAt", "exitReason", "exitedAt", "createdAt", "updatedAt" ]
idstringrequired- example
a1b2c3d4e5f6a7b8c9d0e1f2
sequenceIdstringrequired- example
b1c2d3e4f5a6b7c8d9e0f1a2
contactIdstringrequired- example
c1d2e3f4a5b6c7d8e9f0a1b2
channelIdstringrequiredThe conversation address of this enrollment. If null, the channel was not chosen at enrollment time; it is chosen at send time.
- nullable
true
statusstringrequired- enum
[ "active", "completed", "exited", "paused" ]- example
active
currentStepOrdernumberrequiredOrder of the NEXT step - not of the one already done.
- minimum
1
nextRunAtstringrequiredDue time of the currentStepOrder step. On an active enrollment it is ALWAYS filled; on a completed/exited enrollment it is ALWAYS null (database constraint).
- format
date-time- nullable
true
lastStepAtstringrequiredThe moment of the step most recently COMPLETED by the durable worker.
- format
date-time- nullable
true
exitReasonstringrequiredALWAYS filled together with status=exited, otherwise ALWAYS null. In addition to a manual exit, the worker can write the replied/unsubscribed/blocked/no_channel/failed reasons.
- enum
[ "manual", "replied", "unsubscribed", "blocked", "no_channel", "failed" ]- nullable
true
exitedAtstringrequired- format
date-time- nullable
true
createdAtstringrequired- format
date-time
updatedAtstringrequired- format
date-time
skippedarrayrequired
Array itemobject
- required
[ "contactId", "code", "message" ]
contactIdstringrequired- example
c1d2e3f4a5b6c7d8e9f0a1b2
codestringrequired- example
already_enrolled
messagestringrequired- example
Contact is already enrolled in this sequence
enrollmentIdstringId of the already existing enrollment; filled only for already_enrolled.
errorsarrayrequired
Array itemobject
- required
[ "contactId", "code", "message" ]
contactIdstringrequired- example
c1d2e3f4a5b6c7d8e9f0a1b2
codestringrequired- example
contact_not_found
messagestringrequired- example
No contact found with id 'c1d2e3f4a5b6c7d8e9f0a1b2'
Original schema
{
"$ref": "#/components/schemas/EnrollContactsResponseDto"
}400Response schema
Response 400object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}401Authentication failed
Authentication failed
Response 401object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}403Permission denied
Permission denied
Response 403object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}404Response schema
Response 404object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}409Response schema
Response 409object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}429Rate limit exceeded
Rate limit exceeded
Response 429object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Response headers
X-RateLimit-Limit
Request ceiling that applied to this request. Authenticated requests use the team tier ceiling; unauthenticated identity endpoints use a per-IP ceiling. Usage is measured continuously against a trailing period rather than tallied and cleared at a boundary, so the full ceiling never becomes available again in one step.
X-RateLimit-Limitinteger- minimum
1
Original schema
{
"type": "integer",
"minimum": 1
}X-RateLimit-Remaining
Requests still allowed against that ceiling; never negative. On a 429 produced by the request throttler this is 0. Such a refused request is not counted, so retrying too early costs you no capacity and does not push your recovery further away.
X-RateLimit-Remaininginteger- minimum
0
Original schema
{
"type": "integer",
"minimum": 0
}X-RateLimit-Reset
Absolute Unix epoch time, in SECONDS, at which the current counting period turns over. This is NOT the number of seconds left: subtract the current time to obtain that. It is also NOT the moment your capacity returns: earlier usage keeps weighing on the ceiling across the turnover, so after a 429 wait for Retry-After instead, which is usually later than this value.
X-RateLimit-Resetinteger- format
int64- minimum
0
Original schema
{
"type": "integer",
"format": "int64",
"minimum": 0
}Retry-After
Seconds to wait before retrying. Always a positive integer delta (never an HTTP-date), at least 1. On a 429 from the request throttler it is the wait until your usage actually drops back under the ceiling; prefer it over any delay you compute from X-RateLimit-Reset.
Retry-Afterinteger- minimum
1- maximum
86400
Original schema
{
"type": "integer",
"minimum": 1,
"maximum": 86400
}500Server error
Server error
Response 500object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}502Platform error
Platform error
Response 502object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}503Service unavailable
Service unavailable
Response 503object
- required
[ "error", "type", "code", "docUrl", "requestId" ]
errorstringrequiredHuman-readable message. UNSTABLE — do not branch on it.
- example
WhatsApp session window expired; use a template message.
typestringrequiredStable error category (does not change across versions).
- enum
[ "invalid_request_error", "authentication_error", "permission_error", "not_found", "conflict", "rate_limit_error", "platform_error", "platform_rejected", "account_disconnected", "media_error", "api_error" ]- example
invalid_request_error
codestringrequiredStable machine-readable code.
- example
whatsapp_window_expired
paramstringOffending parameter, present only when relevant.
- example
body
docUrlstringrequiredhttps://docs.zumpo.io/errors/{code}
- example
https://docs.zumpo.io/errors/whatsapp_window_expired
requestIdstringrequiredSupport correlation id: req_ + 16 hex.
- example
req_7f3a9c2e1b8d4056
detailsobjectAdditional structured context, present only when an error has more to say than a single param can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.
- additionalProperties
true- example
{ "created": [ { "kind": "campaign", "platformId": "120210000000000001" }, { "kind": "adSet", "platformId": "120210000000000002" } ] }
Original schema
{
"$ref": "#/components/schemas/ZumpoErrorDto"
}Referenced schemas
Original local definitions used by this operation. Recursive and deeply nested references can be inspected here without expanding them repeatedly.
EnrollContactsDto
#/components/schemas/EnrollContactsDto
{
"type": "object",
"properties": {
"contactIds": {
"example": [
"c1d2e3f4a5b6c7d8e9f0a1b2"
],
"description": "Ids of the contacts to enroll. Duplicates are de-duplicated.",
"type": "array",
"items": {
"type": "string"
}
},
"channelIds": {
"description": "Ids of the usable channels - it is a FILTER, not a list matched to contacts. For each contact the first channel in this list that BELONGS TO that contact is chosen; if none belongs, that contact is reported inside errors[]. If omitted, channel selection is left to send time.",
"type": "array",
"items": {
"type": "string"
}
}
},
"required": [
"contactIds"
]
}EnrollContactsResponseDto
#/components/schemas/EnrollContactsResponseDto
{
"type": "object",
"properties": {
"success": {
"type": "boolean",
"enum": [
true
]
},
"enrolled": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SequenceEnrollmentDto"
}
},
"skipped": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SequenceEnrollmentSkipDto"
}
},
"errors": {
"type": "array",
"items": {
"$ref": "#/components/schemas/SequenceEnrollmentErrorDto"
}
}
},
"required": [
"success",
"enrolled",
"skipped",
"errors"
]
}SequenceEnrollmentDto
#/components/schemas/SequenceEnrollmentDto
{
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "a1b2c3d4e5f6a7b8c9d0e1f2"
},
"sequenceId": {
"type": "string",
"example": "b1c2d3e4f5a6b7c8d9e0f1a2"
},
"contactId": {
"type": "string",
"example": "c1d2e3f4a5b6c7d8e9f0a1b2"
},
"channelId": {
"type": "string",
"nullable": true,
"description": "The conversation address of this enrollment. If null, the channel was not chosen at enrollment time; it is chosen at send time."
},
"status": {
"type": "string",
"enum": [
"active",
"completed",
"exited",
"paused"
],
"example": "active"
},
"currentStepOrder": {
"type": "number",
"minimum": 1,
"description": "Order of the NEXT step - not of the one already done."
},
"nextRunAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "Due time of the currentStepOrder step. On an active enrollment it is ALWAYS filled; on a completed/exited enrollment it is ALWAYS null (database constraint)."
},
"lastStepAt": {
"type": "string",
"format": "date-time",
"nullable": true,
"description": "The moment of the step most recently COMPLETED by the durable worker."
},
"exitReason": {
"type": "string",
"enum": [
"manual",
"replied",
"unsubscribed",
"blocked",
"no_channel",
"failed"
],
"nullable": true,
"description": "ALWAYS filled together with status=exited, otherwise ALWAYS null. In addition to a manual exit, the worker can write the replied/unsubscribed/blocked/no_channel/failed reasons."
},
"exitedAt": {
"type": "string",
"format": "date-time",
"nullable": true
},
"createdAt": {
"type": "string",
"format": "date-time"
},
"updatedAt": {
"type": "string",
"format": "date-time"
}
},
"required": [
"id",
"sequenceId",
"contactId",
"channelId",
"status",
"currentStepOrder",
"nextRunAt",
"lastStepAt",
"exitReason",
"exitedAt",
"createdAt",
"updatedAt"
]
}SequenceEnrollmentSkipDto
#/components/schemas/SequenceEnrollmentSkipDto
{
"type": "object",
"properties": {
"contactId": {
"type": "string",
"example": "c1d2e3f4a5b6c7d8e9f0a1b2"
},
"code": {
"type": "string",
"example": "already_enrolled"
},
"message": {
"type": "string",
"example": "Contact is already enrolled in this sequence"
},
"enrollmentId": {
"type": "string",
"description": "Id of the already existing enrollment; filled only for already_enrolled."
}
},
"required": [
"contactId",
"code",
"message"
]
}SequenceEnrollmentErrorDto
#/components/schemas/SequenceEnrollmentErrorDto
{
"type": "object",
"properties": {
"contactId": {
"type": "string",
"example": "c1d2e3f4a5b6c7d8e9f0a1b2"
},
"code": {
"type": "string",
"example": "contact_not_found"
},
"message": {
"type": "string",
"example": "No contact found with id 'c1d2e3f4a5b6c7d8e9f0a1b2'"
}
},
"required": [
"contactId",
"code",
"message"
]
}ZumpoErrorDto
#/components/schemas/ZumpoErrorDto
{
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Human-readable message. UNSTABLE — do not branch on it.",
"example": "WhatsApp session window expired; use a template message."
},
"type": {
"type": "string",
"description": "Stable error category (does not change across versions).",
"enum": [
"invalid_request_error",
"authentication_error",
"permission_error",
"not_found",
"conflict",
"rate_limit_error",
"platform_error",
"platform_rejected",
"account_disconnected",
"media_error",
"api_error"
],
"example": "invalid_request_error"
},
"code": {
"type": "string",
"description": "Stable machine-readable code.",
"example": "whatsapp_window_expired"
},
"param": {
"type": "string",
"description": "Offending parameter, present only when relevant.",
"example": "body"
},
"docUrl": {
"type": "string",
"description": "https://docs.zumpo.io/errors/{code}",
"example": "https://docs.zumpo.io/errors/whatsapp_window_expired"
},
"requestId": {
"type": "string",
"description": "Support correlation id: req_ + 16 hex.",
"example": "req_7f3a9c2e1b8d4056"
},
"details": {
"type": "object",
"additionalProperties": true,
"description": "Additional structured context, present only when an error has more to say than a single `param` can carry. Values are generated by this API (identifiers, node names); provider text and raw upstream payloads are never placed here. Example: a multi-step ad create that fails part-way performs no compensating delete and returns what it already built, so the caller can attach to the surviving ad set instead of losing it.",
"example": {
"created": [
{
"kind": "campaign",
"platformId": "120210000000000001"
},
{
"kind": "adSet",
"platformId": "120210000000000002"
}
]
}
}
},
"required": [
"error",
"type",
"code",
"docUrl",
"requestId"
]
}