MO [User Initiated]

Anytime a message originates from a sender, the following is sent to the Callback URL

The REST API provides the ability to the client applications to get directly connected with the TFSC platforms. The TFSC platform then submits the incoming requests to the client application over the HTTP/HTTPS API and waits for the return response from the API. The client application performs the necessary action based on the API inputs, and responds with the appropriate response message for the sender.

Callback URL

CURRENTLY IN A PRIVATE BETA, SETTINGS AND VALUES MAY CHANGE WITHOUT PRIOR NOTICE. FOR ANY SUPPORT; PLEASE RAISE A TICKET WITH assist+tfsc@kdc.in OR WhatsApp.

SAMPLE

curl --location --request POST '<calback_url>' \
--header 'Authorization: Bearer <shared_during_onboarding>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "shortcode": "#####XYZ",
    "message": "Hi, can I get the a demo",
    "msisdn": "911234567890",
    "sender": {
        "cc": "91",
        "ndc": "1234",
        "sn": "567890",
        "operator": "vodafone-idea",
        "circle": "mumbai"
    },
    "tsiso": "2022-08-22T10:25:54.320Z",
    "tsunix": 1661163954320
}'

Parameters to the APIs

POST JSON data to the URL. Response Body is session reply.

POST <callback_url>

The text/plain body reply to this callback will be sent back as the session reply message to the sender. Timeout on 30 seconds for the reply. Blank Output/ Body or Timeout session will not send any reply.

Headers

Name
Type
Description

authorization*

STRING

Bearer Token as shared during onboarding.

Request Body

Name
Type
Description

shortcode*

NUMERIC

The number on which the sender has sent the message

msisdn*

NUMERIC

The 12-digit mobile number (including country code) of the sender. Only Indian Numbers will be passed through.

message*

STRING

Raw message text sent by the sender.

sender.circle

STRING

Telecom circle of the sender (May send empty if MNP or if the information is unavailable).

sender.operator

STRING

Telecom operator of the sender (May send empty if MNP or if the information is unavailable). Value: airtel, vodafone, vodafone-idea, reliance-jio, etc.

sender.cc*

NUMERIC

Country Code. Only 91 will be passed through.

Length: 2

Value: 91

sender.ndc*

NUMERIC

National Destination Code, identifies one or part of a PLMN

Length: 4

sender.sn

NUMERIC

Subscriber Number Length: 6ISO 8601

tsiso*

TIMESTAMP

ISO 8601 in UTC Example: 2022-08-08T18:29:00.000Z

tsunix*

TIMESTAMP

EPCOH UNIX in UTC Example: 1659983340

Content-Type: text/plan
Thank you for contacting. \nOur team will get back to you soon.

Version: 0.1.0

Date: 2022-08-08

We will soon be migrating to https://docs.tfsc.dev

Last updated

Was this helpful?