Full reseller API. Partners register once, create end users, connect multiple devices. Every device gets its own send URL.
Base URL: https://robotics.sitpay.in | Auth: x-api-key: pk_...
/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"}'
/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"}'
/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"}'
/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" }
/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"
Each device has its own permanent URL. Token in URL is the credential.
https://robotics.sitpay.in/wa/dt_xyz789abc.../send
/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!"}'
| Method | Endpoint | Description |
|---|---|---|
| GET | /partner/me | Partner profile + stats |
| GET | /partner/users | List all end users |
| GET | /partner/users/:token/devices | List user devices + send URLs |
| DELETE | /partner/devices/:session_id | Remove a device |