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.

0

msg/sec

peak throughput

0%

delivery rate

direct routes

0%

uptime

carrier-grade

<200ms

latency

request to delivery

7 languages GET & POST Direct routes 25 free credits

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.

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.

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

action

Always sendmessage

Type

string

Required

Yes

apikey

Your API key

Type

string

Required

API Key auth

username

Your username

Type

string

Required

Legacy auth

Max

16 chars

password

Your password

Type

string

Required

Legacy auth

Max

16 chars

recipient

Phone number(s), semicolon-separated for multiple

Type

string

Required

Yes

Max

32,768 chars

messagedata

SMS content, UTF-8 encoded

Type

string

Required

Yes

Max

32,768 chars

originator

Sender ID (alphanumeric, UK limit 11 chars)

Type

string

Required

No

Max

11 chars

sendondate

Schedule: YYYY-MM-DD HH:MM:SS

Type

datetime

Required

No

responseformat

xml / html / urlencoded

Type

string

Required

No

reporturl

Delivery webhook URL for real-time delivery reports

Type

string

Required

No

Max

1,024 chars

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.

Callbacks Real-time HTTP
Tracking Handset & network
Message ID Unique per message
Report types deliveredtohandset / deliveredtonetwork
Retry logic Automatic on failure
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

Quick Start

Send SMS in any programming language

Send your first message in 3 steps.

Get from sign-up to sending your first SMS in minutes. Our API works with any language or framework.

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.

get api access

Explore further

Beyond the code.

The API is just the starting point. Explore the full platform, compare use cases, and find the right plan for your integration.

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