Skip to main content
POST
/
messages
Send a message to the accounting agent
curl --request POST \
  --url https://api.app.lastaccountingcompany.com/portal/messages \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "customer_id": "<string>",
  "context": {},
  "source": "portal"
}
'
{
  "event_id": "<string>",
  "message": {}
}

Authorizations

Authorization
string
header
required

Portal API key minted in portal Settings → API access. Scope read or write; pinned to one company. Send as Authorization: Bearer lac_sk_....

Body

application/json
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
default:portal

Message source label.

Response

Message accepted and dispatched.

event_id
string
message
object

One message in the conversation with the accounting agent.