Bearer token
Authorization: Bearer YOUR_API_KEYYou can also use the X-Mrashitey-Key header.Build SMS into websites, apps and business systems with a secure REST API and the MrAshitey SMS WordPress Connector.
Create the key in the customer portal under Developer API. Keep it on your server. Every accepted message uses that workspace's SMS-credit wallet and an approved Sender ID.
Authorization: Bearer YOUR_API_KEYYou can also use the X-Mrashitey-Key header.Applied per active API key.
Use a complete number such as +23324XXXXXXX.
Keep keys in backend code, environment variables or a secrets manager.
/connectionTest the key and retrieve account status, balance and approved Sender IDs.
/balanceReturn the current SMS-credit balance.
/sender-idsReturn approved Sender IDs available to the integration.
/messagesSubmit one SMS using the workspace wallet and approved Sender ID.
Use /connection after saving a key in your application. A successful response confirms that the key is valid, the workspace is active and shows the current wallet balance and approved Sender IDs.
Never expose a masms_... key in browser JavaScript, a public mobile app bundle or a public repository.
curl -s \
-H "Authorization: Bearer YOUR_API_KEY" \
"https://sms.mrashitey.org/wp-json/mrashitey-sms/v1/connection"{
"ok": true,
"platform": "MrAshitey SMS",
"account_status": "active",
"sms_credits": 250,
"approved_sender_ids": [
"MYBRAND"
],
"api_version": "v1"
}POST /messages accepts JSON. The Sender ID must already be approved for the customer workspace.
| Field / Header | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient in complete international format, for example +23324XXXXXXX. |
sender | string | Yes | An approved Sender ID returned by /sender-ids. |
message | string | Yes | SMS body. Long GSM-7 and Unicode messages can consume multiple credits. |
Idempotency-Key | header | Recommended | Reuse the same key when retrying the same business event to prevent accidental duplicate sends. |
A 201 means MrAshitey SMS accepted the message request. Final handset delivery is shown only when verified delivery confirmation is available.
{
"ok": true,
"message_uuid": "ef00b87b-d527-4c17-b0b8-20c2762e512a",
"provider_reference": "",
"recipient": "+23324XXXXXXX",
"parts": 1,
"credits_used": 1
}The API returns parts and credits_used. A Unicode or multipart message can use more than one SMS credit.
Use the returned message_uuid in your own application records. Do not display “Delivered” unless your workflow receives verified delivery confirmation.
Each example stays inside its own scrollable code window on desktop and mobile.
curl -s -X POST \
"https://sms.mrashitey.org/wp-json/mrashitey-sms/v1/messages" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-10045-ready" \
-d '{
"to": "+23324XXXXXXX",
"sender": "MYBRAND",
"message": "Your order is ready."
}'$payload = json_encode([
"to" => "+23324XXXXXXX",
"sender" => "MYBRAND",
"message" => "Hello from MrAshitey SMS",
]);
$ch = curl_init("https://sms.mrashitey.org/wp-json/mrashitey-sms/v1/messages");
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"Authorization: Bearer YOUR_API_KEY",
"Content-Type: application/json",
"Idempotency-Key: customer-event-123",
],
CURLOPT_POSTFIELDS => $payload,
]);
$response = curl_exec($ch);
curl_close($ch);import requests
url = "https://sms.mrashitey.org/wp-json/mrashitey-sms/v1/messages"
headers = {
"Authorization": "Bearer YOUR_API_KEY",
"Idempotency-Key": "customer-event-123",
}
payload = {
"to": "+23324XXXXXXX",
"sender": "MYBRAND",
"message": "Hello from MrAshitey SMS",
}
response = requests.post(url, json=payload, headers=headers)
print(response.status_code)
print(response.json())const response = await fetch("https://sms.mrashitey.org/wp-json/mrashitey-sms/v1/messages", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json",
"Idempotency-Key": "customer-event-123"
},
body: JSON.stringify({
to: "+23324XXXXXXX",
sender: "MYBRAND",
message: "Hello from MrAshitey SMS"
})
});
console.log(response.status, await response.json());The separate MrAshitey SMS Connector authenticates to this platform with a customer API key. The connected site uses the customer workspace wallet and approved Sender IDs, while upstream gateway credentials remain only on the central MrAshitey SMS server.
Download the connector ZIP, then upload it under Plugins → Add New Plugin → Upload Plugin on the WordPress site you want to connect.
Upload and activate the MrAshitey SMS Connector on the WordPress or WooCommerce site that will send messages.
Open MrAshitey SMS → Connection and keep the platform URL as https://sms.mrashitey.org.
In the central customer portal, create a dedicated API key for that WordPress website. Use a separate key per site.
Paste the masms_... key into the connector, save it and run Test connection.
Select one of the approved Sender IDs returned by the connected workspace.
Turn on the WordPress/WooCommerce notification features required by that website.
[mrashitey_sms_otp] where the connector OTP flow is required.Give each WordPress website its own API key and descriptive label, for example School website or WooCommerce store. Revoke a key immediately when that site no longer needs SMS access.
Use the HTTP status and JSON message together. Customer-facing software should show your own friendly wording rather than exposing internal implementation details.
| HTTP | Meaning | Recommended action |
|---|---|---|
200 | Connection, balance or Sender-ID request succeeded | Read the JSON response and continue. |
201 | Message accepted | Store the returned message UUID and credits used. Do not label it delivered yet. |
400 | Invalid send request | Correct the number, message, Sender ID or request fields before retrying. |
401 | Invalid, revoked or expired API key | Stop sending and replace/re-authorise the credential. |
403 | Workspace is not active or operation is unavailable | Check account status and permissions. |
429 | Rate limit reached | Back off and retry later. The current limit is 120 authenticated requests per key per minute. |
Store API keys server-side. Never commit them to a public repository.
Reuse the same Idempotency-Key when retrying the same business event.
Read /balance or /connection when your app needs to warn about low SMS credits.
Use /sender-ids instead of hard-coding an unapproved identity.
Expect parts/credits_used to be greater than one for long or Unicode messages.
A successful API submission is Provider accepted until verified delivery confirmation exists.
Treat every API key like a password and create separate credentials for separate applications or WordPress websites.
Live supportShare your details to start a live conversation with MrAshitey SMS support.
This conversation has ended. You can email the transcript or start a new conversation.
Please rate your experience from 1 star (very poor) to 5 stars (excellent).