---
title: "Create Messages"
method: POST
path: "/api/v1/widget/messages"
tags: ["Widget::Messages"]
---

# Create Messages

`POST /api/v1/widget/messages`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/v1/widget/messages`
- Auth: none required

## Request body

- object
  - `id` string
  - `before` string
  - `after` string
  - `website_token` string
  - `contact` object[]
    - `name` string
    - `email` string
  - `message` object[]
    - `content` string
    - `referer_url` string
    - `timestamp` string
    - `echo_id` string
    - `reply_to` string

## Response `200`

Success

- object
  - `id` string
  - `content` string
  - `inbox_id` integer
  - `conversation_id` integer
  - `message_type` integer
  - `created_at` string, date-time
  - `private` boolean
  - `source_id` string
  - `content_attributes` object
  - `attachments` string
  - `sender` string

## Other responses

- `401`: Unauthorized

---

[API](https://skmtc.dev/cloudhumans/apis/cloudchat-api.md) - [All operations](https://skmtc.dev/cloudhumans/apis/cloudchat-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cloudhumans/apis/cloudchat-api/revisions/18199bd17cc5?raw)
