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.

Connect your agent
The test
  • conversation_replied

    Calls POST /conversations/*/reply

Starting records

  • conversations

    ref
    ridgeway_export
    title
    Last month’s CSV export
  • admins

    ref
    ancha
    name
    Ancha assistant
    email
    ancha@acme.example

Connect your agent to the Intercom mock

When ancha runs your agent, it sets:

  • INTERCOM_API_URL
  • INTERCOM_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

GET/admins
GET/admins/:id
PUT/admins/:id/away

articles

GET/articles
POST/articles
GET/articles/:id
PUT/articles/:id
GET/articles/search

companies

GET/companies
POST/companies
GET/companies/:id
PUT/companies/:id
GET/companies/:id/contacts
POST/companies/list

contacts

GET/contacts
POST/contacts
GET/contacts/:id
PUT/contacts/:id
DELETE/contacts/:id
POST/contacts/:id/archive
GET/contacts/:id/companies
POST/contacts/:id/companies
DELETE/contacts/:id/companies/:company
GET/contacts/:id/notes
POST/contacts/:id/notes
GET/contacts/:id/tags
POST/contacts/:id/tags
DELETE/contacts/:id/tags/:tag
POST/contacts/:id/unarchive
GET/contacts/find_by_external_id/:id
POST/contacts/search

conversations

GET/conversations
POST/conversations
GET/conversations/:id
PUT/conversations/:id
POST/conversations/:id/parts
POST/conversations/:id/reply
POST/conversations/:id/tags
DELETE/conversations/:id/tags/:tag
POST/conversations/search

me

GET/me

notes

GET/notes/:id

tags

GET/tags
POST/tags
GET/tags/:id
DELETE/tags/:id

teams

GET/teams
GET/teams/:id

Seed 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/*/reply

More customer support tools

All 43 tools

Intercom API mock FAQ

Can an Intercom support agent leave an internal note?

In Ancha’s Intercom mock, POST /conversations/:id/reply 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 /conversations/:id/reply 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 /conversations/search 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.

Book a demo

Ancha is not affiliated with Intercom.