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

const migma = new Migma('YOUR_API_KEY');

const { data, error } = await migma.campaigns.logs('CAMPAIGN_ID', {
  limit: 50,
  status: 'opened'
});
{
  "success": true,
  "data": {
    "emails": [
      {
        "to_email": "<string>",
        "subject": "<string>",
        "status": "<string>",
        "opened_at": "2023-11-07T05:31:56Z",
        "clicked_at": "2023-11-07T05:31:56Z",
        "open_count": 123,
        "click_count": 123,
        "bounce_type": "<string>",
        "complaint_type": "<string>",
        "campaign_id": "<string>",
        "created_at": "2023-11-07T05:31:56Z"
      }
    ],
    "nextCursor": "<string>",
    "hasMore": true
  },
  "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

Query Parameters

limit
integer

Number of rows to return (max 100).

Required range: 1 <= x <= 100
cursor
string

Opaque cursor from a previous response's nextCursor. Omit for the first page.

status
enum<string>

Filter by delivery or engagement status.

Available options:
delivered,
opened,
clicked,
bounced,
spam_report

Response

Campaign logs

success
boolean
required
data
object
error
string | null