Download OpenAPI specification:
PushPilot's public API for programmatically managing your push notification campaigns and websites.
All API requests require authentication with a Bearer Token. You can generate an API key from your PushPilot dashboard. Go over your account and access to the "API Keys & Webhooks" section to create and manage your keys from a website.
Include your API key in the Authorization header of each request:
Authorization: Bearer YOUR_API_KEY
API requests are rate-limited to ensure fair usage. If you exceed the limit, you will receive a 429 Too Many Requests response.
{- "success": true,
- "message": "Websites for the team",
- "data": {
- "websites": [
- {
- "id": "abc123def456",
- "name": "My Website",
- "description": "My awesome website",
- "domain": "example.com",
- "isActive": true,
- "vapidPublicKey": "BNxd...base64url",
- "teamId": "team123"
}
]
}
}Retrieve all campaigns for your websites.
| search | string Search campaigns by name |
| page | integer >= 1 Default: 1 Page number for pagination |
| perPage | integer [ 1 .. 100 ] Default: 20 Number of results per page |
{- "success": true,
- "message": "Campaigns found matching your query",
- "data": {
- "campaigns": [
- {
- "id": "camp123",
- "name": "Welcome Campaign",
- "description": "Welcome new subscribers",
- "websiteId": "web123",
- "type": "draft",
- "frequency": "0 9 * * *",
- "startAt": "2026-01-15T09:00:00.000Z",
- "endsAt": "2026-02-15T09:00:00.000Z",
- "options": {
- "queryParams": {
- "utm_source": "pushpilot",
- "utm_medium": "push"
}, - "filters": {
- "countries": [
- "fr",
- "us"
], - "platforms": [
- "desktop",
- "mobile"
], - "browsers": [
- "chrome",
- "firefox"
]
}
}
}
], - "pagination": {
- "total": 1,
- "perPage": 20,
- "currentPage": 1,
- "lastPage": 1,
- "firstPage": 1,
- "firstPageUrl": "/?page=1",
- "lastPageUrl": "/?page=1",
- "nextPageUrl": null,
- "previousPageUrl": null
}
}
}Create a new push notification campaign.
| websiteId required | string Website ID to create the campaign for |
| name required | string <= 255 characters Campaign name |
| description | string <= 255 characters Campaign description |
object (Notification) | |
| frequency | string Cron expression for recurring campaigns |
| startAt | string <date-time> ISO 8601 date (must be today or in the future) |
| endsAt | string <date-time> ISO 8601 date (must be after or equal to startAt) |
object or null (CampaignOptions) |
{- "websiteId": "web123",
- "name": "My Campaign",
- "description": "Optional description",
- "notification": {
- "title": "Hello World!",
- "body": "This is a push notification",
}, - "frequency": "0 9 * * *",
- "startAt": "2026-01-15T09:00:00.000Z",
- "endsAt": "2026-02-15T09:00:00.000Z",
- "options": {
- "queryParams": {
- "utm_source": "pushpilot"
}, - "filters": {
- "countries": [
- "fr"
], - "platforms": [
- "desktop"
]
}
}
}{- "success": true,
- "message": "Campaign created successfully",
- "data": {
- "campaign": {
- "id": "camp123",
- "name": "My Campaign",
- "description": "Optional description",
- "websiteId": "web123",
- "type": "draft",
- "frequency": "0 9 * * *",
- "startAt": "2026-01-15T09:00:00.000Z",
- "endsAt": "2026-02-15T09:00:00.000Z",
- "options": {
- "queryParams": {
- "utm_source": "pushpilot"
}, - "filters": {
- "countries": [
- "fr"
], - "platforms": [
- "desktop"
]
}
}
}
}
}Retrieve a specific campaign by ID.
| campaignId required | string The unique ID of the campaign |
{- "success": true,
- "message": "Campaign found successfully",
- "data": {
- "campaign": {
- "id": "camp123",
- "name": "Welcome Campaign",
- "description": "Welcome new subscribers",
- "websiteId": "web123",
- "type": "draft",
- "frequency": null,
- "startAt": null,
- "endsAt": null,
- "options": null
}
}
}Update an existing campaign.
Note: You cannot update campaigns that have already been launched (status standard).
Planned campaigns can only be updated if they have not yet started.
| campaignId required | string The unique ID of the campaign |
| name | string <= 255 characters Updated campaign name |
| description | string <= 255 characters Updated description |
object (Notification) | |
| frequency | string Updated cron expression |
| startAt | string <date-time> Updated start date |
| endsAt | string <date-time> Updated end date |
object or null (CampaignOptions) |
{- "name": "Updated Campaign Name",
- "description": "Updated description",
- "notification": {
- "title": "Updated Title",
- "body": "Updated body"
}, - "frequency": "0 10 * * *",
- "startAt": "2026-01-20T10:00:00.000Z",
- "endsAt": "2026-03-01T10:00:00.000Z",
- "options": {
- "filters": {
- "countries": [
- "us"
]
}
}
}{- "success": true,
- "message": "Campaign updated successfully",
- "data": {
- "campaign": {
- "id": "camp123",
- "name": "Updated Campaign Name",
- "description": "Updated description",
- "websiteId": "web123",
- "type": "draft",
- "frequency": "0 10 * * *",
- "startAt": "2026-01-20T10:00:00.000Z",
- "endsAt": "2026-03-01T10:00:00.000Z",
- "options": {
- "filters": {
- "countries": [
- "us"
]
}
}
}
}
}Launch a campaign. This will send push notifications according to the campaign configuration.
Note: The campaign must have a valid notification configured before it can be launched.
| campaignId required | string The unique ID of the campaign |
{- "success": true,
- "message": "Campaign launched successfully",
- "data": {
- "campaign": {
- "id": "camp123",
- "name": "My Campaign",
- "description": "Optional description",
- "websiteId": "web123",
- "type": "standard",
- "frequency": null,
- "startAt": null,
- "endsAt": null,
- "options": null
}
}
}Pause a recurring campaign.
Note: Only recurring campaigns can be paused.
| campaignId required | string The unique ID of the campaign |
{- "success": true,
- "message": "Campaign set to pause",
- "data": {
- "campaign": {
- "id": "camp123",
- "name": "My Campaign",
- "description": "Optional description",
- "websiteId": "web123",
- "type": "paused",
- "frequency": "0 9 * * *",
- "startAt": "2026-01-15T09:00:00.000Z",
- "endsAt": "2026-02-15T09:00:00.000Z",
- "options": null
}
}
}Duplicate an existing campaign.
| campaignId required | string The unique ID of the campaign |
| websiteId | string Website ID for the copied campaign. Defaults to the original campaign's website. |
{- "success": true,
- "message": "Campaign copied successfully",
- "data": {
- "campaign": {
- "id": "camp456",
- "name": "Welcome Campaign (Copy)",
- "description": "Welcome new subscribers",
- "websiteId": "web123",
- "type": "draft",
- "frequency": "0 9 * * *",
- "startAt": null,
- "endsAt": null,
- "options": {
- "queryParams": {
- "utm_source": "pushpilot",
- "utm_medium": "push"
}, - "filters": {
- "countries": [
- "fr",
- "us"
], - "platforms": [
- "desktop",
- "mobile"
], - "browsers": [
- "chrome",
- "firefox"
]
}
}
}
}
}