Loading...

POST /api/sms

To tell a driver the collection point has changed, send a text to their phone from Plaspy. Enter the destination number with its international dialling prefix and write the notice you want the driver to receive.

The response confirms sending and returns the current account’s service balance after the operation. The message status appears in the SMS history of the account that pays for the send. If another account supplies the licences, both the message and the charge are recorded on that account.

Request Details

HTTP method POST
Path /api/sms

Request Parameters

Request body parameters

ParameterTypeRequiredDescription
numberStringRequiredStringYesUse the recipient’s international phone number or specify the correct country for a local number.
messageStringRequiredStringYesMessage text, up to 160 characters.
countryCodeStringOptionalStringNoISO country code for the number. Defaults to the country of the account that supplies the licence.

Authentication Required

Requires insert permission on the SMS page. Demo users cannot perform this operation.

Send the token in the Authorization: Bearer {token} header. See Authentication.

Example Request

POST /api/sms HTTP/1.1 Host: api.plaspy.com Authorization: Bearer {token} Content-Type: application/json

Example Request Body

{ "number": "+12025550127", "message": "Delivery complete", "countryCode": "US" }

Response Parameters

The Presence column describes an HTTP 200 response. Conditional fields are omitted when they have no value.

message confirms sending and balance is the account balance after the operation. If another account supplies the licence, that account is charged and records the message. To read the history of the current account, use GET /api/sms.

FieldTypePresenceDescription
balanceNumberAlwaysNumberAlwaysService balance of the current account.
messageStringAlwaysStringAlwaysConfirmation that the SMS was sent.
successBooleanAlwaysBooleanAlwaysSet to true on success.
apiUsageIntegerAlwaysIntegerAlwaysUsage units for this request.
apiDailyUsageIntegerAlwaysIntegerAlwaysAccount usage for the day before this request is added.

Example Successful Response

The example shows an HTTP 200 response.

{ "success": true, "apiUsage": 1, "apiDailyUsage": 24, "message": "SMS Sent", "balance": 12.45 }

Errors

HTTP statusWhen it occurs
400With errors for a missing field, a message that exceeds the limit, an invalid number or an unsupported destination country. Insufficient balance or a sending service failure returns 400 with success: false and the reason in error. If the request quota has been reached, error contains the reason.
401If a valid Bearer token is missing.
403If the user lacks the required permission. The reason appears in error.
500An unexpected error occurred while processing the request.

In an error response that includes success, its value is false and error contains the message. Field validation failures can appear in the errors object, with a list of messages for each field.

Example Error Response

{ "success": false, "error": "Your user does not have permission to do this." }
Index
Questions?

We answer all support request within 24 business hours approximately, If you have a question that needs an immediate resolution, please contact us by other way.

We answer you in business hours, as soon as possible. We are located in Bogotá, Colombia, time zone (GMT-5).

Last modification: 2026-11-30 11:52:05