SMSimple-API Documentation
Learn how to integrate our SMS API into your applications
How to Send an SMS
Sending an SMS with SMSimple-API is simple. Make a POST request to our endpoint with your message details and API key.
Important
API Endpoint
Headers
- Authorization: Bearer Your_API_KEY
- Content-Type: application/json
Request Body
- to: Recipient's phone number (E.164 format)
- message: The text message to send
Code Examples
import requests
# Your API key
api_key = "your_api_key_here"
# API endpoint
url = "https://smsimple-api.vercel.app/sms-api/sendsms"
# Message details
payload = {
"to": "+1234567890",
"message": "Hello from SMSimple-API!"
}
# Headers
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
# Send the request
response = requests.post(url, json=payload, headers=headers)
# Check the response
if response.status_code == 200:
print("SMS sent successfully!")
print(response.json())
else:
print(f"Error: {response.status_code}")
print(response.json())
API Responses
Our API returns responses in JSON format. Below are the possible responses you might receive when using the SMSimple-API API.
Successful Response
When your SMS is sent successfully, you'll receive a 200 OK response with the following structure:
{
"response": {
"body": "Hello from SMSimple-API !",
"status": "queued"
}
}
Error Responses
If there's an issue with your request, you'll receive one of the following error responses:
Missing required fields
{
"detail": "Missing \"to\" or \"message\" required fields"
}
Invalid API key or insufficient credits
{
"detail": "Invalid API key"
}
// OR
{
"detail": "Insufficient credits"
}
Internal server error
{
"detail": "Failed to update credits. SMS not sent"
}
// OR
{
"detail": "An error occured sending the SMS"
}
Supported Regions
SMSimple-API supports sending SMS messages to multiple countries worldwide. Each country has a different credit cost per message.
Note: Service availability may change over time. The country coverage page always displays the most up-to-date information.
Contact Us
If you have any questions, feedback, or need assistance with our API, our team is here to help. Feel free to reach out to us.
For technical questions about API integration, please include:
- Your account email
- Detailed description of the issue
- Code samples (if applicable)
We typically respond to all inquiries within 48 hours during business days.