Sequence imports
The Sequence imports endpoints of the Kenso API.
Preview a sequence from another tool
/v1/sequence-imports/previewssequence-imports.previewReads text (required, 1 to 50,000 characters) into proposed Kenso steps, in send order. Example: { "text": "Step 1 - LinkedIn connection request\n\nStep 2 - Email - 1 day later\nSubject: quick question\nHey {{firstName}}, ...", "source": "origami" }. source is optional: origami, lemlist, instantly, la_growth_machine or other.
How the text is read (parser): JSON (lemlist's sequences response, an Instantly campaign, or any array of step objects with a type or channel, a delay or wait, a subject and a body or message) and CSV with a header row that names those columns are read in code (structured). Anything else is free text, read by one model call (ai) that returns only the steps' structure and the lines that hold each subject and body; the copy is cut from your text, so it comes back exactly as written. Only placeholders change: {{firstName}}, {{first_name}} and the like become Kenso's variables for the step's channel ({company} on email, {companyName} on LinkedIn).
Each step has channel, stepType, waitDays (days after the previous step, 0 to 30), condition (none, accepted or not_accepted), waitFromCondition ("1 day after connecting" is accepted with waitFromCondition and waitDays 1), subject and body. "If no reply" needs no condition: Kenso stops every channel when the lead replies. A follow-up email that replies in the same thread has no subject.
warnings say what changed, each with a code, a message and the stepIndex it is about (null for a dropped step): steps Kenso cannot run (calls, manual tasks, SMS, WhatsApp) are dropped (unsupported_step) and their wait moves to the next step; an InMail becomes a message (in_mail); "if not accepted after N days" names N (not_accepted_days), which in Kenso is the campaign's notAcceptedAfterDays LinkedIn setting; a placeholder with no Kenso variable stays as written (unknown_variable). Waits round up to whole days and clamp to 0-30, and steps past 30 are dropped.
JSON and CSV cost nothing. Free text counts on the workspace's sequenceImportPreviews quota (30 an hour, 200 a day; past it, 429 quota_exceeded with Retry-After).
Errors:
- 400 validation_failed: text is blank or over 50,000 characters, or source is not one of the values above. - 422 no_steps_found: the text holds no step Kenso can run. - 429 quota_exceeded: the free-text quota is used up. - 503 provider_unavailable: the model that reads free text failed; try again, or paste CSV.
Requires Campaigns edit.
Parameters
YYYY-MM-DD form. 1.1 is another name for the first dated version. Leave it out to use your API key's pinned version. Keys created in the Kenso app are pinned to the newest version; keys minted by the CLI login are not. A key with no pinned version and no header gets the legacy shape where the path has one, and 404 where the path exists only in this version. A date that is not a version answers 400 unsupported_version; any other value that is not a version is treated as legacy.400 workspace_required. A workspace you are not a member of answers 404 not_found.Request body
application/json, optional.
The sequence and the tool it comes from.
origami, lemlist, instantly, la_growth_machine or other. Optional; it only helps read free text.Response 200
data is a SequenceImportPreview.
structured (JSON or CSV, read in code) or ai (free text, read by a model that returned only structure; the copy is cut from the text).curl -X POST "https://api.ken.so/v1/sequence-imports/previews" \
-H "Authorization: Bearer $KEN_API_KEY" \
-H "Ken-Version: 1.1" \
-H "X-Ken-Workspace-Id: $KEN_WORKSPACE_ID" \
-H "Content-Type: application/json" \
-d '{
"text": "string",
"source": "string"
}'{
"success": true,
"data": {
"steps": [
{
"channel": "string",
"stepType": "string",
"waitDays": 1,
"condition": "string",
"waitFromCondition": true,
"subject": "string",
"body": "string"
}
],
"warnings": [
{
"code": "string",
"message": "string",
"stepIndex": 1
}
],
"parser": "string"
}
}