Home/Docs/REST API
REST API

6rsh REST API reference

Connect any system to WhatsApp. API access is free on every plan — only the monthly call allowance differs (Free: 1,000 · Starter: 10,000 · Pro: 40,000 · Extreme: 100,000).

Authentication

Create an API key in your dashboard under Integrations → API Keys (up to 5 keys, shown once, hashed at rest). Pass it on every request:

Authorization: Bearer 6rsh_live_XXXXXXXXXXXX
# or
X-API-Key: 6rsh_live_XXXXXXXXXXXX

Base URL: https://www.6rsh.com/api/v1

Test the connection

curl https://www.6rsh.com/api/v1/ping \
  -H 'Authorization: Bearer 6rsh_live_XXXXXXXXXXXX'

Send a template message

Sends an approved WhatsApp template to up to 50 recipients per call (HTTP 207 on partial success). Use an Idempotency-Key header to make retries safe.

curl -X POST https://www.6rsh.com/api/v1/notifications/send \
  -H 'Authorization: Bearer 6rsh_live_XXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -H 'Idempotency-Key: order_12345_v1' \
  -d '{
    "template": "order_confirmation",
    "language": "en",
    "recipients": [{
      "phone": "+9715XXXXXXXX",
      "first_name": "Ahmed",
      "variables": { "1": "Ahmed", "2": "1500 AED" },
      "tags": ["woocommerce"]
    }]
  }'

Reply inside the 24-hour window

Free-text messages are allowed while a customer-service window is open (24 hours after the customer's last message):

curl -X POST https://www.6rsh.com/api/v1/messages/send \
  -H 'Authorization: Bearer 6rsh_live_XXXXXXXXXXXX' \
  -H 'Content-Type: application/json' \
  -d '{ "phone": "+9715XXXXXXXX", "message": "Your order is ready!" }'

More endpoints

MethodEndpointDescription
GET/api/v1/templatesList approved templates (filter with ?category=utility)
GET/api/v1/contactsList contacts (paginated, ?search=)
POST/api/v1/contactsCreate a contact
PUT/api/v1/contacts/{id}Update a contact
DELETE/api/v1/contacts/{id}Delete a contact (204)
POST/api/v1/carts/upsertCreate or update an abandoned cart
POST/api/v1/carts/closeClose a cart after purchase
GET/api/v1/carts/statsAbandoned-cart stats (?days=30)

Errors

All errors share one envelope:

{
  "success": false,
  "error": {
    "code": "TEMPLATE_NOT_FOUND",
    "message": "Template 'my_template' not found or not approved on Meta.",
    "details": {}
  }
}

Codes: INVALID_API_KEY · PLAN_REQUIRED · TEMPLATE_NOT_FOUND · INVALID_PHONE · SESSION_WINDOW_EXPIRED · RATE_LIMIT_EXCEEDED

Get your key in minutes. API keys live in your free dashboard — register, connect a number, and generate a key under Integrations → API Keys.

Connect your store in 5 minutes

Reading the docs is free — sending WhatsApp & Instagram messages just takes a free account. No credit card.

Start Free →

Free forever plan · Setup in 5 minutes · Full Arabic support