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.


                        
7 Languages GET & POST Direct Routes UK Support

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.

01

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.

02

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.

03

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.

SUCCESS — 200 OK
<?xml version="1.0"?>
<aql>
  <results>
    <result>
      <messageid>1234567890</messageid>
      <status>SENT</status>
      <destination>447700900000</destination>
      <credits>1</credits>
    </result>
  </results>
</aql>
ERROR — Authentication Failure
<?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.

Real-time HTTP callbacks to your endpoint
Track delivery to handset or network
Unique $messageid for every message sent
$reporttype returns delivery status
Supports deliveredtohandset and deliveredtonetwork
Retry logic on failed callbacks
webhook callback
// Your reporturl receives:

GET https://yoursite.com/webhook
  ?messageid=1234567890
  &reporttype=deliveredtohandset
  &destination=447700900000

Report Types

deliveredtohandset — confirmed delivery to phone
deliveredtonetwork — accepted by mobile network

FAQS

Developer API FAQs.

We offer two authentication methods: API Key (a single alphanumeric token) and Legacy (username and password pair). API Key is recommended for new integrations as it's simpler and more secure. Legacy authentication is fully supported for existing integrations. Both methods work with identical endpoints and parameters.
We provide working code examples in cURL, PHP, Python, Node.js, C#, Java, and Ruby. Additional examples in ASP Classic, ASP.NET, Perl, Delphi, and VB6 are available on request. Our API uses standard HTTPS requests, so it works with any language that can make HTTP calls.
Yes. Separate multiple phone numbers with semicolons in the 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.
A standard SMS is 160 characters. Messages longer than 160 characters are automatically split into multiple parts (each 153 characters due to concatenation headers) and reassembled on the recipient's phone. Each part counts as one message credit. The maximum messagedata field length is 32,768 characters.
Yes. Use the 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).
Include a 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.
Use the full international format without the leading + sign. For UK numbers, use the format 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.
The 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.
Both methods send identical requests and return identical responses. GET passes parameters in the URL query string — simpler for testing but exposes credentials in server logs and browser history. POST sends parameters in the request body with Content-Type: application/x-www-form-urlencoded — recommended for production use as it's more secure.
The API accepts UTF-8 encoded text. Standard GSM characters (letters, numbers, basic punctuation) fit within the 160-character limit. Unicode characters (emojis, accented characters, non-Latin scripts) reduce the single-message limit to 70 characters. URL-encode your 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.

We value your privacy

We use cookies to enhance your browsing experience, analyse site traffic, and serve personalised content. You can choose which categories of cookies you allow below. cookies | privacy | terms | anti-spam