API Reference
Reference for the current ChinqIT Verify API. Base path: https://sms.chinqit.com/api/v2.
Authentication
All requests require the API key in the header:
X-API-Key: your-api-key-here
API keys are provided by ChinqIT Verify. Contact your service administrator to obtain one.
Base URL
- Production:
https://sms.chinqit.com/api/v2
Phone Number Format (Mauritania)
- Canonical:
+222XXXXXXXX(e.g.+22238089336) - With country code:
222XXXXXXXX— normalized to+222XXXXXXXX - Local:
XXXXXXXX(must start with2,3, or4) — normalized to+222XXXXXXXX
Invalid formats return 400 Bad Request.
POST /api/v2/notify
Send an SMS message.
Request:
{
"message": "Hello, this is a test message",
"phoneNumber": "+22238089336"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
message | string | Yes | SMS content |
phoneNumber | string | Yes | Recipient (Mauritania format) |
Response:
{
"success": true,
"messageId": "550e8400-e29b-41d4-a716-446655440000",
"queued": true
}
Messages are queued and processed asynchronously. Use messageId to track delivery.
Example:
curl -X POST https://sms.chinqit.com/api/v2/notify \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumber": "+22238089336", "message": "Hello"}'
POST /api/v2/code
Request an OTP (send a verification code via SMS or WhatsApp).
Request:
{
"phoneNumber": "+22238089336",
"hash": "ABC123XYZ45",
"language": "en",
"channel": "sms"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Recipient (Mauritania format) |
hash | string | No | 11-character SMS Retriever hash (SMS only). See SMS Retriever Guide. |
language | string | No | fr (default), en, ar |
channel | string | No | sms (default) or whatsapp |
Response:
{
"success": true,
"messageId": "550e8400-e29b-41d4-a716-446655440000",
"expiresIn": 600
}
- 6-digit code, valid 10 minutes (600 seconds), max 3 verification attempts.
Example:
curl -X POST https://sms.chinqit.com/api/v2/code \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumber": "+22238089336", "language": "en"}'
POST /api/v2/check
Verify an OTP code.
Request:
{
"phoneNumber": "+22238089336",
"otp": "123456",
"channel": "sms"
}
| Parameter | Type | Required | Description |
|---|---|---|---|
phoneNumber | string | Yes | Phone the OTP was sent to |
otp | string | Yes | 6-digit code |
channel | string | No | sms (default) or whatsapp |
Response (success):
{
"success": true,
"message": "OTP verified successfully",
"verified": true
}
Response (invalid):
{
"success": false,
"message": "Invalid OTP",
"retriesLeft": 2
}
Example:
curl -X POST https://sms.chinqit.com/api/v2/check \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"phoneNumber": "+22238089336", "otp": "123456"}'
GET /api/v2/notify/:messageId
Get delivery status for a message.
Response:
{
"success": true,
"data": {
"messageId": "550e8400-e29b-41d4-a716-446655440000",
"sent": true,
"phoneNumber": "+22238089336",
"type": "message",
"createdAt": "...",
"updatedAt": "..."
}
}
Example:
curl -H "X-API-Key: YOUR_API_KEY" \
"https://sms.chinqit.com/api/v2/notify/550e8400-e29b-41d4-a716-446655440000"
Error format
{
"success": false,
"message": "Error description",
"errors": []
}
HTTP status codes: 200, 400, 401, 403, 404, 429, 500, 502.
See also
- API v1 Reference (Deprecated) – legacy endpoints
- API Usage – more examples (v1 deprecated)
- Troubleshooting
- SMS Retriever Guide