API Documentation

Integration Guide

Learn how to integrate RelayX SMS relay into your application and send message events through the API.

API Reference

POST /api/send-sms
Send an SMS event to RelayX

Request Headers

x-api-key: YOUR_API_KEY

Request Body

{
  "phoneNumber": "+91XXXXXXXXXX",
  "message": "Hello, this is a test message from RelayX!"
}

Response (Success)

Status: 202 Accepted
{
  "success": true,
  "message": "SMS event created successfully"
}

Validation Rules

  • Phone number must be in E.164 format (e.g., +1234567890)
  • Phone number must have valid country code
  • Message length must be between 1 and 1000 characters
  • API key is required and must be valid and not revoked

cURL Example

Use the following cURL command to send an SMS event:

curl -X POST https://relayx.wpsadi.dev/api/send-sms \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "phoneNumber": "+91XXXXXXXXXX",
    "message": "Test message from RelayX API"
  }'

Replace YOUR_API_KEY with your actual API key.

Ready to send messages?

Download the RelayX Android app, turn Relay Status ON, and use the playground to test your integration.