Skip to main content
POST
/
v1
/
my
/
campaigns
/
{id}
/
send
Send a campaign
curl --request POST \
  --url https://api.nitrosend.com/v1/my/campaigns/{id}/send \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "trigger_attributes": {
    "event": "<string>",
    "contact_list_id": 123,
    "segment_id": 123,
    "data": {}
  },
  "template_attributes": {
    "subject": "<string>",
    "body": "<string>",
    "preheader": "<string>",
    "from_name": "<string>",
    "from_email": "jsmith@example.com",
    "reply_to": "jsmith@example.com",
    "design": {
      "sections": [
        {
          "type": "header",
          "props": {},
          "styles": {
            "background_color": "<string>",
            "padding": "<string>",
            "align": "left"
          }
        }
      ],
      "theme": {
        "brand_color": "<string>",
        "bg_color": "<string>",
        "text_color": "<string>",
        "font_body": "<string>",
        "font_heading": "<string>",
        "logo_url": "<string>"
      }
    }
  }
}
'
{
  "id": 123,
  "account_id": 123,
  "status": "draft",
  "approval_state": "<string>",
  "channel": "email",
  "name": "<string>",
  "data": {},
  "scheduled_at": "2023-11-07T05:31:56Z",
  "sent_count": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "trigger": {
    "id": 123,
    "flow_id": 123,
    "event": "<string>",
    "segment_id": 123,
    "contact_list_id": 123,
    "data": {},
    "triggered_count": 123,
    "last_triggered_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "template": {
    "id": 123,
    "name": "<string>",
    "flow_id": 123,
    "action_id": 123,
    "subject": "<string>",
    "body": "<string>",
    "preheader": "<string>",
    "from_name": "<string>",
    "from_email": "<string>",
    "reply_to": "<string>",
    "design": {
      "sections": [
        {
          "type": "header",
          "props": {},
          "styles": {
            "background_color": "<string>",
            "padding": "<string>",
            "align": "left"
          }
        }
      ],
      "theme": {
        "brand_color": "<string>",
        "bg_color": "<string>",
        "text_color": "<string>",
        "font_body": "<string>",
        "font_heading": "<string>",
        "logo_url": "<string>"
      }
    },
    "variables": {},
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  },
  "templates": [
    {
      "id": 123,
      "name": "<string>",
      "flow_id": 123,
      "action_id": 123,
      "subject": "<string>",
      "body": "<string>",
      "preheader": "<string>",
      "from_name": "<string>",
      "from_email": "<string>",
      "reply_to": "<string>",
      "design": {
        "sections": [
          {
            "type": "header",
            "props": {},
            "styles": {
              "background_color": "<string>",
              "padding": "<string>",
              "align": "left"
            }
          }
        ],
        "theme": {
          "brand_color": "<string>",
          "bg_color": "<string>",
          "text_color": "<string>",
          "font_body": "<string>",
          "font_heading": "<string>",
          "logo_url": "<string>"
        }
      },
      "variables": {},
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Authorizations

Authorization
string
header
required

API key (nskey_live_...) or JWT token. API key is checked first; if not found, falls back to Devise JWT authentication.

Path Parameters

id
integer
required

Body

application/json
trigger_attributes
object
template_attributes
object

Response

Campaign sent

id
integer
account_id
integer
status
enum<string>
Available options:
draft,
active,
paused,
completed
approval_state
string
channel
enum<string>
Available options:
email,
sms
name
string
data
object
scheduled_at
string<date-time> | null
sent_count
integer
created_at
string<date-time>
updated_at
string<date-time>
trigger
object
template
object
templates
object[]