Docs

Receive message

https://api.apifonica.com/v2/accounts/{accountSID}/messages

Overview

To receive an incoming SMS you need to set an ID of the application, that will be responsible for incoming SMS (msg_app_sid parameter), in the properties of the mobile number.
Make PUT request to /accounts/{accountSID}/numbers/{numberSID}. For more details please refer to Change number properties article.

In the controller parameter of the linked application, it is necessary to specify the URL, leading to the application on your server, that will receive the SMS.
Make POST request to /accounts/{accountSID}/applications. For more details please refer to Create application article.

When you receive an SMS to a number, Apifonica will access the URL specified in msg_app_sid and send there an object of the following type:

{
    "message_sid": "{messageSID}",
    "account_sid": "{accountSID}",
    "from": "35315313424",
    "to": "358942704934",
    "text": "Apifonica API provides a really cool SMS messaging service",
    "status": "received"
}

 

Parameter name

Description

message_sid

Message unique identifier.

account_sid

Account unique identifier.

from

Sender’s phone number.

to

Recipient’s phone number.

text

Message text.

status

The current message status.

received - message was received by your Apifonica number. Works only for inbound messages.

Description

Message unique identifier.

Description

Account unique identifier.

Description

Sender’s phone number.

Description

Recipient’s phone number.

Description

Message text.

Description

The current message status.

received - message was received by your Apifonica number. Works only for inbound messages.