← Back to Dashboard

📲 WhatsApp Partner API

Full reseller API. Partners register once, create end users, connect multiple devices. Every device gets its own send URL.

1. Register 2. Create User 3. Add Device 4. Scan QR 5. Send via URL

Base URL: https://robotics.sitpay.in  |  Auth: x-api-key: pk_...

1

Partner Registration PUBLIC - no auth

POST /partner/register
{ "name": "ABC Reseller", "email": "abc@reseller.com", "domain": "api.reseller.com" }

Response:

{ "type": "success", "api_key": "pk_a02f4424..." }
curl -X POST https://robotics.sitpay.in/partner/register \
  -H "Content-Type: application/json" \
  -d '{"name":"ABC Reseller","email":"abc@reseller.com","domain":"api.reseller.com"}'
2

Create End User

POST /partner/users Header: x-api-key
{ "label": "John Doe", "email": "john@example.com" }

Response:

{ "type": "success", "user_token": "pu_a1b2c3d4..." }
curl -X POST https://robotics.sitpay.in/partner/users \
  -H "Content-Type: application/json" \
  -H "x-api-key: pk_your_key" \
  -d '{"label":"John Doe","email":"john@example.com"}'
3

Add Device for User

POST /partner/devices

Headers: x-api-key: pk_...  +  x-user-token: pu_...

{ "device_name": "John iPhone" }

Response:

{
  "session_id": "wa_abc123def456",
  "device_token": "dt_xyz789...",
  "send_url": "https://robotics.sitpay.in/wa/dt_xyz789.../send",
  "qr_url": "https://robotics.sitpay.in/partner/devices/wa_abc123/qr"
}
curl -X POST https://robotics.sitpay.in/partner/devices \
  -H "Content-Type: application/json" \
  -H "x-api-key: pk_your_key" \
  -H "x-user-token: pu_user_token" \
  -d '{"device_name":"John iPhone"}'
4

Get QR & Check Status

GET /partner/devices/:session_id/qr Header: x-api-key
{ "type": "success",   "qr": "data:image/png;base64,..." }
{ "type": "pending",   "message": "QR not ready, retry in 3s" }
{ "type": "connected", "phone": "919876543210" }
GET /partner/devices/:session_id/status
{ "status": "connected", "send_url": "https://robotics.sitpay.in/wa/dt_.../send" }
curl https://robotics.sitpay.in/partner/devices/wa_abc123/qr \
  -H "x-api-key: pk_your_key"
5

Send Message NO AUTH HEADER

Each device has its own permanent URL. Token in URL is the credential.

https://robotics.sitpay.in/wa/dt_xyz789abc.../send
POST GET /wa/:device_token/send
{ "to": "919876543210", "message": "Hello!" }

Response:

{ "type": "success", "message": "Message sent", "device": "John iPhone" }
curl -X POST https://robotics.sitpay.in/wa/dt_your_token/send \
  -H "Content-Type: application/json" \
  -d '{"to":"919876543210","message":"Hello!"}'

📋 Other Endpoints

MethodEndpointDescription
GET/partner/mePartner profile + stats
GET/partner/usersList all end users
GET/partner/users/:token/devicesList user devices + send URLs
DELETE/partner/devices/:session_idRemove a device