Skip to main content
POST
/
v1
/
campaigns
Create a campaign
curl --request POST \
  --url https://app.loops.so/api/v1/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "campaignGroupId": "<string>",
  "mailingListId": {},
  "audienceSegmentId": {},
  "audienceFilter": {},
  "scheduling": {
    "method": "<string>",
    "timestamp": "<string>"
  }
}
'
{
  "id": "cln0y4p6r003yl70i1j2k3l4m",
  "name": "Spring announcement",
  "status": "Draft",
  "createdAt": "2026-03-28T15:00:00.000Z",
  "updatedAt": "2026-03-28T15:00:00.000Z",
  "emailMessageId": "cmn5zia4i0017tzli8ric8giv",
  "emailMessageContentRevisionId": "clv8g2x4z012yl70n5o6p7q8r",
  "campaignGroupId": "clq3b7s9u007yl70u9v0w1x2y",
  "mailingListId": null,
  "audienceSegmentId": "clr4c8t0v008yl70x3y4z5a6b",
  "audienceFilter": null,
  "scheduling": {
    "method": "schedule",
    "timestamp": "2026-04-01T09:00:00.000Z"
  }
}
This endpoint creates a draft campaign and an empty email message in one step. Use the returned emailMessageId with Update an email message to set subject, sender, preview text, and LMX content. The audience (mailing list, segment, or filter), group, and scheduling can be set on create or later via Update a campaign.
To send a test preview of a campaign, use the Preview email message endpoint.

Request

Body

name
string
required
The campaign name.
campaignGroupId
string
The ID of the group to add this campaign to. Defaults to the team’s default group when omitted.
mailingListId
nullable string
The ID of the mailing list to send to.
audienceSegmentId
nullable string
The ID of an audience segment. Setting this clears any audienceFilter.
audienceFilter
object
An inline audience filter. See Get an audience segment for the filter structure.
scheduling
object
When the campaign should send.

Response

Success

Returns 201 Created.
id
string
required
The campaign ID.
name
string
required
The campaign name.
status
string
required
The initial campaign status (Draft).
createdAt
string
required
ISO 8601 timestamp for when the campaign was created.
updatedAt
string
required
ISO 8601 timestamp for when the campaign was last updated.
emailMessageId
nullable string
required
The ID of the empty email message created for this campaign.
emailMessageContentRevisionId
nullable string
required
The initial content revision ID for the email message. Pass this as expectedRevisionId on your first email message update.
campaignGroupId
nullable string
required
The ID of the campaign group this campaign belongs to.
mailingListId
nullable string
required
The ID of the mailing list this campaign sends to, if set.
audienceSegmentId
nullable string
required
The ID of the audience segment this campaign targets, if set.
audienceFilter
nullable object
required
The inline audience filter, if set.
scheduling
object
required
When the campaign is scheduled to send.

Error

If the request body is invalid, the campaign group is not found, or no sending domain is configured, a 400 Bad Request is returned. A 404 Not Found is returned if the referenced mailing list or audience segment does not exist. If the API key is invalid (or content API is not enabled for your team), a 401 Unauthorized is returned.
message
string
required
An error message describing what went wrong.
{
  "id": "cln0y4p6r003yl70i1j2k3l4m",
  "name": "Spring announcement",
  "status": "Draft",
  "createdAt": "2026-03-28T15:00:00.000Z",
  "updatedAt": "2026-03-28T15:00:00.000Z",
  "emailMessageId": "cmn5zia4i0017tzli8ric8giv",
  "emailMessageContentRevisionId": "clv8g2x4z012yl70n5o6p7q8r",
  "campaignGroupId": "clq3b7s9u007yl70u9v0w1x2y",
  "mailingListId": null,
  "audienceSegmentId": "clr4c8t0v008yl70x3y4z5a6b",
  "audienceFilter": null,
  "scheduling": {
    "method": "schedule",
    "timestamp": "2026-04-01T09:00:00.000Z"
  }
}
Last modified on June 29, 2026