Skip to main content
POST
/
v1
/
campaigns
/
{id}
/
schedule
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.campaigns.schedule('CAMPAIGN_ID', {
  scheduledAt: '2026-03-15T14:00:00Z',
  scheduledTimezone: 'America/New_York'
});
{
  "success": true,
  "data": {
    "id": "<string>",
    "projectId": "<string>",
    "name": "<string>",
    "conversationId": "<string>",
    "subject": "<string>",
    "preheaderText": "<string>",
    "from": "jsmith@example.com",
    "fromName": "<string>",
    "replyTo": "<string>",
    "recipientType": "audience",
    "recipientId": "<string>",
    "topicId": "<string>",
    "estimatedRecipients": 123,
    "providerType": "ses",
    "variables": {},
    "status": "draft",
    "scheduledAt": "2023-11-07T05:31:56Z",
    "scheduledTimezone": "<string>",
    "batchId": "<string>",
    "sentAt": "2023-11-07T05:31:56Z",
    "completedAt": "2023-11-07T05:31:56Z",
    "error": "<string>",
    "triggeredBy": "manual",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "error": "<string>"
}

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 → API Integration.

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.

Response

Campaign scheduled

success
boolean
required
data
object
error
string | null