Skip to main content
POST
/
campaigns
/
{id}
/
send
Send or schedule campaign
curl --request POST \
  --url https://api.mailglyph.com/campaigns/{id}/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "scheduledFor": "2023-11-07T05:31:56Z"
}
'
{
  "success": true,
  "data": {
    "id": "<string>",
    "name": "<string>",
    "description": "<string>",
    "subject": "<string>",
    "body": "<string>",
    "from": "[email protected]",
    "fromName": "<string>",
    "replyTo": "[email protected]",
    "audienceCondition": {
      "groups": [
        {
          "filters": [
            {
              "field": "<string>",
              "value": "<unknown>"
            }
          ],
          "conditions": "<unknown>"
        }
      ]
    },
    "segmentId": "<string>",
    "totalRecipients": 123,
    "sentCount": 123,
    "deliveredCount": 123,
    "openedCount": 123,
    "clickedCount": 123,
    "bouncedCount": 123,
    "scheduledFor": "2023-11-07T05:31:56Z",
    "sentAt": "2023-11-07T05:31:56Z",
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "segment": {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "condition": {
        "groups": [
          {
            "filters": [
              {
                "field": "<string>",
                "value": "<unknown>"
              }
            ],
            "conditions": "<unknown>"
          }
        ]
      },
      "trackMembership": true,
      "memberCount": 123,
      "projectId": "<string>",
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  },
  "message": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.mailglyph.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

API Key authentication. Secret keys (sk_*) are required for all endpoints except /v1/track. Public keys (pk_*) only work with the /v1/track endpoint for client-side event tracking. Workspaces can have multiple active keys, and sender-domain operations enforce per-key domain scope when configured.

Path Parameters

id
string
required

Body

application/json
scheduledFor
string<date-time> | null

ISO 8601 timestamp for when to send the campaign. Omit or set to null for immediate send.

Response

200 - application/json

Campaign scheduled/sending

success
boolean
data
object
message
string