> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update an In-App Campaign

> Change a draft or scheduled in-app campaign

Updates a draft or scheduled in-app campaign. Only the fields you pass change. `message` fields are merged over the stored message, so you can change just the title. To clear a message field, set `imageUrl`, `position`, `imagePlacement`, `expiresAfterDays`, `style`, `html` or `showCloseButton` to `null`, `eyebrow` to \`\`, `buttons` to `[]` or `data` to `{}`. A scheduled campaign must stay ready to launch. Live, ended and stopped campaigns can't be edited: stop the campaign and duplicate it instead. Requires the `campaigns:write` scope.

## Request

**campaignId** `string` *required*

The in-app campaign ID.

**name** `string`

Campaign name, up to 255 characters.

**message** `object`

The message, with the same fields as an [in-app sequence step](https://docs.sequenzy.com/concepts/in-app-messages.md): `kind` (`message` or `card`), `format` (`modal`, `banner`, `fullscreen` or `html`), `position`, `eyebrow`, `title`, `body`, `imageUrl`, `imagePlacement`, `buttons` (up to two, each with `label`, `action` and `url`), `data`, `style`, `pinned`, `expiresAfterDays`, `html` and `showCloseButton`. Merge tags such as `{{firstName}}` are filled for each contact when their app receives it. `expiresAfterDays` limits how long a contact keeps it after receiving it; without it, the item stays until the campaign ends or the contact dismisses it.

**priority** `string` (default: medium)

`low`, `medium` or `high`. Apps show one message at a time; when several are waiting, higher priority comes first. Sequence messages count as `medium`.

**endsAt** `string | null`

ISO 8601 time the campaign ends. After it, nobody new gets the campaign and it leaves every feed that still has it, including cards contacts have seen but not dismissed. `null` means it runs until stopped.

**targetLists** `object`

Audience, the same shape as campaign `targetLists`: `{"type":"all"}`, `{"type":"lists","listIds":[...]}`, `{"type":"segment","segmentId":"..."}` or `{"type":"rules","include":[...],"exclude":[...]}`. Email status doesn't matter. Each contact is checked when their app fetches its feed while the campaign is live.

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/in-app/campaigns/cmp_abc123" \
  --header "Authorization: Bearer $SEQUENZY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"message": {"body": "See every campaign at a glance."}, "endsAt": "2026-12-01T00:00:00Z"}'
```

## Responses

```json 200 theme={null}
{
  "success": true,
  "campaign": {
    "id": "cmp_abc123",
    "name": "New dashboards",
    "type": "in_app",
    "status": "draft",
    "state": "draft",
    "message": {
      "label": "",
      "kind": "message",
      "format": "modal",
      "title": "Hi {{firstName}}, dashboards are here",
      "body": "See every campaign at a glance.",
      "buttons": [
        {
          "label": "Take a look",
          "action": "open_url",
          "url": "myapp://dashboards"
        }
      ]
    },
    "priority": "high",
    "endsAt": "2026-12-01T00:00:00.000Z",
    "targetLists": {
      "type": "segment",
      "segmentId": "seg_123"
    },
    "scheduledAt": null,
    "sentAt": null,
    "estimatedRecipientCount": null,
    "labelIds": [],
    "createdAt": "2026-11-07T12:00:00.000Z",
    "updatedAt": "2026-11-08T09:00:00.000Z"
  }
}
```

```json 400 theme={null}
{
  "error": "endsAt: Invalid datetime"
}
```

```json 401 theme={null}
{
  "error": "Invalid API key"
}
```

```json 403 theme={null}
{
  "error": "API key is missing required scope: campaigns:write"
}
```

```json 404 theme={null}
{
  "error": "Campaign not found."
}
```

```json 409 theme={null}
{
  "error": "Only draft or scheduled in-app campaigns can be edited. Stop it and duplicate it to change a live campaign."
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.