Authentication
Authenticate with an API key passed in the
X-API-Key header.Webhooks
Stream real-time events into your CRM, warehouse, or alerting stack.
Rate limits
100 requests per minute per API key. Headers tell you where you stand.
Errors
Conventional HTTP status codes with structured error responses.
Base URL
Quickstart
1
Get an API key
From the dashboard, go to Admin → API Keys → New Key. Copy the key (it’s only shown once) and store it in a secret manager - never in source control.
2
Make your first call
List your accessible organizations:
3
Subscribe to webhooks
Configure an HTTPS endpoint that receives real-time events for messages, replies, and link clicks. Always validate the HMAC signature before trusting any payload.
What you can do
Read your hierarchy
Read your hierarchy
List organizations, brands, campaigns, phone numbers, and tracking domains across your full org tree. Filter by org / brand / campaign at every level.
Manage contacts and media
Manage contacts and media
Import contact lists from S3 presigned URLs, trigger LRN analysis (mobile / landline / VoIP / invalid), upload and reuse media files. Both contacts and media use async import + polling for “ready” status.
Create, edit, and schedule projects
Create, edit, and schedule projects
Build broadcast projects programmatically: select contact list and phone number, compose the message with merge fields, add media, enable link tracking, send tests, and schedule for a specific time + timezone.
Pull analytics and billing
Pull analytics and billing
Query message stats by date range with org/brand/campaign filters. Pull usage and billing data per organization or grouped by initiating org.
Stream events via webhooks
Stream events via webhooks
Real-time notifications for
message.sent, message.delivered, message.failed, message.replied, and link.clicked - with HMAC-signed payloads and automatic retry.SDKs and tooling
Official SDKs are available for TypeScript (@political-comms/sdk, zero runtime dependencies) and Python (political-comms), alongside a CLI (@political-comms/cli) and an MCP server (@political-comms/mcp) for agent clients — all from Political-Comms/political-comms-sdk. The API is also small and stable enough that direct HTTP calls from your language of choice work just as well. The dashboard’s Export to Postman button generates a fully-configured Postman collection (Collection v2.1) you can import into Postman or Bruno for interactive testing.
Format your code samples in curl, Node, Python, Go, or any other language - the API is plain JSON over HTTPS.
Versioning and deprecation
The API is versioned in the URL path;v1 is the current and only version. Breaking changes ship as a new version path, never inside v1. When an endpoint or field is deprecated, it is marked deprecated in the OpenAPI specification, announced in the changelog, and kept working alongside its replacement before any removal. Additive changes (new endpoints, new optional fields) land in v1 without notice. The full policy, including the Deprecation/Sunset header commitment and the 90-day sunset window, lives at Versioning & Deprecation.
Idempotency and consistency
- All
GETendpoints are safe to retry - they have no side effects. - All
POSTandPATCHendpoints that mutate state are designed to be safe to retry; duplicate calls during a network blip will not create duplicate resources. If you need stronger guarantees, send a uniqueIdempotency-Keyheader on every write - repeated calls with the same key replay the original response. - Aurora Serverless v2 + RDS Proxy backs every read with p99 < 100ms at the database layer.
