Moorsyl Docs

Getting Started

Send SMS messages to Mauritania with a single API call.

Moorsyl is an SMS API for Mauritania. Authenticate with an API key, call one endpoint, and your message gets delivered.

Setup

  1. Sign up at app.moorsyl.com using your email (you'll receive a 6-digit OTP code)
  2. Create an organization
  3. Generate an API key from the dashboard
  4. Start sending SMS

Authentication

All endpoints require an API key linked to an organization. Pass it in the x-api-key header:

curl -X POST https://api.moorsyl.com/rpc/enqueueSms \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{ "to": "+22221234567", "from": "MyApp", "body": "Hello!" }'

Or as a Bearer token in the Authorization header:

curl -X POST https://api.moorsyl.com/rpc/enqueueSms \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "to": "+22221234567", "from": "MyApp", "body": "Hello!" }'

Both methods are equivalent.

Send SMS

Endpoint

POST /rpc/enqueueSms

Request Body

FieldTypeRequiredDescription
tostringyesRecipient phone number in +222XXXXXXXXX format
fromstringyesSender ID, 1–11 characters
bodystringyesMessage text, 1–1600 characters
idempotencyKeystringno8–128 character key to prevent duplicates

Quick Start

Send an SMS
curl -X POST https://api.moorsyl.com/rpc/enqueueSms \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "to": "+22221234567",
    "from": "MyApp",
    "body": "Hello from Moorsyl!"
  }'
Response
{
  "accepted": true,
  "idempotencyKey": "generated-uuid",
  "organizationId": "org_123"
}

A response of accepted: true means the message has been queued for delivery.

Phone Number Format

Only Mauritanian numbers are accepted. The format is +222 followed by a digit 2, 3, or 4, then 7 more digits:

+222[2-4]XXXXXXX

Valid: +22221234567, +22231234567, +22241234567

Invalid: +22251234567, +2221234567, 22221234567

Idempotency

If you provide an idempotencyKey, the same key will not create a duplicate message. If omitted, one is generated for you and returned in the response.

curl -X POST https://api.moorsyl.com/rpc/enqueueSms \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "to": "+22221234567",
    "from": "MyApp",
    "body": "Your code is 123456",
    "idempotencyKey": "signup-otp-user42-attempt1"
  }'

Errors

StatusReason
401Missing or invalid API key
403API key is not linked to an organization
400Invalid input (bad phone number, empty body, etc.)

Organizations

API keys are scoped to an organization. Each organization has its own message history and billing. A user can belong to multiple organizations.

Rate Limiting

API keys have built-in rate limiting. The defaults are 10 requests per 24 hours per key. Contact us if you need higher limits.

On this page