Postback Event

This event object is received as a response for the postback action of an action object.
It can be used when the following messages are sent, where an event object whose type property is "postback" is sent.

  • Carousel messages
  • Image carousel messages
  • Message rich menus

Request {#postback-event-request}

ParameterTypeRequiredDescription
typestringYSet this parameter to "postback".
sourceobjectYThe subject that sent a callback message.
source.userIdstringYThe default account of the user who talked with the message bot.
source.channelIdstringYThe message room ID to which the user belongs.
source.domainIdnumberYThe domain ID to which the user belongs.
issuedTimestringYThe date and time when the event occurred (format: YYYY-MM-DDThh:mm:ss.SSSZ).
datastringYPostback data

Request example {#postback-event-request-example}

POST /callback HTTP/1.1Host: YOUR_SERVER_HOST_NAMEContent-type: application/json; charset=UTF-8X-WORKS-Signature: 9crxWhZ9aQO/9ruUM4MH3dF/WRGYRhj0vSR4cRyJfHQ=X-WORKS-BotId: 123{  "type": "postback",  "source": {    "userId": "c72af563-0f21-4736-11e4-045237113344",    "channelId": "12345",    "domainId": 40029600  },  "issuedTime":"2022-01-04T05:16:05.716Z",  "data": "action=buy"}

Response (customer's server receiving messages -> message server) {#postback-event-response}

It should return HTTP status 200 if successful.
The HTTP request sent by a callback is not resent even if it failed.

Response {#postback-event-response-example}

HTTP/1.1 200 OKContent-Type: application/jsonServer: YOUR_SERVER_HOST_NAMEContent-Length: 0