API Reference
Integrate CelerCloud into your application with our RESTful API. Send SMS, check delivery status, and manage your account programmatically.
Base URL
https://api.celerd.com/v1/
Authentication
All requests use HTTP Basic Auth. Send your accessKey (application ID) as the username and secret as the password in the Authorization header. Alternatively, pass accessKey and secret in the request body.
# Basic Auth (recommended)
curl -X POST https://api.celerd.com/v1/sms/send \ -H "Authorization: Basic $(printf '%s' 'YOUR_ACCESS_KEY:YOUR_SECRET' | base64)" \ -H "Content-Type: application/json" \ -d '{"to":"+8613800000000","body":"Your verification code is 123456.","from":"CodeJi"}'
# Alternative: pass credentials in the request body
curl -X POST https://api.celerd.com/v1/sms/send \ -H "Content-Type: application/json" \ -d '{"accessKey":"YOUR_ACCESS_KEY","secret":"YOUR_SECRET","to":"+8613800000000","body":"Your verification code is 123456.","from":"CodeJi"}'
curl -X POST https://api.celerd.com/v1/sms/send \ -H "Authorization: Basic $(printf '%s' 'YOUR_ACCESS_KEY:YOUR_SECRET' | base64)" \ -H "Content-Type: application/json" \ -d '{"to":"+8613800000000","body":"Your verification code is 123456.","from":"CodeJi"}'
# Alternative: pass credentials in the request body
curl -X POST https://api.celerd.com/v1/sms/send \ -H "Content-Type: application/json" \ -d '{"accessKey":"YOUR_ACCESS_KEY","secret":"YOUR_SECRET","to":"+8613800000000","body":"Your verification code is 123456.","from":"CodeJi"}'
Quick Start
1
Get Credentials
Sign up and find your accessKey and secret in Dashboard → Settings
2
Make a Request
Call the endpoint with your Basic Auth credentials
3
Handle Response
Parse JSON response and handle status codes
Send SMS
Create and send a new message to any destination worldwide.
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
accessKey | string | Conditional | Application ID. Can be omitted when using Basic Auth. |
secret | string | Conditional | Application secret. Can be omitted when using Basic Auth. |
to | string | Required | Recipient phone number in E.164 format (e.g. +8613800000000). Must be shorter than 20 characters. |
body | string | Required | Message text, up to 1,600 characters. |
from | string | Optional | Sender ID. Leading and trailing spaces are trimmed; allowed values depend on your app's SenderID whitelist. |
Example Request
curl -X POST https://api.celerd.com/v1/sms/send \
-H "Authorization: Basic $(printf '%s' 'YOUR_ACCESS_KEY:YOUR_SECRET' | base64)" \
-H "Content-Type: application/json" \
-d '{
"to": "+8613800000000",
"body": "Your verification code is 123456.",
"from": "CodeJi"
}'
Response
{
"sid": "1104123456700000100001",
"status": "success",
"to": "+8613800000000",
"from": "CodeJi",
"body": "Your verification code is 123456.",
"price": "0.0380",
"price_unit": "USD",
"num_segments": 1
}
Response Fields
| Field | Type | Description |
|---|---|---|
sid | string | Message ID, returned once the request is accepted. |
status | string | Processing status: success (accepted and queued for delivery) or failed (not accepted, or accepted but not sent). |
to | string | The to value from the request, returned unchanged. |
from | string | The from value from the request. Omitted if not provided in the request. |
body | string | The body value from the request, returned unchanged. |
price | string | Unit price in your account currency. |
price_unit | string | Account currency, e.g. USD or CNY. |
num_segments | integer | Number of billable segments for this message. |
error_code | string | Error code, returned when the request fails. |
error_message | string | Error description, returned when the request fails. |
Error Response Example
{
"status": "failed",
"error_code": "500",
"error_message": "Parameter error."
}
Code Examples
Python
# pip install requests import requests response = requests.post( "https://api.celerd.com/v1/sms/send", auth=("YOUR_ACCESS_KEY", "YOUR_SECRET"), json={ "to": "+8613800000000", "body": "Your verification code is 123456.", "from": "CodeJi" } ) data = response.json() print(data["sid"]) # 1104123456700000100001 print(data["status"]) # success
Error Codes
API Errors
101AccessKey error.Application does not exist.
102AccessKey is disabled.Application is disabled.
108Incorrect phone number.Invalid
to length (20 characters or more).115AccessKey error.AccessKey or Secret is incorrect.
122AccessKey error.This AccessKey has no API sending or SMS product permission.
123The length of content is too long.
body exceeds 1,600 characters.136The account has been frozen or deactivated and cannot be operated. If you have any questions, please contact the administrator.Account is frozen or deactivated. Contact the administrator.
137IP access limited.Calling IP is not in the whitelist.
500Parameter error.Required parameter is missing.
500Authorization header base64 decode error.The Basic value in the
Authorization header cannot be base64-decoded.500SERVER ERRORUnexpected server-side error.
SMPP Protocol Errors
0STATUS_OKSuccessNormal request processing.
1STATUS_INVMSGLENInvalid message length.Long SMS segment count exceeds limit.
8STATUS_SYSERRSystem error.Application/client status error or internal server error.
10STATUS_INVSRCADRInvalid source address.Source address format or content is invalid.
11STATUS_INVDSTADRInvalid destination address.Phone number is empty, invalid format, or exceeds 20 digits.
13STATUS_BINDFAILBind failed.system_id / password authentication failed.
88STATUS_THROTTLEDThrottled.Request rate limit exceeded.
SMPP Delivery Receipt (DLR) Errors
001REJECTDInsufficient balance.
002REJECTDInvalid phone number.
003REJECTDCountry not quoted.
004REJECTDBlacklisted.
005REJECTDNot in sender whitelist.
006REJECTDContent does not meet whitelist requirements.
007REJECTDRoute and template did not match any channel.
008REJECTDChannel template management — rejected.
009REJECTDPlatform risk interception.
010REJECTDCustomer number segment blocked.
011REJECTDChannel number segment blocked.