GraphQL API
Splashify Pro exposes a GraphQL endpoint alongside the REST API. Use it when you want to:
- Fetch nested data in one round-trip (e.g. last 10 messages + the contact’s tags + the broadcast they came from)
- Subscribe to real-time events over WebSocket (message received, broadcast progress, payment received)
- Build a custom dashboard / CRM integration without making 5–10 REST calls per page load
REST is still recommended for simple “send one message” flows. GraphQL shines for read-heavy integrations.
Endpoint
POST https://apis.splashifypro.com/api/v1/graphqlAuthentication
Same as REST — pass your sk_live_… API key in the Authorization header:
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxxGet your API key from Settings → Developer → Generate Secret Key (shown once, regenerate invalidates the old one).
Quick example
Fetch your wallet balance + last 5 broadcasts:
curl -X POST 'https://apis.splashifypro.com/api/v1/graphql' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"query": "query Dashboard { wallet { balance currency } broadcasts(page: { limit: 5 }) { edges { id name status sent_count delivered_count } } }"
}'Response:
{
"data": {
"wallet": { "balance": 12345.67, "currency": "INR" },
"broadcasts": {
"edges": [
{ "id": "uuid", "name": "Diwali sale", "status": "completed", "sent_count": 1200, "delivered_count": 1187 },
...
]
}
}
}Schema overview
Queries (read)
| Type | Examples |
|---|---|
me | Your account, plan, wallet balance |
contact(id) / contacts(filter) | Single contact or filtered list with pagination |
conversation(id) / conversations(filter) | Conversations with assignee + last message |
messages(conversationId) | Paginated message history |
template(id) / templates(status, category) | Approved/pending templates |
broadcast(id) / broadcasts(filter) | Broadcasts + progress counters |
broadcastReport(id) | Per-recipient delivery breakdown |
wallet / walletTransactions | Balance + ledger |
call(id) / calls(filter) | WhatsApp Business calls + recordings |
Mutations (write) — currently shipped
| Mutation | Purpose |
|---|---|
sendText(input: SendTextInput!) | Send a plain WhatsApp text message → returns SendResult { message_id, status } |
createContact(input: CreateContactInput!) | Idempotent — returns existing contact if phone already saved |
addTags(contactId: ID!, tags: [String!]!) | Append + dedupe tags |
removeTags(contactId: ID!, tags: [String!]!) | Remove a subset of tags |
assignConversation(conversationId: ID!, agentEmail: String!) | Pass empty string to unassign |
resolveConversation(conversationId: ID!) | Marks status=‘resolved’ |
Coming soon (Phase 2.x roadmap)
| Mutation | Status |
|---|---|
sendTemplate / sendMedia / sendInteractive | In progress — wraps existing handler logic |
createBroadcast / cancelBroadcast | After messaging mutations land |
createPaymentLink | Reuses the chat composer ₹ icon flow |
Example — send a text message
curl -X POST 'https://apis.splashifypro.com/api/v1/graphql' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"query": "mutation Send($input: SendTextInput!) { sendText(input: $input) { message_id status } }",
"variables": { "input": { "to": "919876543210", "text": "Hello from GraphQL!" } }
}'Example — add tags to a contact
curl -X POST 'https://apis.splashifypro.com/api/v1/graphql' \
-H 'Authorization: Bearer sk_live_xxxxxxxxxxxxxx' \
-H 'Content-Type: application/json' \
-d '{
"query": "mutation Tag { addTags(contactId: \"<uuid>\", tags: [\"vip\", \"q4-promo\"]) { contact_id name tags } }"
}'Subscriptions (real-time over WebSocket)
| Subscription | Fires when |
|---|---|
messageReceived(conversationId) | New inbound message in the conversation (or any if id omitted) |
messageStatusUpdated | Sent → delivered → read transitions |
broadcastProgress(broadcastId) | Sent/delivered/failed counters bump |
paymentReceived | Customer paid a payment-link |
WebSocket endpoint: wss://apis.splashifypro.com/api/v1/graphql (same URL, upgraded protocol). Authenticate via the connection_init payload:
{ "type": "connection_init", "payload": { "Authorization": "Bearer sk_live_..." } }Pagination
All connection-style queries use cursor-based pagination:
contacts(page: { limit: 50, cursor: "<from prev page>" }) {
edges { id name phone }
pageInfo { hasNextPage endCursor }
}Error handling
GraphQL never returns a non-200 HTTP status (except for auth/network errors). Check the errors array in the response:
{
"data": null,
"errors": [
{ "message": "rate limit exceeded", "extensions": { "code": "RATE_LIMITED", "retry_after_sec": 60 } }
]
}| Code | Meaning | Fix |
|---|---|---|
UNAUTHENTICATED | API key missing/invalid | Check Authorization header |
RATE_LIMITED | Plan rate limit hit | Backoff per retry_after_sec |
QUERY_TOO_EXPENSIVE | Query complexity > 1000 | Reduce nesting or use pagination |
NOT_FOUND | Resource doesn’t exist | Verify the ID |
VALIDATION_ERROR | Input shape wrong | Check the field marked in path |
FEATURE_LOCKED | Plan doesn’t include this feature | Upgrade plan |
Rate limits
GraphQL shares the same per-plan rate limit bucket as REST. Mixed REST + GraphQL traffic counts toward the same quota.
| Plan | Limit |
|---|---|
| Growth | 300 req/min |
| Advanced | 600 req/min |
| Enterprise | configurable, up to Meta WABA cap |
Each GraphQL query is also limited by complexity score (max 1000). Roughly: each field = 1 point, each connection { edges } = N × child cost where N is the page limit. Keep queries focused.
GraphQL Playground
For schema exploration + ad-hoc queries, use the in-browser playground:
https://apis.splashifypro.com/graphql/playgroundSign in with your API key (top-right “HTTP Headers” panel) to start exploring.
Compared to AiSensy / Wati
| Feature | Splashify Pro | AiSensy | Wati |
|---|---|---|---|
| REST API | ✓ | ✓ | ✓ |
| GraphQL API | ✓ | ✗ | ✗ |
| Real-time subscriptions | ✓ (over WS) | ✗ | webhooks only |
| Single-request nested fetches | ✓ | ✗ | ✗ |
| Same auth as REST | ✓ | — | — |
Need help?
- Slack-style developer chat:
support@splashifypro.in - Live SLA: 24h for Growth, 8h for Advanced, 2h for Enterprise
- Schema: introspect via standard GraphQL
{ __schema { types { name } } }query