Skip to main content
GET
/
v1
/
sending
/
batches
/
{batchId}
Node.js SDK
import Migma from 'migma';

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.sending.getBatchStatus('BATCH_ID');
{
  "success": true,
  "data": {
    "batchId": "<string>",
    "status": "queued",
    "recipientType": "audience",
    "recipientId": "<string>",
    "provider": "<string>",
    "totalCount": 123,
    "queuedCount": 123,
    "sentCount": 123,
    "failedCount": 123,
    "from": "<string>",
    "fromName": "<string>",
    "subject": "<string>",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "error": "<string>"
  },
  "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

batchId
string
required

Batch ID returned from send email

Response

Batch status

success
boolean
required
data
object
error
string | null