Receive a SMS

To forward a new incoming SMS, tyntec makes a POST request to your $callbackUrl.

Over-length messages are recomposed before being forwarded to your webserver.

tyntec's application will retry delivery every 10 seconds in case your application does not accept the inbound message (200, 201, 202 status code). Retries are paused for 10 minutes after every 100 consecutive unsuccessful delivery attempts. tyntec's application will retry for a maximum of 48 hours.

 

The following code block gives a basic example of how the request will look like:

Receiving SMS (JSON)

curl
-X POST
-H "Content-Type: application/json" 
-d 	
'{
"from":"+491622943176",
"to":"+14155270903",
"message":"This is an example.",
"originMCC":"262",
"originMNC":"02",
"originTtId":"2"
"totalPrice":"0.002",
"requestId":"12-75cfafba-8799-4f2b-8505-ece6af6abf01",
"size":1,
"missingParts":false,
"contentList":
  [{
  "msgId":"12-1407778865439+1234567890",
  "sentDate":"2014-05-13T17:41:06+0100",
  "price":"0.001",
  "currency":"EUR",
  "priceEffective":"2010-11-01T00:00:00+0000"
  "sequenceNumber":1,
  ]}
}'
https://rest.customer.com/inboundmessages/

The parameters in this request have the following meaning:

Parameter Possible Values Description
from any international phone number or string This parameter gives the phone number of the sending party in international format if available or any other received sender idendification.
to any of your numbers provided by tyntec in international format This parameter gives your number provided by tyntec that has received the respective message.
message any UTF-8 encoded string

The received message will be sent to you as a UTF-8 encoded string.

Note: Missing parts of an over-length message will be marked with <...> at the respective position within the message
originMCC

UTF-8 encoded string according to ITU E.212

A representative MNC (Mobile Network Code) of the originating network.
originMNC

UTF-8 encoded string according to ITU E.212

A representative MNC (Mobile Network Code) of the originating network.
originTtId integer

The respective tyntec ID of the originating network.

totalPrice float The sum of prices for each message part listed in “contentList”.
requestId   The unique identifier provided for each request (retries will use the same requestId as the original request for easy message tracking).
size integer The amount of respective concatenated SMS parts.
missingParts boolean True in case a part of an over-length was not received by the tyntec platform and the forwarded message text is incomplete.
contentList  

tyntec merges over-length (concatenated) SMS into one string before sending it to your webserver.

The contenList provides detailed information on each message part.

 

NOTE: tyntec will charge for each part of the concatenated message as an individual message!
msgId   The unique identifier provided by tyntec for each message part.
price float

The price per message from the respective network.

Negative prices represent payout in favor of tyntec’s customer.
currency currency code following ISO 4217 The currency in which the pricing is given; corresponding to the currency of the invoice.
priceEffective date in the format “yyyy-MM-ddTHH:mm:ss+HHmm” (according to ISO 8601) The date when the “price” became effective.
sentDate   The time stamp when the SMS has been received by the sending MSC (if available).

or

The time stamp when the respective message was received by tyntec.
sequenceNumber integer In case an over-length message is received tyntec recomposes the full message text before forwarding. The “sequenceNumber” indicates the order of the message part.