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

Optional key (max 100 chars) for safe retries. Same key + same body within 24h replays the original response (same status and body); same key + a different body returns 409 IDEMPOTENCY_CONFLICT. Scoped per API key.

Maximum string length: 100

Body

application/json
email
string<email>
required
projectId
string
required
firstName
string
lastName
string
phone
string

Phone number (free-form, max 30 chars)

Maximum string length: 30
country
string
language
string
tags
string[]
customFields
object
status
enum<string>

Contact subscription status. Defaults to subscribed.

Available options:
subscribed,
unsubscribed,
bounced,
non-subscribed

Response

Contact created

success
boolean
required
data
object
error
string | null