Campaigns

Update a campaign

Changed on

Update a draft campaign's name, group, audience (mailing list, segment, or filter), or scheduling. At least one field must be provided. Once a campaign has been sent, only its name and campaignGroupId can be updated.

post/v1/campaigns/{campaignId}

Request

  • Base URL
    https://app.loops.so/api
  • Auth
    HTTP bearer

Request body

namestring

The updated campaign name.

campaignGroupIdstring

The ID of the group to move this campaign to.

mailingListIdstring nullable

The ID of the mailing list to send to.

audienceSegmentIdstring nullable

The ID of an audience segment. Setting this without also providing audienceFilter clears any existing audienceFilter. If both are provided, the filter is applied on top of the segment's filter.

Example request

{
  "name": "Spring announcement",
  "campaignGroupId": "clg7n5p3q1r9s7t5u3v1w9y7",
  "mailingListId": "clm2k8j4h6g0f8d6s4a2b0z8",
  "audienceSegmentId": "cls6e8g0i2k4m6o8q0s2u4w6",
  "audienceFilter": {
    "match": "all",
    "conditions": [
      {
        "type": "property",
        "key": "plan",
        "operator": "equals",
        "value": "pro"
      }
    ]
  },
  "scheduling": {
    "method": "schedule",
    "timestamp": "2025-07-15T14:00:00.000Z"
  }
}

Response

Campaign updated.

idstring required

The ID of the campaign.

urlstring uri required

The URL of the campaign in the Loops app.

namestring required

The name of the campaign.

status'Draft' | 'Scheduled' | 'Sending' | 'Sent' required

The status of the campaign.

createdAtstring date-time required

ISO 8601 timestamp for when the campaign was created.

updatedAtstring date-time required

ISO 8601 timestamp for when the campaign was last updated.

emailMessageIdstring nullable required

The associated email message ID.

campaignGroupIdstring nullable required

The ID of the campaign group this campaign belongs to.

mailingListIdstring nullable required

The ID of the mailing list this campaign sends to, if set.

audienceSegmentIdstring nullable required

The ID of the audience segment this campaign targets, if set.

Example response

{
  "id": "clc4m6n8p0q2r4s6t8u0v2x4",
  "url": "https://app.loops.so/campaigns/clc4m6n8p0q2r4s6t8u0v2x4",
  "name": "Spring announcement",
  "status": "Draft",
  "createdAt": "2025-06-29T07:47:39.370Z",
  "updatedAt": "2025-06-29T07:47:39.370Z",
  "emailMessageId": "cle5f7g9h1i3j5k7l9m1n3p5",
  "campaignGroupId": "clg7n5p3q1r9s7t5u3v1w9y7",
  "mailingListId": "clm2k8j4h6g0f8d6s4a2b0z8",
  "audienceSegmentId": null,
  "audienceFilter": null,
  "scheduling": {
    "method": "now",
    "timestamp": null
  }
}

Changes

    • breaking

      removed subschema #1 subschema #2 subschema #3 from the /////// request property oneOf list

    • breaking

      added subschema #1: String subschema #2: Number subschema #3: Date range to the /////// response property oneOf list for the response status

    • info

      added subschema #1: String subschema #2: Number subschema #3: Date range to the /////// request property oneOf list

    • info

      removed subschema #1 subschema #2 subschema #3 from the /////// response property oneOf list for the response status

    • info

      api operation id updateCampaign was added