broadcast-api
Reference documentation for Broadcast API (sendbroadcast.net) integration. Use when working with the Broadcast email provider, creating/updating broadcasts, managing subscribers, or debugging API issues.
When & Why to Use This Skill
The Broadcast API skill is a comprehensive technical reference designed to streamline the integration of the sendbroadcast.net email marketing platform. It provides developers and agents with precise documentation for managing email broadcasts, handling subscriber lifecycles, and implementing secure Bearer token authentication. By offering detailed endpoint mappings and troubleshooting guides for common HTTP errors, this skill ensures reliable communication between your application—specifically the Payload Newsletter Plugin—and the Broadcast self-hosted service.
Use Cases
- Automated Newsletter Management: Programmatically create, update, and schedule email broadcasts to maintain consistent communication with your audience.
- Subscriber Synchronization: Efficiently manage subscriber lists by creating, finding, or updating user records and handling opt-in/opt-out status via API endpoints.
- API Integration Debugging: Quickly identify and resolve technical issues such as 401 Unauthorized, 404 Not Found, or 422 Unprocessable Entity errors using structured common-issue references.
- Custom Email Provider Setup: Facilitate the configuration of the Broadcast provider within development environments, ensuring correct base URL, token, and HTML body formatting.
| name | broadcast-api |
|---|---|
| description | Reference documentation for Broadcast API (sendbroadcast.net) integration. Use when working with the Broadcast email provider, creating/updating broadcasts, managing subscribers, or debugging API issues. |
Authentication:
Authorization: Bearer YOUR_ACCESS_TOKEN
Base endpoints:
GET /api/v1/broadcasts- List broadcastsPOST /api/v1/broadcasts- Create broadcastGET /api/v1/broadcasts/:id- Get broadcastPATCH /api/v1/broadcasts/:id- Update broadcastDELETE /api/v1/broadcasts/:id- Delete broadcastPOST /api/v1/broadcasts/:id/send_broadcast- Send broadcastGET /api/v1/subscribers.json- List subscribersGET /api/v1/subscribers/find.json?email=- Find subscriberPOST /api/v1/subscribers.json- Create subscriberPATCH /api/v1/subscribers.json- Update subscriberPOST /api/v1/subscribers/unsubscribe.json- UnsubscribePOST /api/v1/subscribers/resubscribe.json- Resubscribe
Broadcast statuses:
draft | scheduled | queueing | sending | sent | failed | partial_failure | aborted | paused
Read the appropriate reference file based on what you're working on.
401 Unauthorized:
- Token expired or revoked
- Token lacks required permissions (Read vs Write)
- Missing
Bearerprefix in Authorization header
404 Not Found:
- Broadcast/subscriber doesn't exist
- Wrong base URL (using sendbroadcast.net instead of your instance)
422 Unprocessable Entity:
- Missing required fields (subject, body for broadcasts)
- Invalid email format for subscribers
- Trying to update a sent broadcast
Body format for broadcasts:
- Must be valid HTML
- Use
<br>for line breaks,<p>for paragraphs - Don't include
<html>,<head>,<body>tags - Broadcast wraps content automatically
Key configuration:
{
baseUrl: 'https://your-broadcast-instance.com',
token: 'your_access_token',
fromEmail: 'newsletter@yourdomain.com',
fromName: 'Your Name',
replyTo: 'reply@yourdomain.com'
}
The plugin creates broadcasts in Payload first, then syncs to Broadcast on first update with content (subject + body).
- API calls use correct endpoints and methods - Authentication header is properly formatted - Request bodies match expected schema - Error responses are handled appropriately