---
title: SMS using the API
description: How to send and receive SMS messages with the GoFax REST API
---

[Skip to content](https://support.gofax.com.au/en/sms-messaging-using-the-api#main-content)

[Contact us](https://support.gofax.com.au/en/kb-tickets/new?hsLang=en)

[![Gofax-new-logo-180x45-min.png\]](https://support.gofax.com.au/hs-fs/hubfs/Gofax-new-logo-180x45-min.png?width=200&height=50&name=Gofax-new-logo-180x45-min.png)](https://www.gofax.com.au/)

- [Pricing](https://www.gofax.com.au/pricing/#bundle-plan)
- [Contact](https://www.gofax.com.au/contact-us/)
- [Log In](https://clientadmin.gofax.com.au/login.aspx)
- [Sender ID Registration](https://support.gofax.com.au/en/sms-sender-id-registration-guide)

Open main navigation

Close main navigation

- [Pricing](https://www.gofax.com.au/pricing/#bundle-plan)
- [Contact](https://www.gofax.com.au/contact-us/)
- [Log In](https://clientadmin.gofax.com.au/login.aspx)
- [Sender ID Registration](https://support.gofax.com.au/en/sms-sender-id-registration-guide)
- [Contact us](https://support.gofax.com.au/en/kb-tickets/new)
- [Submit Support Ticket](https://support.gofax.com.au/en/kb-tickets/new)

[Submit Support Ticket](https://support.gofax.com.au/en/kb-tickets/new?hsLang=en)

 GoFax Customer Support Guides & FAQs

- There are no suggestions because the search field is empty.

1. [Support Home](https://support.gofax.com.au/en?hsLang=en)
2. [Developers](https://support.gofax.com.au/en/developers?hsLang=en)

# SMS using the API

## How to send and receive SMS messages with the GoFax REST API

💡 For a general understanding of how to use the GoFax REST API, please see our helpful article; [Getting started with the REST API](https://support.gofax.com.au/en/getting-started-with-the-restful-api?hsLang=en) first.

### How to send SMS

To send a SMS, submit a **PUT** request to**[/v1.0/SMS](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_Send)**, with the below example JSON payload.

```
{// SMS message object  "To": [ //Array of SMS recipients    "61412341234", // 1 or more valid E.164 mobile number     "61412341234"   ],  "From": "Test Sender" // SMS Sender ID - As shown on destination handset  "Body": "Hello World", // Message body 160 chars = 1 message part}
```

If your SMS was successfully submitted, you will see a response similar to below:

```
{    "Success": true,    "Message": "SMS Submitted",    "ValidationErrors": null,    "Response": 52336014 // Message ID for your SMS job. Store this for later}
```

See our [Swagger UI](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_Send) for all available SMS parameters.

💡 You can send a single SMS message to multiple recipients. 

### How to get SMS status

SMS messages may not be delivered instantaneously for various reasons including but not limited to, availability of remote handset and the carrier level routing. 

We highly recommend using webhooks in an event based architecture to track the status of an SMS. Please see our [Using Webhooks](https://support.gofax.com.au/en/using-webhooks?hsLang=en) guide to assist you. 

Alternatively, you can query the status of a SMS job using the message ID (see above SMS submission response) in the [**GET**](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_GetMessageDetail)**[/v1.0/SMS/{smsId}](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_GetMessageDetail)** endpoint.

💡"{smsId}" = message ID

Example response: 

```
{    "Success": true,     "Message": null,    "ValidationErrors": null,    "Response": {        "MessageID": 52356593,        "Sender": "Test Sender", //Your SMS sender ID after data cleanup (removing invalid chars)        "Message": "Hello World", //The contents of the message        "Issued": "2023-04-19T10:10:45.237", //Datetime of submission        "IssuedUtc": "2023-04-19T00:10:45.237",        "FromNumber": "Test Sender", //Your SMS sender ID before data cleanup (as originally submitted)        "ToNumber": "61412341234", // The recipient of your SMS        "Status": "Sent – Submitted to carrier for delivery",        "Charge": 0.80, // 0.8 Send Credit charge for 1 message part (160 characters)        "Sent": "2023-04-19T10:10:45.983", //Datetime when message was submitted to GoFax SMS carriers.        "SentUtc": "2023-04-19T00:10:45.983",        "Complete": "2023-04-19T10:10:56.047", //Datetime when message reached a final status        "CompleteUtc": "2023-04-19T00:10:56.043",    }} 
```

💡 View our helpful articles on [SMS send status codes](https://support.gofax.com.au/en/sms-send-status-codes?hsLang=en) and [Using Webhooks](https://support.gofax.com.au/en/using-webhooks?hsLang=en).

### Get SMS Replies

You can retrieve an SMS reply using a message ID of the originally sent message by sending a **GET** request to [**/v1.0/SMS/Reply/{smsId}**](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_ReplyByID) where "{smsId}" is the previously gather message ID ([see above](https://support.gofax.com.au/en/sms-messaging-using-the-api#SMSSendResponse)). 

The response will include *the first* SMS reply for that particular message ID.

```
{    "Success": true,    "Message": null,    "ValidationErrors": null,    "Response": {        "ID": 52358093,        "Message": "Yep it's working, this is my reply!", // The contents of the reply.        "RecipientID": 52378921,        "Charge": 0.00,        "Received": "2023-04-19T10:34:03.76", //Datetime the reply was received.        "RecipientNumber": "61412341234", //Recipient who replied        "IssuedUtc": "2023-04-19T00:34:03.76",    }}
```

Use the [**GET /v1.0/SMS/Replies**](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_Replies) and  **GET** **[/v1.0/SMS/Replies/{count}](https://restful-api.gofax.com.au/swagger/index.html?url=/swagger/v1/swagger.json#/SMSV1/SMSV1_RepliesByLimit)** endpoints to retrieve a list of replies, where "{count}" is the number of SMS replies you want to retrieve.

GET /v1.0/SMS/Replies/{count} also accepts a receivedUtc URL parameter, allowing to you only retrieve replies newer than 'receivedUtc' timestamp.

Timestamps are in the following format: "yyyy-mm-ddThh:MM:ss.fff" or "yyyy-mm-ddThh:MM:ss" 

e.g. 2023-08-06T1:00:00.000 or 2023-08-06T1:00:00

At this time, there is no webhook for incoming SMS replies, they must be queried directly on the API at an interval.

For further details regarding any of the above REST API endpoints, please refer to our API reference ([Swagger UI](https://restful-api.gofax.com.au/swagger)).

- [Fax](https://support.gofax.com.au/en/fax?hsLang=en#main-content)

    - [Sending Fax](https://support.gofax.com.au/en/fax?hsLang=en#sending-fax)
    - [Receiving Fax](https://support.gofax.com.au/en/fax?hsLang=en#receiving-fax)
    - [Fax Broadcast](https://support.gofax.com.au/en/fax?hsLang=en#fax-broadcast)
    - [Fax Number Porting](https://support.gofax.com.au/en/fax?hsLang=en#fax-number-porting)
    - [General](https://support.gofax.com.au/en/fax?hsLang=en#general)
- [SMS](https://support.gofax.com.au/en/sms?hsLang=en#main-content)

    - [Sending](https://support.gofax.com.au/en/sms?hsLang=en#sending)
    - [General](https://support.gofax.com.au/en/sms?hsLang=en#general)
    - [SMS Sender ID Register](https://support.gofax.com.au/en/sms?hsLang=en#sms-sender-id-register)
- [Account](https://support.gofax.com.au/en/account?hsLang=en#main-content)

    - [My Account](https://support.gofax.com.au/en/account?hsLang=en#my-account)
    - [My Settings](https://support.gofax.com.au/en/account?hsLang=en#my-settings)
- [Software and apps](https://support.gofax.com.au/en/software-and-apps?hsLang=en#main-content)

    - [GoFax App](https://support.gofax.com.au/en/software-and-apps?hsLang=en#gofax-app)
    - [GoFax Print Driver](https://support.gofax.com.au/en/software-and-apps?hsLang=en#gofax-print-driver)
- [Developers](https://support.gofax.com.au/en/developers?hsLang=en#main-content)

    - [Getting Started](https://support.gofax.com.au/en/developers?hsLang=en#getting-started)
    - [Webhooks](https://support.gofax.com.au/en/developers?hsLang=en#webhooks)
- [Integrations](https://support.gofax.com.au/en/integrations?hsLang=en)
- [Compliance and Security](https://support.gofax.com.au/en/compliance-and-security?hsLang=en)
- [GoFax Corporate](https://support.gofax.com.au/en/gofax-corporate?hsLang=en)
- [Frequently Asked Questions (FAQs)](https://support.gofax.com.au/en/frequently-asked-questions-faqs?hsLang=en)
- [GoFax (GoLogic) Partners](https://support.gofax.com.au/en/gofax-gologic-partners?hsLang=en)

[![Gofax-new-logo-180x45-min-2](https://support.gofax.com.au/hs-fs/hubfs/Gofax-new-logo-180x45-min-2.png?width=180&height=45&name=Gofax-new-logo-180x45-min-2.png "Gofax-new-logo-180x45-min-2")](http://gofax.com.au)

| [Contact Us](https://www.gofax.com.au/contact-us/) | [1300 928 872](tel:1300%20928%20872) | Intl: [+617 5227 8301](tel:+617%205227%208301) |
| --- | --- | --- |