Developer API.
Send your first SMS in minutes, not days
Real documentation with working code. Select your language, choose your authentication method, and every example on this page updates instantly. Copy, paste, send.
Personalise
Personalise every example on this page.
Enter your credentials and message details below. Every code example on this page updates instantly.
Your credentials stay in your browser. Nothing is sent to our servers.
Quick Start
Send your first message in 3 steps.
Get your credentials
Sign up via the connect page, choose API Key or Legacy authentication, and receive your credentials by email within minutes. 25 free test credits included.
Copy the code
Choose your language from the examples above, copy the code, and replace the placeholder values with your real credentials — or use the personalised examples.
Send and verify
Run the code, check the API response for a message ID, and verify delivery. You're live — start building your integration.
API Reference
Send SMS endpoint.
API Key Authentication
https://apikey.faretext-api.co.uk:9443/apikey?action=sendmessage
Legacy Authentication
https://faretext-api.co.uk:9443/api?action=sendmessage
Both endpoints support GET and POST. POST requests use Content-Type: application/x-www-form-urlencoded
Parameters
| Parameter | Type | Required | Max Length | Description |
|---|---|---|---|---|
| action | string | Yes | — | Always sendmessage |
| apikey | string | API Key auth | — | Your API key |
| username | string | Legacy auth | 16 chars | Your username |
| password | string | Legacy auth | 16 chars | Your password |
| recipient | string | Yes | 32,768 chars | Phone number(s), semicolon-separated for multiple |
| messagedata | string | Yes | 32,768 chars | SMS content, UTF-8 encoded |
| originator | string | No | 11 chars | Sender ID (alphanumeric, UK limit 11 chars) |
| sendondate | datetime | No | — | Schedule: YYYY-MM-DD HH:MM:SS |
| responseformat | string | No | — | xml / html / urlencoded |
| reporturl | string | No | 1,024 chars | Delivery webhook URL for real-time delivery reports |
Code Examples
Complete code examples.
Working examples in every supported language. Select your language and HTTP method — the code updates live with your credentials.
Additional legacy language examples (ASP Classic, ASP.NET, Perl, Delphi, VB6) are available on request from our developer support team.
Response Format
Understanding the response.
The API returns XML by default. Use the responseformat parameter to request xml, html, or urlencoded responses.
<?xml version="1.0"?> <aql> <results> <result> <messageid>1234567890</messageid> <status>SENT</status> <destination>447700900000</destination> <credits>1</credits> </result> </results> </aql>
<?xml version="1.0"?> <aql> <error> <code>AUTH_FAILED</code> <message>Invalid credentials</message> </error> </aql>
Delivery Reports
Real-time delivery reporting.
Set the reporturl parameter in your API call and we'll send a real-time HTTP callback to your server whenever a message status changes.
// Your reporturl receives: GET https://yoursite.com/webhook ?messageid=1234567890 &reporttype=deliveredtohandset &destination=447700900000
Report Types
FAQS
Developer API FAQs.
recipient parameter. For example: 447700900000;447700900001;447700900002. Each recipient is charged as a separate message. The maximum length of the recipient field is 32,768 characters.
messagedata field length is 32,768 characters.
sendondate parameter with the format YYYY-MM-DD HH:MM:SS to schedule messages for future delivery. For example: 2025-12-25 09:00:00. The time uses the server timezone (UK/GMT).
reporturl parameter in your API call with a URL on your server. When the message status changes, we send an HTTP GET request to that URL with the messageid, reporttype, and destination parameters. Report types include deliveredtohandset and deliveredtonetwork.
447700900000 (replace the leading 0 with 44). For international numbers, use the country code followed by the number. Do not include spaces, dashes, or brackets.
originator field supports up to 11 alphanumeric characters for UK messages. This is the name that appears as the sender on the recipient's phone. If you don't specify an originator, the system default is used. Some countries have specific sender ID restrictions — contact us for international requirements.
Content-Type: application/x-www-form-urlencoded — recommended for production use as it's more secure.
messagedata parameter when using GET requests to handle special characters safely.
Ready to integrate?
Get your API credentials and send your first message in minutes.
25 free credits. UK-based developer support. 01142 945 993.