---
name: notification-platform
description: Use for notification.dev workspace operations through its MCP server. Explains projects, subscribers, segments, push campaigns, marketing email composition and sample previews, journeys, placements, reports and delivery troubleshooting, webhooks, API keys, permissions, async operations and safety rules. Not required for fetching public SDK integration guides.
---

# notification.dev platform

notification.dev sends mobile push notifications and marketing email. You reach it through an MCP
server at `<dashboard origin>/mcp`, authorized with OAuth by the account owner.
Read this skill before workspace operations. `get_sdk_integration_guide` reads
public SDK documentation and requires no project lookup or skill loading.

## Concepts

- **Organization** owns **projects**. Project-specific workspace tools require a
  `projectId`; `list_projects` and `get_sdk_integration_guide` do not.
- **Subscriber**: an end user, identified by `externalUserId`, with free-form tags.
- **Installation**: one app install on a device. Fields: `platform` (`ios`,
  `android`), `locale`, `timezone`, `appVersion`, `lastSeenAt`.
- **Subscription**: a push channel for an installation. Fields: `provider`
  (`apns`, `fcm`, `mock`), `permission` (`not_determined`, `denied`,
  `authorized`, `provisional`), `optedIn`, `status`.
- **Segment**: a saved audience expression. Live: journeys and campaigns reuse it.
- **Campaign**: a one-off push to an audience. Drafted first, then sent or scheduled.
- **Email template**: reusable email content for campaigns and Journey email steps.
- **Email campaign**: a marketing email draft with content, sender and audience.
- **Journey**: an automated flow of triggers, waits, branches, pushes and email steps.
- **Operation**: a handle for async work (previews, sends). Poll it with `get_operation`.
- **Placement**: a named in-app destination with a deeplink template such as
  `myapp://orders/{orderId}`. Push messages select one instead of a custom
  `deepLink`. See [Placements](#placements).

## Before project-specific workspace work

1. Call `list_projects`. It returns only the projects the user approved for this
   connection. Never guess or reuse project IDs from memory.
2. If more than one project is approved, ask which one to work in.
3. Read before writing: list and get existing segments, campaigns or journeys so
   you do not create duplicates.

Listing projects and polling operations do not independently require an audience,
campaign or journey skill. Load a related skill only when the broader task needs it.

## Permissions

The user approves permissions on the consent page. A tool that needs a missing
permission returns `403 insufficient_scope`. Do not retry in a loop. Tell the
user which permission is missing and that they can approve it by restarting the
connection from their agent, or review it under **Connected applications**.

| Permission                  | Allows                                                                                                    |
| --------------------------- | --------------------------------------------------------------------------------------------------------- |
| `project:read`              | `list_projects`, placements, email domains and settings, project configuration, webhooks; `get_operation` |
| `project:write`             | placements, project name/timezone/configuration/icon, email settings, webhooks (owner/admin)              |
| `credentials:manage`        | push providers incl. enable/disable/delete, email domains (owner/admin)                                   |
| `subscribers:read`          | subscribers, tags, installations, subscriptions, subscriber events, push reachability (`*_health`)        |
| `subscribers:write`         | create/update/delete subscribers, tags, subscriptions, mock installations; unlink and erase (owner/admin) |
| `segments:read`             | list, read, preview and count segments, list members, preview expressions                                 |
| `segments:write`            | `create_segment`, `update_segment`, `delete_segment`                                                      |
| `campaigns:read`            | push and email campaigns, email templates, key events, conversions, local-time schedule preview           |
| `campaigns:write`           | drafts and templates incl. delete, unschedule/cancel push campaigns, key events, image uploads            |
| `journeys:read`             | journeys, executions, node key events and conversions                                                     |
| `journeys:write`            | create, update, duplicate, delete and archive journeys; node key events                                   |
| `journeys:publish`          | `publish_journey` (also needs `journeys:write`)                                                           |
| `messages:send`             | send/schedule push and email campaigns, direct sends and their schedules, test email, Live Activity sends |
| `events:write`              | `ingest_event`                                                                                            |
| `reports:read`              | analytics, audience, push health, deliveries, send and email reports, Live Activities                     |
| `transactional-keys:manage` | transactional server keys (owner/admin)                                                                   |
| `api-keys:manage`           | any project API key, limited to permissions the connection holds (owner/admin)                            |

Every project-level dashboard action has a tool. Organizations, members,
invitations and creating or deleting projects stay in the dashboard. Tools named after an API operation take path
and query parameters as top-level arguments, the request body as `input`, and an
`idempotencyKey` where the API requires one. Email tools that mirror
`/emails/...` routes call the template, campaign or domain ID `id`.

Provider tools and email domain tools require `credentials:manage` and an
owner/admin role. They never return secrets.

Transactional tools also use `events:write` for `ingest_event`, `reports:read`
for delivery reports including `get_journey_delivery_report`, and OAuth-only
`transactional-keys:manage` for
`create_transactional_api_key`, `list_transactional_api_keys`, and
`revoke_transactional_api_key` (owner/admin only). Creation returns the secret
once; issued keys survive OAuth disconnection. Read `transactional-push` for
permission limits and integration examples.

## Safety rules

- **Drafts are safe.** Creating or updating a campaign or journey draft never
  sends anything. Prefer drafts and let the user review in the dashboard.
- **Sending is real.** `send_campaign`, `schedule_campaign`, and `send_message` deliver to real
  devices. Confirm audience size, content and timing with the user first, and
  preview the audience when it is a segment.
- **Idempotency keys.** Send and schedule require an `idempotencyKey`. Generate a
  unique key per action and reuse that exact key when retrying the same action.
  Never reuse a key for a different campaign or time.
- **Segments are live.** `update_segment` changes the audience of active
  segment-triggered journeys and future campaigns. Say so before changing one.
- **Publishing locks.** `publish_journey` permanently locks the name and graph.
  To change an active journey, `duplicate_journey`, edit the copy, publish it.
- **Stay in scope.** Only touch the projects the user named. Do not create
  segments, campaigns or journeys the user did not ask for.
- **Deletes are permanent.** Confirm before any `delete_*`, `erase_subscriber`,
  `unlink_all_subscriber_devices`, `cancel_*`, `archive_journey`,
  `rotate_webhook_secret` or `revoke_*` call, naming what will be removed.
- **Secrets are shown once.** `create_api_key`, `create_transactional_api_key`,
  `create_webhook` and `rotate_webhook_secret` return a secret only in their
  response. Hand it to the user; it cannot be read again.

## Async operations

`preview_segment`, `preview_segment_expression`, `send_campaign` and
`schedule_campaign` return an `operationId`. Poll `get_operation` with the same
`projectId` until `status` is `completed`, `failed` or `canceled`. Statuses:
`pending`, `running`, `completed`, `failed`, `canceled`. Results carry a `type`:
`segment_count`, `segment_preview` (count plus sample) or `send`.

Polling requires `project:read` plus the operation's originating permission:
`segments:read` for audience previews or `messages:send` for campaign sends and
schedules.

## Placements

A placement is a named in-app destination: a deeplink template with optional
`{parameter}` placeholders (letters, digits, underscores), for example
`myapp://orders/{orderId}`. Names are unique per project.

1. Call `list_placements` before choosing or creating one. Each item returns
   `id`, `name`, `template` and its current `versionId`. The list is not paginated.
2. In a push message (`create_campaign_draft`, journey `push` nodes,
   `send_message`) set `placement: { "versionId": "...", "parameters": { "orderId": "123" } }`
   instead of `deepLink`, never both. Supply a nonblank value for every
   placeholder and no extra parameters. The server resolves the deeplink.
3. `create_placement` takes `projectId` and `input: { name, template }`.
   `update_placement` also takes `placementId` and replaces the complete input.
   Both require `project:write` and an owner/admin role.
4. An update creates a new `versionId`. Saved campaigns and journeys keep the
   version they selected; use the new `versionId` for new or edited messages.
5. `delete_placement` takes `projectId` and `placementId` and cannot be undone.
   Confirm with the user first. Saved campaigns and journeys keep their resolved
   destination, but the placement cannot be selected for new messages.

## Delivery troubleshooting

To find out why someone did not receive a push:

1. `get_subscriber_health` with their `externalUserId` shows devices,
   permission, opt-in and provider tokens. `get_push_health` checks the project.
2. `list_deliveries` (filter by subscriber or send) and `get_delivery` show
   outcomes; `list_delivery_attempts` shows provider error codes.
3. For a direct send use `get_direct_send_report` and
   `list_direct_send_recipients`; for a campaign or other operation use
   `list_operation_recipients` with its `operationId`.

## Pagination

List tools return `items` and a `cursor`. Pass `cursor` back to fetch the next
page. Stop when no cursor is returned.

## Marketing email

Email tools are separate from push campaign tools. They save the same resources
shown under **Emails → Templates / Campaigns** in the dashboard.

1. List the approved projects, then use `list_email_templates` and
   `list_email_campaigns` to check for existing work. Use `get_email_template` or
   `get_email_campaign` before editing. Email list tools accept `cursor` and
   `limit` and return `items` and `cursor`.
2. Use `create_email_template` / `update_email_template` for reusable designs.
   Arguments are `projectId`, `input`, and `templateId` for updates.
3. Supply complete `input`: `name` and `content`. Content requires `subject`,
   `preheader` (empty string allowed), `html` and `editor: {}`. HTML reopens in the
   GrapesJS community visual editor. Existing MJML inputs remain supported: supply
   `mjml` instead of `html`, never both. Server-side validation and sanitization
   apply to either format. Do not submit scripts, MJML includes or attachments.
   Image URLs must be public. For uploads, call `upload_email_image` with `projectId`
   and base64 `data` (PNG/JPEG/GIF/WebP, up to 5 MB and 20 megapixels across all
   frames). The backend fits images within 1280×2560 without enlargement, removes
   metadata, compresses static images and preserves GIF animation. Static WebP is
   converted to PNG/JPEG. Use the returned `url`; optional `image` reports actual
   bytes, originalBytes, dimensions and format. Add meaningful `alt` text and live
   text for the offer. Keep most images around 200 KB; use fewer visuals or shorter
   GIFs when the total is heavy. External image sizes remain unknown. These are
   loading recommendations, not deliverability guarantees.
4. Personalization supports `{{ tag.firstName | friend }}` and
   `{{ subscriber.externalUserId | customer }}` with required fallbacks in text,
   subject and preheader, not in image/link URLs. Call `preview_email` with
   `projectId`, `content` and optional top-level `context` to preview sanitized
   HTML, plain text, subject and preheader without sending. See sample contexts
   below for subscriber values and local overrides.
5. For a campaign, call `list_email_domains` (`project:read`) and choose an existing
   verified domain. Never invent a domain ID. If setup is needed, read
   `email-domain-setup` and use `create_email_domain` / `verify_email_domain`,
   or use **Settings → Email**.
6. Call `create_email_campaign_draft` with `projectId` and `input`: `name`,
   `content`, `sender` and `audience`. Sender requires `domainId`, `name` and
   `address`, with optional `replyTo`. The From address must match the selected
   sending domain. Choose the audience and optional composition settings below.
   To reuse a template, read it and copy its `content` into the draft input.
7. `update_email_campaign_draft` also requires `campaignId` and the complete input.
   Only draft campaigns can be edited. Omitted `deliverySchedule`, `labels`, `bcc`,
   `experiment` and `tracking` preserve existing settings. Use `experiment: null`
   to remove the split or an empty `labels` / `bcc` list to clear that list.
   Template updates do not modify existing campaign content or published Journeys.
8. For an authorized email send, use `send_email_campaign` or
   `schedule_email_campaign` with `projectId`, `id` (the email campaign ID) and an
   `idempotencyKey`; scheduling also takes `input.scheduledAt`. Read back the
   draft before sending, including both variants and BCC destinations. Dispatch
   freezes composition and segment definitions. Consent, the subscriber's address,
   suppression and sender readiness are checked again before submission.

### Build and edit email templates with an agent

Use the same HTML/MJML content contract as the visual editor. A visual design and
an agent-authored design are ordinary saved templates, not separate formats.

1. Read the project and existing template first. Keep the existing subject,
   preheader and personalization fallbacks unless the requested edit changes them.
2. For a replacement layout, pass `editor: {}` and email-ready `html` (or `mjml`,
   never both). Do not submit a GrapesJS project AST, component scripts or
   `data-gjs-*` behavior. The editor imports server-sanitized HTML, so stale
   editor metadata cannot overwrite new HTML supplied by an agent.
3. Use a table-based layout around 600 px wide, inline styles and live text.
   For an image resize, change its HTML `width` and inline `width` consistently;
   use `max-width:100%;height:auto` to keep it responsive and proportional.
   Keep the existing public image URL and `alt` text when only resizing.
4. Use `upload_email_image` for new files and use its returned public URL.
   Retain matching `editor.imageAssets` measurements when editing existing
   images; the backend does not fetch arbitrary remote images to estimate size.
5. Call `preview_email`, inspect the rendered HTML and plain text, then save the
   complete template content with `update_email_template`. Read it back to check
   the result. The user can reopen it in the visual builder and continue editing.
   Saving a template does not update already-created campaigns or send email.

Suggested user prompt:

> Create an email template for this project. Use the notification.dev MCP tools,
> inspect existing templates and the available sending setup, and build a simple
> responsive design with my copy and images. Optimize uploaded images, keep
> personalization fallbacks, preview the result and save it as a reusable template.
> Leave sending as a separate action.

### Audience and composition

`audience` accepts these shapes:

- `{ "type": "all" }`: all eligible email subscribers.
- `{ "type": "segment", "segmentId": "..." }`: one saved segment.
- `{ "type": "subscribers", "subscriberIds": ["..."] }`: up to 1000 explicit subscribers.
- `{ "type": "segments", "includeSegmentIds": ["..."], "excludeSegmentIds": ["..."] }`:
  up to 20 saved segments per list. Includes form a union; excludes win. Empty
  includes means all eligible subscribers before exclusions. Every segment must
  belong to the selected project. Segment rules freeze at send/schedule time;
  changes to subscribers still affect eligibility when preparing and sending.

Optional campaign input fields:

- `labels`: up to five labels, at most 40 characters each.
- `bcc`: up to five internal archive addresses. Each receives a separately queued,
  personalized copy for every primary recipient, except when it equals that
  recipient's address or is suppressed. Copies use the same variant and due time,
  consume normal rate and domain budgets, and carry an internal-copy footer without
  tracking or unsubscribe actions. Their feedback suppresses the copy destination;
  their metrics are separate from primary recipients. These destinations receive
  the recipient's personalized content, so review them with the draft.
- `experiment: { "percentageA": 50, "variantB": { ...complete content... } }`:
  sends the main `content` as A and the supplied content as B. `percentageA` is an
  integer from 1 to 99. A stable campaign/subscriber hash selects one variant per
  primary recipient, weighted by this percentage; retries keep the same choice.
  Every selected recipient participates. There is no automatic winner selection or
  later winner send.
- `tracking: { "opens": true, "clicks": true }`: switches are independent and
  default to enabled. Primary unsubscribe links and one-click headers remain
  available when tracking is disabled.

### Sample previews and test sends

Use `context: { "subscriberId": "...", "variables": { "tag.firstName": "Sample" } }`
with `preview_email`. `subscriberId` loads an unarchived subscriber from the same
project and additionally requires `subscribers:read`. Preview itself requires
`campaigns:read`. Local `variables` alone needs no subscriber lookup permission.
Keys are `subscriber.id`, `subscriber.email`, `subscriber.externalUserId` or
`tag.<key>`. Values are strings, numbers, booleans or null; null uses the merge-field
fallback. Up to 50 overrides are accepted, with at most 2000 characters per string.
Overrides win over loaded values and exist only for this request. Preview/test
contexts update neither subscriber data nor saved content. HTML values are escaped;
subject, preheader and plain text use the same values and fallbacks.

`send_test_email` takes `projectId` and
`input: { "content": { ... }, "sender": { ... }, "to": "reviewer@example.com", "context": { ... } }`.
It requires `messages:send`, plus `subscribers:read` when loading a subscriber.
It sends one real `[Test]` email using the same sample context as preview, with no
tracking/unsubscribe actions or campaign delivery records. Limit: five test emails
per project per minute. It uses normal domain warm-up limits.

`get_email_campaign_report` takes `projectId` and `id`. Primary metrics, timelines,
links and delivered-cohort rates exclude BCC copies. `copies` reports retained
copy states separately; `variants` reports retained primary A/B recipients,
accepted/delivered counts and confirmed-delivered open/click rates. Disabled tracking
returns null for the corresponding `engagement` and `variants` rates; coverage
notes explain unavailable counts. Legacy nonnullable top-level rates remain zero.
Accepted counts
retain provider acknowledgments even after later failure feedback. Subscriber
erasure removes retained recipient/copy/variant details, while primary lifetime
aggregates remain. Opens/clicks can include privacy proxies and automated scanners;
a split report does not select or establish a winning variant.

Creating templates and drafts does not require SES credentials and does not send,
schedule or enroll anyone. Ask the user to review the saved draft in the dashboard.
The existing `send_campaign` / `schedule_campaign` tools are for push campaigns;
do not use them with email campaign IDs.

## Related skills

- `push-images`: add campaign photos, offer thumbnails or chat avatars; choose the
  correct message fields and check image limits, iOS setup and native release readiness.
- `email-domain-setup`: register sending domains, hand off or publish DNS through
  a connected provider, and verify readiness without sending email.
- `push-provider-setup`: configure FCM/APNs providers and replace credentials.
- `audience-segments`: write and preview segment expressions.
- `push-campaigns`: draft, send and schedule campaigns.
- `journeys`: build valid journey graphs and publish them.
- `transactional-push`: provision server keys, send directly to users, and submit server events that can trigger journeys.
