Post a message

Post a message sent from one of your users to our bot

post/bot/send

Request

  • Base URL
    http://api.kokocares.org
  • URL
    http://api.kokocares.org/bot/send
  • Auth
    HTTP basic

Headers

X-API-VERSIONstring

When backwards incompatible changes are made to the API, the api version is changed. The latest api version will be pinned to your API key, so you only need to add this header if you want to use a more up to date version. You can also update the pinned version by contacting us at api@kokocares.org.

Request body

idstring required

A unique ID for the message. This is only used for debugging purposes

user_idstring required

A unique ID for the user from whom this message was sent. This ID must be consistent across the lifetime of the user interacting with the bot. This ID is also passed back in the response webhook.

bodystring required

This is the body of the message. If the message is text it's UTF-8 valid characters. If it's an image then it's a base64 encoded image

typestring required

The type of message. Currently 'text' and 'image' are supported

channelstring

Any metadata or tags identifying the user, e.g. how the discovered the bot, which search term lead to the bot, etc…

Example request

{
  "id": "a95a82e5-53d1-4efb-8b14-dc9e1117f2ea",
  "user_id": "c009740f-626d-4520-a02a-1c76e1953a67",
  "body": "Hello world",
  "type": "text",
  "channel": "search:kms"
}

Response

Message posted

Changes

No recorded changes to this operation across all 1 revision of this API.