Documentation menu

Guides

Hosted inbox & history

Optional. Let the platform store every message in and out, copy media to permanent links, resolve profile pictures, and serve it all back over read endpoints.

Turn it on

# 1. give the session a workspace id (any string you choose)
POST https://api.meowsapp.com/set-org-id     { "clientId": "acmemain", "orgId": "acme" }

# 2. point its webhook at the hosted receiver, using your account token as the webhook token
POST https://api.meowsapp.com/set-webhook    { "clientId": "acmemain", "webhookUrl": "https://api.meowsapp.com/save-message", "webhookToken": "<your account token>" }

Both settings persist. From that moment every inbound event and every API send is written to history, media is downloaded and stored, and each chat's profile picture is resolved (at most once per 24 h) and mirrored so the link never expires.

orgId is yours to define

Use one orgId per tenant/workspace. It scopes the media library (/media-files?orgId=) and appears on every event as orgId, so a single webhook can serve many tenants.

Read history

GET https://api.meowsapp.com/chatrooms?clientId=acmemain
GET https://api.meowsapp.com/chatrooms/acmemain-60111111111111-123456789012345/messages
GET https://api.meowsapp.com/chatrooms/acmemain-60111111111111-123456789012345/messages/3EB0…/media-url

/chatrooms lists chats newest-first with unreadCount, lastMessage and avatarUrl. /messages returns the last 200 messages of a chat, oldest first:

One message
{
  "messageId": "3EB0…", "chatRoomId": "acmemain-6011…-1234…", "clientId": "acmemain",
  "body": "Here you go", "messageType": "image", "fromMe": false, "pushname": "Jane", "sentAt": "2026-08-28T05:22:55Z",
  "deleted": false, "fromAi": false,
  "media": { "mimeType": "image/jpeg", "mediaType": "image", "fileName": "photo.jpg", "fileSize": 102400 },
  "downloadUrl": "https://files.meowsapp.com/…/acme/acmemain/2a7b….jpg",
  "extras": {
    "quoted": { "messageId": "3EB0…", "body": "Can you send the photo?", "type": "text" },
    "reactions": { "60111111111111": "👍" },
    "edited": false, "meta": { "fromAI": false, "userId": "agent_7" }
  }
}

messageType: chat, image, video, audio, document, sticker, contact, location, poll, vote_update, interactive, interactive_reply. Edits update body and set extras.edited / editHistory; deletes set deleted: true; reactions accumulate in extras.reactions.

Media & profile pictures

Stored files live on a public CDN domain, one object per message, scoped by orgId and clientId. Links are permanent and safe to embed. Profile pictures are stored once per picture version — a new object only when the contact changes their photo. For chats created before you enabled history, run POST /refresh-avatars {"clientId"} once to backfill.

Unread counts & receipts

  • POST /chatrooms/{id}/read — resets the hosted unreadCount only.
  • POST /mark-read — sends WhatsApp read receipts (blue ticks) and resets the count.
  • POST /mark-unread — flags the chat unread on the phone itself.

Combining with your own webhook

A session has one webhookUrl. To keep hosted history and drive your own automations, point the webhook at your server and forward each event unchanged to POST https://api.meowsapp.com/save-message with your account token as the bearer — the receiver is idempotent on(clientId, chatRoomId, messageId), so retries are harmless.