---
updatedAt: 2025-11-13T22:46:07.000Z
agentTools:
  projectIndex: https://developers.kokocares.org/llms.txt
---

# Post a message

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

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Koko Bot API",
    "description": "The bot api provides support for integrating Koko's bot into your native messaging",
    "contact": {
      "email": "api@kokocares.org"
    },
    "version": "0.1"
  },
  "servers": [
    {
      "url": "http://api.kokocares.org"
    }
  ],
  "paths": {
    "/bot/send": {
      "post": {
        "summary": "Post a message",
        "description": "Post a message sent from one of your users to our bot\n",
        "parameters": [
          {
            "name": "X-API-VERSION",
            "in": "header",
            "description": "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.\n",
            "required": false,
            "style": "simple",
            "explode": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Message"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Message posted"
          },
          "403": {
            "description": "Unauthenticated"
          }
        },
        "security": [
          {
            "basicAuth": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Message": {
        "required": [
          "body",
          "id",
          "type",
          "user_id"
        ],
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "A unique ID for the message. This is only used for debugging purposes",
            "example": "a95a82e5-53d1-4efb-8b14-dc9e1117f2ea"
          },
          "user_id": {
            "type": "string",
            "description": "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.",
            "example": "c009740f-626d-4520-a02a-1c76e1953a67"
          },
          "body": {
            "type": "string",
            "description": "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",
            "example": "Hello world"
          },
          "type": {
            "type": "string",
            "description": "The type of message. Currently 'text' and 'image' are supported",
            "example": "text"
          },
          "channel": {
            "type": "string",
            "description": "Any metadata or tags identifying the user, e.g. how the discovered the bot, which search term lead to the bot, etc…",
            "example": "search:kms"
          }
        }
      }
    },
    "securitySchemes": {
      "basicAuth": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```