API Reference
Migrate from Crisp
Move your contacts and conversations from Crisp into Relay with the CLI.
The Relay CLI can pull your contacts and conversations — with full message history — out of Crisp and push them into your Relay workspace, in one command.
Prerequisites
- The CLI installed and configured with a Relay API key that has the
conversations:writeandcontacts:writescopes — see CLI → Configure. - Crisp API credentials: a token identifier and token key from the Crisp Marketplace, plus your website ID from the Crisp dashboard.
1. Configure Crisp credentials
relay config \
--crisp-identifier <token-identifier> \
--crisp-key <token-key> \
--crisp-website-id <website-id>2. Preview, then migrate
Always do a dry run first — it fetches from Crisp and reports counts without writing anything to Relay.
relay migrate all --dry-run # see what would happen, writes nothing
relay migrate all # contacts, then conversations + messagesGranular variants if you'd rather run them separately:
relay migrate contacts # Crisp people → Relay contacts
relay migrate conversations # Crisp convos → Relay conversations + messagesOptions
All migrate subcommands accept:
| Option | Description |
|---|---|
--dry-run | Fetch from Crisp and report counts; write nothing to Relay. |
--inbox <id> | Target Relay inbox (defaults to the workspace's default inbox). |
--include-notes | Also import Crisp private notes (sent as visible messages prefixed 📝 [Note], since the public API has no private-note channel). |
--max-pages <n> | Cap how many Crisp pages to walk (default 1000). |
How data is mapped
- Contacts are de-duplicated by email against existing Relay contacts, so
re-running the migration won't create duplicates. Crisp segments, phone
number, and IDs are preserved in
customAttributes(taggedsource: "crisp"). - Messages keep their direction: a Crisp operator message becomes an
outgoing(agent) message, a visitor message becomesincoming. File and attachment payloads are imported as text references; Crisp events are skipped. - State maps
resolved → resolved,pending → pending, andunresolved → open. Status is applied after the messages are replayed, so an imported message doesn't accidentally reopen a resolved thread.
Run a dry run first
Migration writes real conversations and messages into your workspace. Start with
relay migrate all --dry-run to confirm the counts look right, and consider
targeting a dedicated --inbox for the imported data.