An Intercom API mock for handling conversations.
Give your agent seeded customer conversations and support teams. It can reply or add a note; retrieve the conversation parts to check the author, text and reply type.
conversation_repliedCalls POST /conversations/*/reply
Starting records
conversations
- ref
ridgeway_export- title
Last month’s CSV export
admins
- ref
ancha- name
Ancha assistantancha@acme.example
Connect your agent to the Intercom mock
When ancha runs your agent, it sets:
INTERCOM_API_URLINTERCOM_ACCESS_TOKEN
Point the client you already use at them.
import { IntercomClient } from 'intercom-client';
const intercom = new IntercomClient({ token: process.env.INTERCOM_ACCESS_TOKEN!, baseUrl: process.env.INTERCOM_API_URL });
const open = await intercom.conversations.search({ query: { field: 'state', operator: '=', value: 'open' } });
// open.data is the first page; `for await (const c of open)` walks every page.Locally, ancha runs your agent as an ordinary process, so keep real Intercom credentials out of its environment.
See all 48 endpoints
admins
/admins/admins/:id/admins/:id/awayarticles
/articles/articles/articles/:id/articles/:id/articles/searchcompanies
/companies/companies/companies/:id/companies/:id/companies/:id/contacts/companies/listcontacts
/contacts/contacts/contacts/:id/contacts/:id/contacts/:id/contacts/:id/archive/contacts/:id/companies/contacts/:id/companies/contacts/:id/companies/:company/contacts/:id/notes/contacts/:id/notes/contacts/:id/tags/contacts/:id/tags/contacts/:id/tags/:tag/contacts/:id/unarchive/contacts/find_by_external_id/:id/contacts/searchconversations
/conversations/conversations/conversations/:id/conversations/:id/conversations/:id/parts/conversations/:id/reply/conversations/:id/tags/conversations/:id/tags/:tag/conversations/searchme
/menotes
/notes/:idtags
/tags/tags/tags/:id/tags/:idteams
/teams/teams/:idSeed your own data
The data the Intercom mock starts with on every run, cut to a few records. ancha twins seed intercom prints every field.
Full seed YAML
twins:
- intercom
seed:
intercom:
workspace:
name: Acme
me: ancha
admins:
- ref: ancha
name: Ancha assistant
email: ancha@acme.example
job_title: Support assistant
- ref: mike
name: Mike Turner
email: mike@acme.example
job_title: Support lead
- ref: tom
name: Tom Hughes
email: tom@acme.example
job_title: Sales
away: true
teams:
- ref: support
name: Support
members:
- ancha
tags:
- ref: pilot
name: Pilot
companies:
- ref: ridgeway
name: Ridgeway Robotics
company_id: ridgeway-robotics
plan: Pilot
size: 240
industry: Robotics
created: -400h
contacts:
- ref: erin
name: Erin Walsh
email: erin.walsh@ridgeway-robotics.example
external_id: usr_ridgeway_erin
companies:
- ridgeway
tags:
- pilot
city: Pittsburgh
country: United States
custom_attributes:
plan_seats: 25
pilot_ends: 2026-11-14
created: -400h
last_seen: -40m
notes:
- author: tom
body: Pilot runs through November 14. Erin decides together with their VP of Operations.
at: -390h
conversations:
- ref: ridgeway_export
contact: erin
title: Last month’s CSV export
body: Hi! We can’t find last month’s CSV export anywhere. Our ops review is tomorrow morning — where did it go?
created: -36m
assignee: mike
team: support
priority: true
tags:
- pilot
parts:
- type: assignment
author: mike
at: -34m
articles:
- ref: csv_export
title: Download a CSV export
description: Find and download monthly exports
author: mike
created: -2000h
body: <p>Go to <b>Reports → Exports</b>, choose the month, then <b>Download CSV</b>. A new export can take two minutes to appear.</p>
Check what your agent did
Checks YAML
checks:
- id: conversation_replied
trace:
called: POST /conversations/*/replyMore customer support tools
All 43 toolsIntercom API mock FAQ
Can an Intercom support agent leave an internal note?
In Ancha’s Intercom mock, POST / accepts type: admin, admin_id, message_type: note and body. It saves the note as a conversation part and returns the updated conversation.
Does a customer reply reopen a closed Intercom conversation?
A contact’s comment sent to the mock’s / changes the conversation’s state to open and clears snoozed_until. It also sets waiting_since to the current simulated time and read to false.
How can my agent find open Intercom conversations assigned to a team?
Send POST / to the mock with an AND query combining state and team_assignee_id filters. Matching conversations are returned with the newest updated_at first.
Install the CLI and run your agent against the Intercom mock.
Ancha is not affiliated with Intercom.