Skip to content

Send a message

Send text to a person, group, or channel.

2 min read

Send text

POST /v1/messages/send
Authorization: Bearer knk_live_...
Content-Type: application/json
Idempotency-Key: optional-unique-key

Requires API key scope messages:send.

export BASE=https://api.example.com
export KEY=knk_live_...

curl -sS -X POST "$BASE/v1/messages/send" 
  -H "Authorization: Bearer $KEY" 
  -H "Idempotency-Key: order-2048-confirm" 
  -H "Content-Type: application/json" 
  -d '{"to": "peer_username", "message": "Hello"}'

type is optional for text — when message is present, the server sets type: text.

Destination (to)

Toto value
PersonalKenalko username (lowercase)
Group or channelRoom ULID (26 chars)

Never send both to and group_id. Legacy group_id-only sends still work — prefer to.

Unknown username → 404. Not connected / not a member / channel send restricted → 403.

201 response

FieldMeaning
message_idServer ULID
typepersonal or group (groups and channels)
toPeer username or room ULID
message_typetext, button, attachment, …
statusAlways sent on HTTP — delivery/read via webhooks
expires_atInteractive button/list card expiry only, when set

Check your key

curl -sS "$BASE/v1/me" -H "Authorization: Bearer $KEY"
# { "username": "your_account" }

Not billable; messages:send scope not required.

What you can send

KindDoc
TextThis page
File from URLAttachments
ButtonsButtons
ListLists
Form (form_id)Forms

Do not combine url with button/list/form. Forbidden body fields: id, sender_id, send_source.

@ai (text)

Requires @ai in message and context.mentions with { "type": "ai" }. Insufficient token budget → 402.

See also