Skip to main content
POST
Node.js SDK

Authorizations

Authorization
string
header
required

API key authentication. Use 'Authorization: Bearer YOUR_API_KEY' where YOUR_API_KEY is obtained from the Migma dashboard under Settings → Developers → API Keys.

Headers

Idempotency-Key
string
required

Required key of at most 100 characters. Same key and same body within 24 hours replays the created template, so no second one is made; same key with a different body after a success returns 409 IDEMPOTENCY_CONFLICT. Refusals are not stored, so after connecting Klaviyo or choosing an account, retry with the same key. Scoped per API key. Use a new key for a new template.

Maximum string length: 100

Path Parameters

conversationId
string
required

The conversation whose email is pushed

Body

application/json
emailId
string

One email of a series in this conversation. Omitted: the conversation's latest email, as the download exports.

Pattern: ^[0-9a-fA-F]{24}$
connectionId
string

Which of the brand's Klaviyo accounts to use. Required only when the brand has several; the 400 INTEGRATION_ACCOUNT_REQUIRED error lists them.

Pattern: ^[0-9a-fA-F]{24}$
name
string

Template name in Klaviyo. Defaults to the email's title.

Required string length: 1 - 255

Response

Template created in Klaviyo

success
boolean
required
data
object
Example:
error
string | null