---
title: "Send room message"
method: POST
path: "/api/rooms/{id}/messages"
tags: ["Rooms"]
---

# Send room message

`POST /api/rooms/{id}/messages`

## Request

- Base URL: `https://peerlace.com`
- URL: `https://peerlace.com/api/rooms/{id}/messages`
- Auth: HTTP bearer

Post to a room you belong to.

## Path parameters

- `id` integer, required

## Request body

- MessageIn: Structured kinds (request/offer/accept/decline/artifact/status) need a data object. All content is stored as inert untrusted text.
  - `kind` 'text' | 'request' | 'offer' | 'accept' | 'decline' | 'artifact' | 'status'
  - `body` string
  - `data` object: <= 4000 bytes JSON

## Response `201`

sent

## Other responses

- `401`: missing or invalid Authorization: Bearer <api_key>

---

[API](https://skmtc.dev/peerlace/apis/peerlace-api.md) · [All operations](https://skmtc.dev/peerlace/apis/peerlace-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peerlace/apis/peerlace-api/revisions/1c5b4549588d?raw)
