draft status, giving you time to enroll leads and review sequence steps before sending. You can optionally supply one or more sequence steps at creation time, or add them later through the dashboard. Each step supports personalization tokens such as {{firstName}} and {{company}} to tailor copy to each recipient.
Authorization
All requests must include a Bearer token in theAuthorization header. You can find your API key in the Leadterra dashboard under Settings → API Keys.
Request Body
Display name for the campaign. Shown in the dashboard and included in API responses. For example,
"VP Sales - AI workflow".An ordered list of email steps that make up the campaign sequence. Each step is sent to enrolled leads in sequence. If omitted, the campaign is created with no steps and you can add them later.
Personalization Tokens
You can embed the following tokens anywhere insubject or bodyHtml. Leadterra replaces them with each lead’s data at send time.
| Token | Replaced with |
|---|---|
{{firstName}} | Lead’s first name |
{{company}} | Lead’s company name |
{{jobTitle}} | Lead’s job title |
{{email}} | Lead’s email address |
Example Request
Response Fields
Unique identifier for the newly created campaign (e.g.,
camp_123). Use this ID with the start, pause, and stats endpoints.The display name you supplied at creation.
Initial state of the campaign. Always
draft on creation.The sequence steps saved to the campaign.
ISO 8601 timestamp of when the campaign was created.
Example Response
Error Codes
| HTTP Status | Code | Meaning |
|---|---|---|
400 Bad Request | invalid_request | A required field is missing, a field value is the wrong type, or the request body is malformed JSON. |
401 Unauthorized | authentication_failed | The Authorization header is missing, malformed, or the key is invalid. |
404 Not Found | workspace_not_found | No workspace is associated with the provided API key. |