REST API and webhooks
Send messages, manage contacts, start campaigns and flows from your own code, and receive signed events when things happen. The API is included on plans with REST API access.
How do I authenticate?
Create a token in the app under Developer, then send it as a bearer token. Requests and responses are JSON. Errors return success: false with a message and an HTTP 4xx status. Each token is limited to 120 requests per minute.
Phone numbers use digits with the country code, for example 919876543210.
curl -X POST "https://reach.spritegenix.com/api/v1/messages/template" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"to":"919876543210",
"template_name":"order_update",
"language":"en_US",
"params":["Rahul","#1023"]}'
Endpoints
Base URL https://reach.spritegenix.com/api/v1. Full request and response examples are in the in-app API reference.
| Method | Path | What it does |
|---|---|---|
| GET | /me | Workspace, plan and usage |
| GET | /wa-accounts | Connected WhatsApp numbers |
| POST | /messages | Send a session message: text, media, buttons, list, call to action or location (needs an open 24 hour window on Cloud API numbers) |
| POST | /messages/template | Send an approved WhatsApp template, any time |
| GET | /messages/{id} | Delivery status of a message: sent, delivered, read or failed |
| GET | /contacts | List contacts, with search, tag and page filters |
| POST | /contacts | Create or update a contact, matched by phone |
| GET | /contacts/{id} | Get one contact |
| PUT | /contacts/{id} | Update a contact |
| DELETE | /contacts/{id} | Delete a contact |
| GET | /lists | Contact lists with member counts |
| GET | /templates | Templates with the variables each one needs |
| POST | /templates | Create a text template and submit it to Meta |
| GET | /conversations | Inbox conversations |
| GET | /conversations/{id}/messages | Messages in a conversation |
| GET | /campaigns | Campaigns |
| POST | /campaigns | Start a WhatsApp template campaign |
| GET | /campaigns/{id} | Campaign progress and stats |
| POST | /email/send | Send a transactional email through your SMTP sender |
| POST | /flows/{id}/trigger | Start a chatbot flow for a phone number |
| POST | /forms/{id}/send | Send a published WhatsApp Form |
Which webhook events can I receive?
Add a webhook URL in the app and choose events. Each delivery is a POST with a JSON body and an X-SGReach-Signature header: sha256= followed by the HMAC SHA-256 of the body with your webhook secret. Failed deliveries are retried.
message.received: Incoming WhatsApp messagemessage.sent: Outgoing message sentmessage.status: Delivery / read / failed statuscontact.created: New contact createdcampaign.completed: Campaign finishedform.submitted: WhatsApp form submittedflow.completed: Flow finished for a contactcall.completed: AI call finishedemail.event: Email open / click / bounce / unsubscribeconversation.assigned: Conversation assigned to agent
Can my website enroll people in a sequence?
Yes. Every drip sequence has its own webhook URL. Post a phone number or email address, and optional fields, to enroll that person, for example when a cart is abandoned or a form is submitted.
{
"event": "message.received",
"timestamp": 1793034483,
"workspace_id": 1,
"data": {
"from": "919876543210",
"name": "Rahul",
"type": "text",
"text": "Hi",
"conversation_id": 7
}
}
Build on four channels with one API.
Start a free trial, create a token under Developer and send your first message in minutes.