Authentication

The PostDog API uses API keys to authenticate requests. You can view and manage your API keys in the Dashboard under Settings > Developers.

Example Request
Authorization: Bearer pd_live_xxxxxxxx
POST

Send Message

Sends a WhatsApp message, Email, or Social post depending on the channel ID.

https://api.postdog.app/v1/messages

Parameters

channel_id
string
The ID of the channel sending the message.
to
string
Phone number or email address of recipient.
content
object
The message body payload.

Example

curl -X POST https://api.postdog.app/v1/messages \
  -H "Authorization: Bearer pd_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "channel_id": "ch_123456",
    "to": "+15550109999",
    "content": {
      "type": "text",
      "text": "Hello world!"
    }
  }'
GET

List Contacts

Returns a paginated list of contacts in your account.

https://api.postdog.app/v1/contacts?page=1&limit=50

Query Parameters

page
integer
Page number (default: 1)
limit
integer
Results per page, max 100 (default: 50)
tag
string
Filter by tag name (optional)

Example

curl https://api.postdog.app/v1/contacts?page=1&limit=50 \
  -H "Authorization: Bearer pd_live_..."
POST

Create Contact

Creates a new contact in your account. Contacts can be reached via WhatsApp, email, or both.

https://api.postdog.app/v1/contacts

Body Parameters

name
string
Contact's full name (required)
phone
string
Phone number in E.164 format, e.g. +1234567890
email
string
Email address
tags
array
Array of tag strings for segmentation

Example

curl -X POST https://api.postdog.app/v1/contacts \
  -H "Authorization: Bearer pd_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "phone": "+1234567890",
    "email": "john@example.com",
    "tags": ["customer", "vip"]
  }'
GET

List Templates

Returns all message templates in your account, including their approval status.

https://api.postdog.app/v1/templates

Example

curl https://api.postdog.app/v1/templates \
  -H "Authorization: Bearer pd_live_..."
POST

Create Template

Submits a new message template for approval. Templates are reviewed by Meta within 24-48 hours.

https://api.postdog.app/v1/templates

Example

curl -X POST https://api.postdog.app/v1/templates \
  -H "Authorization: Bearer pd_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "order_confirmation",
    "category": "UTILITY",
    "language": "en",
    "body": "Hi {{1}}, your order #{{2}} has been confirmed!"
  }'
POST

Register Webhook

Registers a URL to receive real-time event notifications. Your endpoint must return a 200 status within 5 seconds.

https://api.postdog.app/v1/webhooks

Example

curl -X POST https://api.postdog.app/v1/webhooks \
  -H "Authorization: Bearer pd_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/postdog",
    "events": ["message.received", "message.delivered", "message.read"]
  }'

Available Webhook Events

message.received
Incoming message from a contact
message.sent
Message sent successfully
message.delivered
Message delivered to recipient's device
message.read
Recipient read the message
contact.created
New contact added to your account
contact.updated
Contact information updated

Example Webhook Payload

{
  "event": "message.received",
  "timestamp": "2026-03-10T10:30:00Z",
  "data": {
    "messageId": "msg_abc123",
    "from": "+1234567890",
    "body": "Hello!",
    "type": "text"
  }
}

Rate Limits

API requests are rate-limited per plan. Exceeding the limit returns a 429 status code.

Plan Requests/min Burst
Starter 100 150
Pro 500 750
Business 2,000 3,000

Rate Limit Headers

X-RateLimit-Limit
Maximum requests allowed per minute
X-RateLimit-Remaining
Requests remaining in current window
X-RateLimit-Reset
Unix timestamp when the rate limit resets

Error Codes

The API uses standard HTTP status codes. Error responses include a JSON body with a message field.

Code Status Description
400 Bad Request Invalid request body or parameters
401 Unauthorized Missing or invalid API key
403 Forbidden Insufficient permissions for this action
404 Not Found Resource not found
429 Too Many Requests Rate limit exceeded. Retry after X-RateLimit-Reset.
500 Internal Error Server error. Retry with exponential backoff.

Error Response Example

{
  "error": {
    "code": 400,
    "message": "Invalid phone number format. Use E.164 format: +1234567890"
  }
}

SDKs & Libraries

Official client libraries for common languages. All SDKs handle authentication, rate limiting, and retries automatically.

Node.js

npm install @postdog/sdk
const PostDog = require('@postdog/sdk');
const client = new PostDog({ apiKey: 'pd_live_...' });

const message = await client.messages.send({
  channelId: 'ch_123456',
  to: '+15550109999',
  content: { type: 'text', text: 'Hello from Node.js!' }
});

Python

pip install postdog
from postdog import PostDog

client = PostDog(api_key="pd_live_...")

message = client.messages.send(
    channel_id="ch_123456",
    to="+15550109999",
    content={"type": "text", "text": "Hello from Python!"}
)

For full documentation, visit the Getting Started Guide or join our Developer Community.