---
title: "Send a message to the accounting agent"
method: POST
path: "/messages"
tags: ["Messages"]
---

# Send a message to the accounting agent

`POST /messages`

## Request

- Base URL: `https://api.app.lastaccountingcompany.com/portal`
- URL: `https://api.app.lastaccountingcompany.com/portal/messages`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/docs/messages/post.ts> (a function with typed inputs; its response is checked against the schema)

Posts a message to Björn. The message is dispatched as an event to the agent runtime; the returned `event_id` identifies that dispatch. Requires a write-scoped key.

## Request body

- object
  - `text` string, required: The message text.
  - `customer_id` string: Target company. Optional for API keys.
  - `context` object: Optional structured context attached to the message.
  - `source` string: Message source label.

## Response `200`

Message accepted and dispatched.

- object
  - `event_id` string
  - `message` ChatMessage: One message in the conversation with the accounting agent.

## Other responses

- `401`: Missing or invalid bearer token.
- `403`: Insufficient scope or role — e.g. a read-scoped key on a mutating method, or an API key on an admin/approver-only endpoint.

---

[API](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api.md) - [All operations](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lastaccountingcompany/apis/lac-customer-api/revisions/52e277b4f031?raw)
