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

Path Parameters

id
string
required

Campaign ID

Body

application/json
scheduledAt
string<date-time>
required

ISO 8601 datetime for sending

scheduledTimezone
string

IANA timezone (e.g. America/New_York). Defaults to UTC.

localTimeDelivery
boolean

Send at the clock time of scheduledAt in scheduledTimezone, in each contact's own time zone, based on their country. Requires scheduledTimezone. Contacts without a country get it at scheduledAt. Countries with several time zones use their most populous one. Not available with A/B tests, batch sending or other providers (422). Omit to keep the campaign's current setting; false turns it off. Sending a scheduled campaign early sends to everyone at once.

localTimePassed
enum<string>

Only used with localTimeDelivery. Where the scheduled time has already passed in a contact's time zone when the plan is made: now sends to them right away, next_day sends at the same time the next day. Defaults to now. Omit to keep the campaign's saved choice.

Available options:
now,
next_day

Response

Campaign scheduled

success
boolean
required
data
object
error
string | null