API Documentation

Integrate WhatsApp, SMS
and Email in minutes

Simple, documented, production-ready REST APIs v4. JWT Auth, webhooks, bulk sending and much more.

  • Secure JWT Bearer authentication
  • Real-time webhooks for all events
  • Free sandbox — no credit card required
  • Complete OpenAPI 3.0 documentation
Quick start

Integrate in 3 steps

From zero to messages sent in less than 10 minutes.

1

Get your token

Call the authentication endpoint with your credentials to obtain a JWT token to use in all subsequent requests.

POST /api/v4/auth/token
{"username":"...","password":"..."}
→ {"token": "eyJh..."}
2

Send your first message

Use the token in the Authorization header and call the endpoint to send a WhatsApp, SMS or Email message.

POST /whatsapp/chats/{id}/message
Authorization: Bearer <token>
→ {"status": "sent"}
3

Receive events

Configure a webhook to receive incoming messages, delivery confirmations and status updates in real time.

POST /api/v4/webhooks/create
"url": "https://your-app.com/hook"
→ {"status": "active"}
Security

JWT Bearer Authentication

All Chat API APIs use JWT tokens. Generate your token with a single POST call and include it in the Authorization header of every request.

Configurable expiry

Tokens expire after a configurable period. Regenerate automatically via API with no interruption.

HTTPS required

All communications happen over HTTPS with TLS 1.2+. No plain-text calls accepted.

Secure credentials

Username and password are exchanged only once to obtain the token used in API calls.

POST /api/v4/auth/token
{
  "username": "your@email.com",
  "password": "your-password"
}
200 OK Response
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...",
  "expiresIn": 3600,
  "type": "Bearer"
}
Use the token in every request
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6Ikp...
Endpoints

All available endpoints

Every endpoint is documented with parameters, responses and examples in our OpenAPI documentation.

WhatsApp
POST

Send message

/api/v4/whatsapp/chats/{id}/message

Send a direct WhatsApp message

GET

List templates

/api/v4/notifications/whatsapp/templates

View approved WhatsApp templates

POST

Template notification

/api/v4/whatsapp/notifications

Send one-to-one notification outside 24h window

POST

Bulk send

/api/v4/whatsapp/bulk

Send to thousands of contacts in one batch

SMS
POST

Send SMS

/api/v4/sms/send

Send an SMS to any number worldwide

POST

SMS campaign

/api/v4/sms/bulk

Bulk send to contact lists

GET

Delivery report

/api/v4/sms/reports/{id}

Check delivery status

Email
POST

Send email

/api/v4/email/send

Transactional email with DKIM/SPF

POST

Email campaign

/api/v4/email/bulk

Send marketing campaigns in bulk

GET

Email events

/api/v4/email/events

Open rate, clicks, bounces, unsubscribes

System
POST

Authentication

/api/v4/auth/token

Generate JWT Bearer token

POST

Webhooks

/api/v4/webhooks/create

Configure real-time event reception

POST

Chat Widget

/api/v4/iframes/whatsapp/chat-box

Generate an iframe for the WhatsApp chat

Code examples

Integrate in your language

Ready-to-use examples to authenticate and send your first message.

cURL
curl -X POST \
  https://app.roxpay.eu/api/v4/auth/token \
  -H "Content-Type: application/json" \
  -d '{"username":"...","password":"..."}'

# Use the token:
curl -X POST \
  .../whatsapp/chats/123/message \
  -H "Authorization: Bearer <token>" \
  -d '{"body":"Hello!"}'
Python
import requests

# Authentication
r = requests.post(
  "https://app.roxpay.eu/api/v4/auth/token",
  json={"username":"...", "password":"..."}
)
token = r.json()["token"]

# Send message
requests.post(
  "...whatsapp/chats/123/message",
  headers={"Authorization": f"Bearer {token}"},
  json={"body": "Hello!"}
)
Node.js
// Authentication
const r = await fetch(
  "https://app.roxpay.eu/api/v4/auth/token",
  { method: "POST",
    headers: {"Content-Type":"application/json"},
    body: JSON.stringify({username,password}) }
);
const { token } = await r.json();

// Send message
await fetch("...chats/123/message", {
  method: "POST",
  headers: { Authorization: `Bearer ${token}` },
  body: JSON.stringify({ body: "Hello!" })
});
Environments

Sandbox and production

Test freely in the sandbox environment at no cost, then switch to production with a single URL change. Zero refactoring.

Free sandbox

No credits consumed. Simulated messages. Unlimited testing with no extra configuration.

Scalable production

Enterprise infrastructure with 99.9% SLA and dedicated technical support.

Instant switch

Change only the base URL to go from sandbox to production. Same code, same API contract.

Sandbox

Base URL

https://sandbox.roxpay.eu

✓ Simulated messages  ·  ✓ No cost  ·  ✓ Test data

Production

Base URL

https://app.roxpay.eu

✓ Real messages  ·  ✓ 99.9% SLA  ·  ✓ Dedicated support

OpenAPI 3.0 · Swagger UI

Full documentation available

All parameters, response schemas, error codes and interactive examples in the Swagger interface.