Intercom REST API bindings: the surface a support agent works.

  • ::intercom::conversations lists, searches, replies, adds notes, assigns, snoozes, opens and closes conversations
  • ::intercom::contacts creates, finds, updates and searches contacts, and manages their notes and companies
  • ::intercom::companies creates or updates companies
  • ::intercom::tags lists and creates tags, and tags or untags contacts and conversations
  • ::intercom::tickets creates, updates and searches tickets
  • ::intercom::articles lists, reads and searches Help Center articles
  • ::intercom::events submits data events
  • ::intercom::admins finds the admin id to act as
  • ::intercom::webhooks verifies X-Hub-Signature
  • ::intercom::api/request is the escape hatch for anything else

Setup: context variables:

  • intercom.token: an access token from the Developer Hub
  • intercom.admin.id: the admin to act as for replies, notes, assignment and state changes (find it with ::intercom::admins/me())
  • intercom.region (optional): us (default), eu or au, the region your workspace is hosted in
  • intercom.version (optional): override the pinned Intercom-Version

Every API-calling function also takes a trailing opts Map for per-call credentials and settings; see ::intercom::api.

Quick start

::conversations ::intercom::conversations

page ::conversations/search-conversations({field: "open", operator: "=", value: true}, {per_page: 20})

convo first(page.conversations)
::conversations/add-note(convo.id, "Customer is on the enterprise plan; escalate to tier 2.")
::conversations/reply(convo.id, "Thanks for the report! A fix ships this week.")

Values

API_VERSION

API_VERSION: Str "2.17"

BASE_URLS

BASE_URLS: Map {
  us: "https://api.intercom.io",
  eu: "https://api.eu.intercom.io",
  au: "https://api.au.intercom.io"
}