Get Template Message

post
Header parameters
X-USER-TOKENstringRequired

The secret key provided by iSlash for accessing the iSlash API platform

Body
sessionstringRequired

The session key generated by your admin for controlling which channel is allowed to send message across API

Responses
200
Success
application/json
post
POST /api/public/template-message HTTP/1.1
Host: {islash_api_endpoint}
X-USER-TOKEN: text
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "session": "text"
}
200

Success

{
  "meta": {
    "code": "text",
    "message": "text"
  },
  "data": {
    "templates": [
      {
        "id": 1,
        "emma_template_id": "text",
        "namespace": "text",
        "name": "text",
        "language": "text",
        "status": "text",
        "created_at": "text",
        "updated_at": "text",
        "components": [
          {
            "type": "text",
            "format": "text",
            "text": "text",
            "buttons": [
              {
                "type": "text",
                "text": "text",
                "url": "text",
                "phone_number": "text"
              }
            ]
          }
        ]
      }
    ]
  }
}
Response Example
{
    "meta": {
        "code": "RESP_OKAY",
        "message": "Success"
    },
    "data": {
        "templates": [
            {
                "id": 19,
                "emma_template_id": "1457356487940772",
                "namespace": "e0c33801_c325_469b_bdb0_dfd2915b75ea",
                "name": "payment_update_en",
                "components": [
                    {
                        "type": "HEADER",
                        "format": "TEXT",
                        "text": "Payment Update"
                    },
                    {
                        "type": "BODY",
                        "text": "Hello {{1}}, the payment of your order {{2}} has been received"
                    },
                    {
                        "type": "FOOTER",
                        "text": "iSlash"
                    },
                    {
                        "type": "BUTTONS",
                        "buttons": [
                            {
                                "type": "URL",
                                "text": "Order Detail",
                                "url": "https://islash.io/order"
                            },
                            {
                                "type": "PHONE_NUMBER",
                                "text": "Contact Us",
                                "phone_number": "+85298297833"
                            }
                        ]
                    }
                ],
                "language": "en_US",
                "status": "APPROVED",
                "category": "PAYMENT_UPDATE",
                "created_at": 1644220818,
                "updated_at": 1644220818
            }
        ]
    }
}

Last updated