Skip to main content
POST
/
v1
/
campaigns
curl -X POST "https://api.getstrato.dev/v1/campaigns" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q1 Product Newsletter",
    "type": "newsletter",
    "audience": {
      "filters": {
        "tier": ["tier_1", "tier_2"],
        "specialty": ["cardiology"]
      }
    },
    "email": {
      "subject": "MedStrato Q1 Update: New Features for {{specialty}}",
      "from_name": "MedStrato Medical",
      "body_html": "<h1>Hello {{first_name}},</h1><p>Here are the latest updates...</p>"
    },
    "schedule": {
      "type": "scheduled",
      "send_at": "2024-02-01T09:00:00Z"
    }
  }'
{
  "data": {
    "id": "cmp_new456",
    "name": "Q1 Product Newsletter",
    "type": "newsletter",
    "status": "draft",
    "audience_count": 45,
    "email": {
      "subject": "MedStrato Q1 Update: New Features for {{specialty}}",
      "from_name": "MedStrato Medical"
    },
    "schedule": {
      "type": "scheduled",
      "send_at": "2024-02-01T09:00:00Z"
    },
    "created_at": "2024-01-20T14:30:00Z"
  }
}

Request Body

name
string
required
Campaign name
description
string
Campaign description
type
string
required
Campaign type. Options: product_update, event_invitation, new_product_launch, newsletter, custom
audience
object
required
email
object
required
products
array
Product IDs to link to this campaign
schedule
object

Personalization Variables

Use these variables in your email content:
VariableDescription
{{full_name}}Recipient’s full name
{{first_name}}Recipient’s first name
{{title}}Professional title
{{institution}}Institution name
{{specialty}}Primary specialty
curl -X POST "https://api.getstrato.dev/v1/campaigns" \
  -H "Authorization: Bearer sk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q1 Product Newsletter",
    "type": "newsletter",
    "audience": {
      "filters": {
        "tier": ["tier_1", "tier_2"],
        "specialty": ["cardiology"]
      }
    },
    "email": {
      "subject": "MedStrato Q1 Update: New Features for {{specialty}}",
      "from_name": "MedStrato Medical",
      "body_html": "<h1>Hello {{first_name}},</h1><p>Here are the latest updates...</p>"
    },
    "schedule": {
      "type": "scheduled",
      "send_at": "2024-02-01T09:00:00Z"
    }
  }'
{
  "data": {
    "id": "cmp_new456",
    "name": "Q1 Product Newsletter",
    "type": "newsletter",
    "status": "draft",
    "audience_count": 45,
    "email": {
      "subject": "MedStrato Q1 Update: New Features for {{specialty}}",
      "from_name": "MedStrato Medical"
    },
    "schedule": {
      "type": "scheduled",
      "send_at": "2024-02-01T09:00:00Z"
    },
    "created_at": "2024-01-20T14:30:00Z"
  }
}