ReSMS Logo
Skip to Content

cURL

Welcome to the ReSMS cURL integration guide.

This guide explains how you can interact with the ReSMS API using simple cURL commands from your terminal or scripts.

Sending Your First SMS

You can send an SMS using a simple POST request.

curl -X POST https://api.resms.io/v1/sms/send \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "to": "+1234567890", "message": "Welcome to ReSMS!" }'
  • Replace YOUR_API_KEY with your actual ReSMS API key.
  • Replace the to phone number with the recipient’s number.

Authentication

All ReSMS API calls require an API key passed via the Authorization header.

Example:

-H "Authorization: Bearer YOUR_API_KEY"

Your API key must be kept secure and never exposed in client-side scripts.

Common Parameters

FieldTypeDescription
tostringRecipient phone number (E.164 format)
messagestringMessage content (up to 1600 characters)

Error Handling

If something goes wrong, the API will return an error message and HTTP status code.

Example of a failed request:

{ "error": "Invalid phone number format." }

Always validate your inputs before sending requests.

Going Further


Need help? Contact support@resms.io

Last updated on