Rabt WhatsApp CRM

API Reference

Authentication

If you're a developer looking to integrate RabtCRM with your app or website, you need an API key to authenticate every request.


Creating an API Key

  1. Go to Settings → Developers

Developers page

  1. Click Create New Key
  2. Enter a descriptive name (e.g. "Mobile App" or "Website")
  3. Click Create
  4. Copy the key immediately — it won't be shown again for security reasons

API Playground

The Developers page includes a built-in API Playground so you can test requests directly without any external tools:

TabWhat It Does
Send TextTest sending a text message to a number
Send MediaTest sending an image or file
Send AudioTest sending a voice note

Each tab shows the Endpoint and a ready-to-copy cURL example.


Using the API Key

Add the key as an Authorization header in every HTTP request:

Authorization: Bearer YOUR_API_KEY_HERE
Content-Type: application/json

cURL Example

curl -X GET https://rabtcrm.com/api/v1/contacts \
  -H "Authorization: Bearer YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json"

JavaScript (fetch)

const response = await fetch('https://rabtcrm.com/api/v1/contacts', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY_HERE',
    'Content-Type': 'application/json',
  },
});
const data = await response.json();

Python

import requests

headers = {
    'Authorization': 'Bearer YOUR_API_KEY_HERE',
    'Content-Type': 'application/json',
}

response = requests.get('https://rabtcrm.com/api/v1/contacts', headers=headers)
data = response.json()

Response Codes

CodeMeaning
200 OKRequest succeeded
201 CreatedNew record created successfully
400 Bad RequestInvalid request data
401 UnauthorizedMissing or invalid API key
403 ForbiddenInsufficient permissions
404 Not FoundResource not found
429 Too Many RequestsRate limit hit — wait before retrying
500 Server ErrorServer-side error — contact support

API Key Security

  • Never put an API key in client-side JavaScript
  • Never commit it to GitHub or any public repository
  • If it's ever leaked, delete it immediately and create a new one
  • Store keys in environment variables, not in source code

Deleting an API Key

  1. Go to Settings → Developers
  2. Find the key in the list
  3. Click the delete icon next to it
  4. Confirm deletion

The key is revoked instantly and all requests using it will fail.


Next Step

← Sending Messages via API