> ## 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.

# Create a Push Campaign

> Create a push campaign draft

# Create a Push Campaign

Creates a push campaign draft. You can set content and audience now or later with [Update a push campaign](./update-campaign), then [send it](./send-campaign). Requires the `campaigns:write` scope.

## Request

<ParamField body="name" type="string" default="Untitled push campaign">
  Campaign name.
</ParamField>

<ParamField body="targetLists" type="object">
  Audience, same shape as campaign `targetLists`: `{"type":"all"}`, `{"type":"lists","listIds":[...]}`, `{"type":"segment","segmentId":"..."}`, or `{"type":"rules","include":[...]}`. Only contacts with an active push device receive the campaign.
</ParamField>

<ParamField body="title" type="string">
  Notification title, up to 120 characters. Merge tags such as `{{FIRST_NAME|there}}` work.
</ParamField>

<ParamField body="body" type="string">
  Notification message, up to 500 characters. Merge tags work.
</ParamField>

<ParamField body="url" type="string | null">
  Link opened on tap: an https URL, an app deep link (`myapp://...`), or a merge
  tag. Browsers only open https links. `null` clears it.
</ParamField>

<ParamField body="imageUrl" type="string | null">
  Optional https image shown in the notification.
</ParamField>

<ParamField body="iconUrl" type="string | null">
  Optional https icon for web push. Defaults to the icon in push settings.
</ParamField>

<ParamField body="platforms" type="string[]">
  Limit delivery to `web`, `ios`, and/or `android`. Omit or pass `[]` for every
  platform.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/push/campaigns" \
  --header "Authorization: Bearer $SEQUENZY_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{"name":"Flash sale","title":"24h sale","body":"30% off everything","url":"https://shop.example.com/sale","targetLists":{"type":"all"}}'
```

## Responses

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "campaign": {
      "id": "cmp_abc123",
      "name": "Flash sale",
      "type": "push",
      "status": "draft",
      "content": {
        "title": "24h sale",
        "body": "30% off everything",
        "url": "https://shop.example.com/sale",
        "imageUrl": null,
        "iconUrl": null,
        "platforms": [
          "web",
          "ios"
        ]
      },
      "targetLists": {
        "type": "all"
      },
      "scheduledAt": null,
      "sentAt": null,
      "estimatedRecipientCount": null,
      "labelIds": [],
      "createdAt": "2026-10-01T12:00:00.000Z",
      "updatedAt": "2026-10-01T12:00:00.000Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "url: Use an https:// URL, an app deep link (myapp://...), or a merge tag"
  }
  ```

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

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


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