API quickstart
Everything the dashboard does, your own code can do too. Generate a key, add one header, and send your first WhatsApp message with a single curl call.
1. Get your API key
- 1
Log in to your dashboard
Sign in at richautomate.in/login. Any account works — API access is included on the 14-day free trial (100 credits), with no platform, setup, or monthly fee. - 2
Open Settings
From the dashboard, open the Settings page. - 3
Switch to the API Keys tab
In the Settings sidebar, select API Keys. This is where you manage keys for integrating external systems. - 4
Generate a key
Click Generate New Key. The new key appears in your list with a copy button next to it. - 5
Store it securely
Treat the key like a password: keep it in server-side configuration (environment variables, a secrets manager), never in client-side JavaScript, mobile apps, or a public repo. If a key leaks, use the revoke action next to it — revocation is immediate and cannot be undone — then generate a fresh one.
2. Authentication and error shapes
All endpoints live under the base URL https://richautomate.in/api/v1 and authenticate with a single header:
Authorization: Bearer YOUR_API_KEYIf the header is missing or the key is wrong, you get a 401 with a JSON body that tells you which problem you have. If the key is fine but the payload isn't, you get a 422 with a Laravel-style errors object naming each invalid field:
# No Authorization header sent
HTTP/1.1 401 Unauthorized
{"success": false, "error": "API key is missing."}
# Wrong or revoked key
HTTP/1.1 401 Unauthorized
{"success": false, "error": "Invalid or suspended API key."}
# Valid key but bad payload (Laravel-style validation errors)
HTTP/1.1 422 Unprocessable Entity
{
"message": "The phone field is required.",
"errors": {
"phone": ["The phone field is required."]
}
}3. Quickstart: send a template message
Template messages are how you start a conversation — they work whether or not the customer has messaged you recently, as long as the template is approved by Meta and the recipient has opted in. You need the template's exact name (as created in your Templates section) and its 2-letter language code:
curl -X POST https://richautomate.in/api/v1/send-template \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "919876543210",
"template": "order_update",
"language": "en",
"variables": ["Rahul", "ORD-1042"]
}'The variables array fills the template's placeholders in order. Templates with a media header also accept header_media_type (image, video, or document) with either header_media_url or header_media_id, plus an optional filename for documents.
On success the API returns a JSON success response and the message is queued for delivery. It shows up in your dashboard's Live Chat like any other outbound message, and its status usually moves through sent, delivered, and read within seconds as Meta reports back. Actual delivery depends on Meta and the recipient's device — no API can guarantee it.
What a send costs
Once a customer replies, you can answer with free-form text instead of a template:
curl -X POST https://richautomate.in/api/v1/send-message \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "919876543210",
"message": "Thanks for writing in! Your order shipped today."
}'send-message only works inside the 24-hour window
/send-template with an approved template instead. And always message people who have consented: Meta may rate-limit or restrict numbers with poor quality signals.4. All endpoints at a glance
/send-templateSend a Meta-approved template to a phone number — the only way to start a conversation outside the 24-hour window.
/send-messageSend a free-form text message inside an open 24-hour customer-service window.
/send-campaignSend an existing campaign (by campaign_id) to a single phone number — useful for event-triggered sends from your own system.
/campaigns/create-with-csvCreate a campaign from a CSV upload (form-data: name, template_id, file).
/create-contactAdd a contact with phone, name, and an optional custom_attributes object.
/conversations/{phone}Fetch the conversation for a given phone number.
/messages/{conversationId}List the messages inside a conversation.
5. Rate limits
Each API key is rate-limited to 1,000 requests per minute by default. That is per key, so a second key gets its own bucket. If you exceed the limit, back off and retry — for bulk sends to thousands of contacts, prefer /campaigns/create-with-csv over looping /send-template yourself: one request, and RichAutomate queues and paces the delivery for you.
Platform limit, not Meta limit
Next: the full reference
This page covers the happy path. For every field, response shape, and worked example on all seven endpoints, head to the full API reference.
Stuck? Message us on WhatsApp at +91 74349 01027 or book a free 15-minute setup call on Calendly.