Send RCS Message

API Endpoint

You can send an RCS message by using the following API.

https://enterprise.smsgupshup.com/GatewayAPI/rest 

Please use this URL for all API methods. Our API has been designed to allow you to access an SSL Enabled connection for added security i.e. supports Hypertext Transfer Protocol over Secure Socket Layer (HTTPS) protocol.

Get Call

curl --request GET 'https://enterprise.smsgupshup.com/GatewayAPI/rest?method=SendMessage&send_to=9199xxxxxxxx&msg={{ENCODED_JSON}}&msg_type=TEXT&userid=XXXXXX&auth_scheme=plain&password=password&v=1.1&format=text '
{{ ENCODED_JSON }} 

Post call

curl --location --request POST 'https://enterprise.smsgupshup.com/GatewayAPI/rest' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'method=SendMessage' \
--data-urlencode 'send_to=9199xxxxxxxx \
--data-urlencode 'msg={{MESSAGE_JSON}}' \
--data-urlencode 'msg_type=TEXT' \
--data-urlencode 'userid=XXXXXX' \
--data-urlencode 'auth_scheme=plain' \
--data-urlencode 'password=password' \
--data-urlencode 'v=1.1' \
--data-urlencode 'format=text'

Sample JSON without custom variables

{
  "contentMessage": {
    "templateMessage": {
      "templateCode": “Test_Template"//Refer to the previous section how //to obtain it 
    }
  }
}

Sample JSON with custom variables

{
  "contentMessage": {
    "templateMessage": {
      "templateCode": " Test_Template ",//Refer to the previous section //how to obtain it
       "customParams":"{\"DISCOUNT:\":\"20%\",   \"CODE\":\”DISC\” }"
    }
  }
}

Sample API Response

●	format=text

success | 9199xxxxxxxx | 4843671605020377110-242097152723471982

●	format=json

{
    "response": {
        "id": "4845032196180770877-390760589280616033",
        "phone": "9199xxxxxxxx",
        "details": "",
        "status": "success"