Enterprise Messaging API
Our REST API allows you to programmatically manage your WhatsApp communications, build deep integrations with your CRM, and automate complex messaging workflows with ease.
Authentication
All API requests must include an Authorization header with a Bearer token. You can generate and revoke API keys from your dashboard settings.
curl -X POST https://api.gpserp.com/v1/messages \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"to": "919876543210",
"type": "template",
"template": {
"name": "welcome_message",
"language": "en"
}
}'Messaging
Send various types of messages to your customers using these core endpoints.
1. Send Template Message
Template messages are used for outbound notifications. They must be pre-approved by Meta.
/v1/messages/templateBroadcast an approved template with dynamic variables and buttons.
Required Parameters
to: Recipient phone number with country code.templateName: The unique name of your approved template.language: Template language code (e.g., "en").
2. Send Media Message
Send images, videos, documents, or audio files to any active conversation session.
/v1/messages/mediaUpload media directly or provide a public URL to send rich content.
Webhooks
Configure your endpoint to receive real-time notifications for incoming messages, message status updates (sent, delivered, read), and customer-driven events from WhatsApp Flows.
Error Handling
| Code | Description | Solution |
|---|---|---|
| 401 | Unauthorized | Check your API token in headers. |
| 429 | Too Many Requests | Slow down requests temporarily. |
| 400 | Bad Request | Check your JSON payload structure. |
Official SDKs Coming Soon
Our developer team is building official libraries for Node.js, Python, and PHP to make integration even faster. Join our developer community to stay updated!
Request Early Access