Skip to main content
Use Re:amaze through Corsair: one client, typed API calls. Every Re:amaze customer runs their own brand, so there is no shared API host. Set reamaze({ host: 'acme.reamaze.io' }) or store it with keys.set_host(host). The brand name on its own (acme) and a pasted https://acme.reamaze.io/ are accepted too. Requests only go to https://<brand>.reamaze.io: another domain, an IP address or a port is rejected before anything is sent. Without a host the plugin throws before it sends anything. Credentials are a login email and a personal API token, sent as HTTP Basic. The token lives under Settings, then API tokens, inside the brand. Store the pair as the account’s api_key, JSON-encoded as {"email":"...","token":"..."}, which is how a single-string key carries two values; reamaze({ key }) takes the same string. Things to know before you call:
  • Paging is by page number. Pass page; the response carries page_size, page_count and total_count. channels.list sends only total_count, so read channels.length for that route.
  • Three routes answer a bare array, not a wrapper: contact notes, incidents and systems. The plugin wraps each under a named key (notes, incidents, systems) so a caller always reads a collection, and a non-array body throws instead of becoming an empty list.
  • Report payloads are maps, not arrays. reports.volume keys conversation counts by YYYY-MM-DD, reports.tags keys tag counts by tag name, reports.staff keys metrics by staff display name, and reports.channelSummary keys them by channel id. Read them with Object.entries.
  • Conversation status is an integer: 0 open, 1 responded, 2 done, 3 spam, 4 archived, 5 on hold, 6 auto-done, 7 and 8 for the AI agent, 9 AI spam.
  • Request bodies are wrapped, in conversation, message, contact, identity, article, incident, response_template or staff. Notes are the exception: notes.create and notes.update send the fields unwrapped, as a bare { body } plus the optional creator_email and created_at.
  • incidents.update is a PUT. The vendor heading says PUT and its curl example sends -X POST; the route only answers PUT, so that is what the endpoint sends.
  • An unknown route answers HTML, not JSON. An unknown resource answers {"errors":"Not Found"}, an unknown route {"status":404,"error":"Not Found"}, and a validation failure a map of field to message with status 422.
What you get:
  • 38 typed API operations

Setup

1

Install

2

Add the plugin

corsair.ts
With multiTenancy: true, scope calls with corsair.withTenant(id). See Quick start for KEK + Hub keys, and Multi-tenancy for account isolation.
3

Choose authentication

4

Connect a tenant

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see Connect / OAuth.

Example API calls

List recent conversations
Reply to a conversation
See the full list on the API page.

What’s next

API reference

Every reamaze.api.* operation with input and output types.

Connect / OAuth

createLink, Hub delivery, and tenant connect flows.

Use with agents

Expose this plugin’s operations as MCP tools.