Skip to content
Splashify Pro
Docs

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://api.splashifypro.com/api/v1/graphql

Authentication

Same as REST — pass your sk_live_… API key in the Authorization header:

bash
Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxxxx

Get 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:

bash
curl -X POST 'https://api.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:

json
{
  "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)

Mutations (write) — currently shipped

Coming soon (Phase 2.x roadmap)

Example — send a text message

bash
curl -X POST 'https://api.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

bash
curl -X POST 'https://api.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)

WebSocket endpoint: wss://api.splashifypro.com/api/v1/graphql (same URL, upgraded protocol). Authenticate via the connection_init payload:

json
{ "type": "connection_init", "payload": { "Authorization": "Bearer sk_live_..." } }

Pagination

All connection-style queries use cursor-based pagination:

text
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:

json
{
  "data": null,
  "errors": [
    { "message": "rate limit exceeded", "extensions": { "code": "RATE_LIMITED", "retry_after_sec": 60 } }
  ]
}

Rate limits

GraphQL shares the same per-plan rate limit bucket as REST. Mixed REST + GraphQL traffic counts toward the same quota.

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:

text
https://api.splashifypro.com/graphql/playground

Sign in with your API key (top-right "HTTP Headers" panel) to start exploring.

Compared to AiSensy / Wati

Need help?

  • Slack-style developer chat: [email protected]
  • Live SLA: 24h for Growth, 8h for Advanced, 2h for Enterprise
  • Schema: introspect via standard GraphQL { __schema { types { name } } } query