# Intercom on boxd

> Intercom provides live chat, messaging, and customer engagement tools, enabling businesses to drive conversions, handle support, and personalize communication at scale.

- Page: https://boxd.sh/integrations/intercom/
- CLI: `run intercom` (131 commands, 30 marked common)
- SDK: `import { intercom } from "@boxd/run"`; every parameter and response type is at `@boxd/run/intercom`
- Triggers: none
- Connect: `run auth intercom` (Sign in with Intercom), or https://app.boxd.sh/integrations/detail/intercom
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth intercom      # once: prints a link to connect your account
run intercom           # list its commands
run intercom list-tags
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, intercom } from "@boxd/run";

every("1 hour", async () => {
  const result = await intercom.listTags();
  console.log(result);
});
```

Run it with `run intercom.run.ts`. Intercom has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run intercom <command> --help` lists the optional ones. "common" marks what `run intercom` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `add-subscription-to-contact` | `intercom.addSubscriptionToContact()` | `--consent-type` `--contact-id` `--id` | 0 | You can add a specific subscription to a contact |
| `add-tag-to-contact` | `intercom.addTagToContact()` | `--contact-id` `--id` | 0 | Add a tag to a contact in Intercom |
| `archive-contact` ·common | `intercom.archiveContact()` | `--contact-id` | 0 | Archive a single contact in Intercom |
| `assign-conversation` ·common | `intercom.assignConversation()` | `--conversation-id` | 3 | Assigns a conversation to a specific admin or team in Intercom |
| `attach-contact-to-company` ·common | `intercom.attachContactToCompany()` | `--company-id` `--contact-id` | 0 | Attach a contact to a company in Intercom |
| `attach-contact-to-conversation` ·common | `intercom.attachContactToConversation()` | `--admin-id` `--conversation-id` `--customer` | 0 | Attach a contact participant to a conversation on behalf of admin or contact |
| `attach-tag-to-conversation` | `intercom.attachTagToConversation()` | `--admin-id` `--conversation-id` `--id` | 0 | Add a tag to a specific conversation in Intercom |
| `attach-tag-to-ticket` | `intercom.attachTagToTicket()` | `--admin-id` `--id` `--ticket-id` | 0 | Add a tag to a ticket in Intercom |
| `block-contact` ·common | `intercom.blockContact()` | `--contact-id` | 0 | Block a single contact in Intercom |
| `cancel-data-export` | `intercom.cancelDataExport()` | `--job-identifier` | 0 | Cancel an active content data export job |
| `close-conversation` ·common | `intercom.closeConversation()` | `--admin-id` `--conversation-id` | 1 | Closes a conversation in Intercom, marking it as resolved |
| `create-article` | `intercom.createArticle()` | `--author-id` `--title` | 339 | You can create a new article by making a POST request to `https://api.intercom.io/articles` |
| `create-collection` | `intercom.createCollection()` | `--name` | 115 | You can create a new collection by making a POST request to `https://api.intercom.io/help_center/collections.` |
| `create-contact` ·common | `intercom.createContact()` | — | 11 | Create a new contact in Intercom workspace |
| `create-content-import-source` | `intercom.createContentImportSource()` | `--sync-behavior` `--url` | 1 | Create a new content import source for the Fin Content Library |
| `create-conversation` ·common | `intercom.createConversation()` | `--body` | 5 | Creates a new conversation in Intercom |
| `create-data-attribute` | `intercom.createDataAttribute()` | `--data-type` `--model` `--name` | 3 | Create a custom data attribute for contacts or companies |
| `create-data-event` | `intercom.createDataEvent()` | `--created-at` `--event-name` | 4 | Submit a data event to Intercom to track user activities |
| `create-data-export` | `intercom.createDataExport()` | `--created-at-after` `--created-at-before` | 0 | Initiate an async data export job for message content |
| `create-external-page` | `intercom.createExternalPage()` | `--external-id` `--html` `--locale` `--source-id` `--title` `--url` | 2 | Create an external page in Fin Content Library or update an existing page by external ID |
| `create-help-center-section` | `intercom.createHelpCenterSection()` | `--name` `--parent-id` | 1 | Create a new help center section within a collection |
| `create-internal-article` | `intercom.createInternalArticle()` | `--author-id` `--owner-id` `--title` | 2 | Create a new internal article for team knowledge sharing |
| `create-note` | `intercom.createNote()` | `--body` `--id` | 2 | You can add a note to a single contact |
| `create-or-update-company` | `intercom.createOrUpdateCompany()` | — | 9 | You can create or update a company |
| `create-tag` ·common | `intercom.createTag()` | `--name` | 3 | Create or update a tag, and optionally tag/untag companies or tag contacts |
| `create-ticket` ·common | `intercom.createTicket()` | `--contacts` `--ticket-type-id` | 5 | Create a ticket in Intercom to track customer requests and issues |
| `create-ticket-type` | `intercom.createTicketType()` | `--category` `--name` | 3 | Create a new ticket type that defines the data structure for tracking customer requests |
| `create-ticket-type-attribute` | `intercom.createTicketTypeAttribute()` | `--data-type` `--description` `--name` `--ticket-type-id` | 7 | Create a new attribute for a ticket type in Intercom |
| `data-event-summaries` | `intercom.dataEventSummaries()` | `--event-summaries` `--user-id` | 0 | Create event summaries for a user to track event occurrences |
| `delete-article` | `intercom.deleteArticle()` | `--id` | 0 | You can delete a single article by making a DELETE request to `https://api.intercom.io/articles/<id>` |
| `delete-collection` | `intercom.deleteCollection()` | `--id` | 0 | You can delete a single collection by making a DELETE request to `https://api.intercom.io/collections/<id>` |
| `delete-company` | `intercom.deleteCompany()` | `--id` | 0 | You can delete a single company |
| `delete-contact` | `intercom.deleteContact()` | `--contact-id` | 0 | Delete a contact from the Intercom workspace |
| `delete-content-import-source` | `intercom.deleteContentImportSource()` | `--source-id` | 0 | Delete a content import source and all its external pages |
| `delete-external-page` | `intercom.deleteExternalPage()` | `--page-id` | 0 | Delete an external page from content library and AI answers |
| `delete-internal-article` | `intercom.deleteInternalArticle()` | `--internal-article-id` | 0 | Delete a single internal article by ID |
| `delete-tag-delete-tag` | `intercom.deleteTagDeleteTag()` | `--tag-id` | 0 | Delete a tag from Intercom workspace |
| `delete-ticket` | `intercom.deleteTicket()` | `--ticket-id` | 0 | Delete a ticket from the Intercom system |
| `delete-visitor` | `intercom.deleteVisitor()` | `--id` | 0 | Delete a visitor from the Intercom workspace |
| `detach-contact` | `intercom.detachContact()` | `--contact-id` `--tag-id` | 0 | Remove a tag from a specific contact in Intercom |
| `detach-contact-from-company` | `intercom.detachContactFromCompany()` | `--company-id` `--contact-id` | 0 | Detach a contact from a company in Intercom |
| `detach-tag-from-conversation` | `intercom.detachTagFromConversation()` | `--admin-id` `--conversation-id` `--tag-id` | 0 | Remove a tag from a specific conversation in Intercom |
| `detach-tag-from-ticket` | `intercom.detachTagFromTicket()` | `--admin-id` `--tag-id` `--ticket-id` | 0 | Remove a tag from a ticket in Intercom |
| `download-data-export` | `intercom.downloadDataExport()` | `--job-identifier` | 0 | Download content data export from Intercom |
| `enqueue-create-ticket` | `intercom.enqueueCreateTicket()` | `--contacts` `--ticket-type-id` | 6 | Enqueue ticket creation for asynchronous processing |
| `find-tag` | `intercom.findTag()` | `--tag-id` | 0 | Retrieve details for a specific tag by its ID |
| `get-contact` | `intercom.getContact()` | `--id` | 0 | You can fetch the details of a single contact |
| `get-content-import-source` | `intercom.getContentImportSource()` | `--source-id` | 0 | Retrieve a content import source by its ID |
| `get-conversation` ·common | `intercom.getConversation()` | `--conversation-id` | 1 | Retrieves a specific conversation by ID with all messages and details |
| `get-counts` | `intercom.getCounts()` | — | 1 | Retrieve summary counts for Intercom app entities including companies, users, leads, tags, segments, and conversations |
| `get-custom-object-instance-by-external-id` | `intercom.getCustomObjectInstanceByExternalId()` | `--custom-object-type-identifier` `--external-id` | 0 | Retrieve a custom object instance by its external_id |
| `get-external-page` | `intercom.getExternalPage()` | `--page-id` | 0 | Retrieve an external page from Fin Content Library by ID |
| `get-ticket` ·common | `intercom.getTicket()` | `--ticket-id` | 0 | Retrieve a ticket from Intercom |
| `get-ticket-type` | `intercom.getTicketType()` | `--ticket-type-id` | 0 | Retrieve details for a specific ticket type by its ID |
| `identify-admin` | `intercom.identifyAdmin()` | — | 0 | You can view the currently authorised admin along with the embedded app object (a "workspace" in legacy terminology). > 🚧 Single Sign On > > If you are building a custom "Log in with Intercom" flow… |
| `jobs-status` | `intercom.jobsStatus()` | `--job-id` | 0 | Retrieve the status of job execution |
| `list-all-activity-logs` | `intercom.listAllActivityLogs()` | `--created-at-after` | 1 | You can get a log of activities by all admins in an app |
| `list-all-admins` | `intercom.listAllAdmins()` | — | 0 | You can fetch a list of admins for a given workspace |
| `list-all-articles` | `intercom.listAllArticles()` | — | 0 | You can fetch a list of all articles by making a GET request to `https://api.intercom.io/articles`. > 📘 How are the articles sorted and ordered? > > Articles will be returned in descending order on… |
| `list-all-collections` | `intercom.listAllCollections()` | — | 0 | You can fetch a list of all collections by making a GET request to `https://api.intercom.io/help_center/collections` |
| `list-all-companies` | `intercom.listAllCompanies()` | — | 3 | You can list companies |
| `list-all-help-centers` | `intercom.listAllHelpCenters()` | — | 0 | You can list all Help Centers by making a GET request to `https://api.intercom.io/help_center/help_centers` |
| `list-all-macros` ·common | `intercom.listAllMacros()` | — | 3 | Fetch a list of all macros (saved replies) in your workspace for use in automating responses |
| `list-all-notes` | `intercom.listAllNotes()` | `--id` | 0 | You can fetch a list of notes that are associated to a contact |
| `list-attached-companies-for-contact` | `intercom.listAttachedCompaniesForContact()` | `--id` | 0 | You can fetch a list of companies that are associated to a contact |
| `list-attached-contacts` | `intercom.listAttachedContacts()` | `--id` | 0 | You can fetch a list of all contacts that belong to a company |
| `list-attached-segments-for-companies` | `intercom.listAttachedSegmentsForCompanies()` | `--id` | 0 | You can fetch a list of all segments that belong to a company |
| `list-attached-segments-for-contact` | `intercom.listAttachedSegmentsForContact()` | `--contact-id` | 0 | You can fetch a list of segments that are associated to a contact |
| `list-away-status-reasons` | `intercom.listAwayStatusReasons()` | — | 0 | Retrieve all away status reasons for a workspace including deleted ones |
| `list-calls` | `intercom.listCalls()` | — | 2 | List all phone calls from Intercom with pagination support |
| `list-calls-with-transcripts` | `intercom.listCallsWithTranscripts()` | `--conversation-ids` | 0 | Retrieve calls by conversation IDs with transcripts when available |
| `list-company-notes` | `intercom.listCompanyNotes()` | `--company-id` | 0 | List all notes associated with a specific company |
| `list-contacts` ·common | `intercom.listContacts()` | — | 2 | List all contacts (users or leads) in your Intercom workspace with pagination support |
| `list-content-import-sources` | `intercom.listContentImportSources()` | — | 2 | Retrieve all content import sources for the workspace |
| `list-conversations` ·common | `intercom.listConversations()` | — | 2 | Lists all conversations from Intercom with pagination support |
| `list-data-attributes` | `intercom.listDataAttributes()` | — | 2 | List all data attributes for contacts, companies, and conversations |
| `list-data-events` | `intercom.listDataEvents()` | — | 4 | Retrieve a log of data events belonging to a customer |
| `list-external-pages` | `intercom.listExternalPages()` | — | 2 | List all external pages from Fin Content Library |
| `list-help-center-sections` | `intercom.listHelpCenterSections()` | — | 2 | Fetch a list of all help center sections in descending order by updated_at |
| `list-internal-articles` | `intercom.listInternalArticles()` | — | 2 | Fetches one page of internal articles from Intercom |
| `list-news-items` | `intercom.listNewsItems()` | — | 0 | Fetch a list of all news items from Intercom |
| `list-segments` ·common | `intercom.listSegments()` | — | 1 | Retrieve all segments defined within a workspace for filtering and categorizing contacts |
| `list-subscription-types` | `intercom.listSubscriptionTypes()` | — | 0 | List all subscription types available in the workspace |
| `list-subscriptions-for-contact` | `intercom.listSubscriptionsForContact()` | `--contact-id` | 0 | You can fetch a list of subscription types that are attached to a contact |
| `list-tags` ·common | `intercom.listTags()` | — | 0 | Fetch all tags for the workspace |
| `list-tags-attached-to-contact` | `intercom.listTagsAttachedToContact()` | `--contact-id` | 0 | You can fetch a list of all tags that are attached to a specific contact |
| `list-teams` ·common | `intercom.listTeams()` | — | 0 | Retrieve all teams within a workspace |
| `list-ticket-states` | `intercom.listTicketStates()` | — | 0 | Fetch all ticket states for the workspace |
| `list-ticket-types` | `intercom.listTicketTypes()` | — | 0 | Retrieve all ticket types for the workspace |
| `merge-lead-and-user` | `intercom.mergeLeadAndUser()` | — | 2 | You can merge a contact with a `role` of `lead` into a contact with a `role` of `user` |
| `register-fin-voice-call` | `intercom.registerFinVoiceCall()` | `--call-id` `--phone-number` | 2 | Register a Fin Voice call with Intercom |
| `remove-subscription-from-contact` | `intercom.removeSubscriptionFromContact()` | `--contact-id` `--id` | 0 | You can remove a specific subscription from a contact |
| `remove-tag-from-contact` | `intercom.removeTagFromContact()` | `--contact-id` `--id` | 0 | You can remove tag from a specific contact |
| `reopen-conversation` ·common | `intercom.reopenConversation()` | `--admin-id` `--conversation-id` | 1 | Reopens a closed conversation in Intercom |
| `reply-ticket` ·common | `intercom.replyTicket()` | `--body` `--message-type` `--ticket-id` | 6 | Reply to a ticket with a message from admin or contact, or with a note for admins |
| `reply-to-conversation` ·common | `intercom.replyToConversation()` | `--admin-id` `--conversation-id` `--message-body` | 2 | Sends a reply to an existing conversation in Intercom |
| `retrieve-admin` | `intercom.retrieveAdmin()` | `--id` | 0 | You can retrieve the details of a single admin |
| `retrieve-article` | `intercom.retrieveArticle()` | `--id` | 0 | You can fetch the details of a single article by making a GET request to `https://api.intercom.io/articles/<id>` |
| `retrieve-collection` | `intercom.retrieveCollection()` | `--id` | 0 | You can fetch the details of a single collection by making a GET request to `https://api.intercom.io/help_center/collections/<id>` |
| `retrieve-companies` | `intercom.retrieveCompanies()` | — | 6 | You can fetch a single company by passing in `company_id` or `name` |
| `retrieve-company-by-id` | `intercom.retrieveCompanyById()` | `--id` | 0 | You can fetch a single company |
| `retrieve-help-center` | `intercom.retrieveHelpCenter()` | `--id` | 0 | You can fetch the details of a single Help Center by making a GET request to `https://api.intercom.io/help_center/help_center/<id>` |
| `retrieve-internal-article` | `intercom.retrieveInternalArticle()` | `--internal-article-id` | 0 | Retrieve an internal article by ID from Intercom |
| `retrieve-job-status` | `intercom.retrieveJobStatus()` | `--job-identifier` | 0 | Retrieve the status of a data export job |
| `retrieve-macro` | `intercom.retrieveMacro()` | `--id` | 0 | Fetch a single macro (saved reply) by its ID |
| `retrieve-note` | `intercom.retrieveNote()` | `--note-id` | 0 | Retrieve details of a single note by its identifier |
| `retrieve-segment` ·common | `intercom.retrieveSegment()` | `--segment-id` | 1 | Retrieve details for a single segment by its ID |
| `retrieve-team` ·common | `intercom.retrieveTeam()` | `--team-id` | 0 | Retrieve detailed information about a specific team by ID |
| `retrieve-visitor-with-user-id` | `intercom.retrieveVisitorWithUserId()` | `--user-id` | 0 | Retrieve a specific visitor's details using their user_id |
| `scroll-over-all-companies` | `intercom.scrollOverAllCompanies()` | — | 1 | The `list all companies` functionality does not work well for huge datasets, and can result in errors and performance problems when paging deeply |
| `search-contacts` ·common | `intercom.searchContacts()` | `--query` | 2 | Search for contacts using query filters with operators |
| `search-conversations` ·common | `intercom.searchConversations()` | `--query` | 4 | Searches for conversations using query string with support for filtering and sorting |
| `search-for-articles` | `intercom.searchForArticles()` | — | 4 | You can search for articles by making a GET request to `https://api.intercom.io/articles/search` |
| `search-internal-articles` | `intercom.searchInternalArticles()` | — | 3 | Searches one page of internal articles in Intercom |
| `search-tickets` ·common | `intercom.searchTickets()` | `--query` | 1 | Search tickets in Intercom by filtering attribute values |
| `set-admin-to-away` | `intercom.setAdminToAway()` | `--id` | 2 | You can set an Admin as away for the Inbox |
| `show-call` | `intercom.showCall()` | `--call-id` | 0 | Retrieve a single call by ID from Intercom |
| `show-call-transcript` | `intercom.showCallTranscript()` | `--call-id` | 0 | Get call transcript by call ID |
| `show-contact-by-external-id` ·common | `intercom.showContactByExternalId()` | `--external-id` | 0 | Retrieve a contact by their external ID |
| `unarchive-contact` ·common | `intercom.unarchiveContact()` | `--contact-id` | 0 | Unarchive a previously archived contact in Intercom |
| `update-article` | `intercom.updateArticle()` | `--id` | 341 | You can update the details of a single article by making a PUT request to `https://api.intercom.io/articles/<id>` |
| `update-collection` | `intercom.updateCollection()` | `--id` | 115 | You can update the details of a single collection by making a PUT request to `https://api.intercom.io/collections/<id>` |
| `update-company` | `intercom.updateCompany()` | `--id` | 8 | You can update a single company using the Intercom provisioned `id`. {% admonition type="attention" name="Using `company_id`" %} When updating a company it is not possible to update `company_id` |
| `update-contact` ·common | `intercom.updateContact()` | `--contact-id` | 11 | Update an existing contact in Intercom |
| `update-content-import-source` | `intercom.updateContentImportSource()` | `--source-id` `--sync-behavior` `--url` | 1 | Update an existing content import source in Fin Content Library |
| `update-data-attribute` | `intercom.updateDataAttribute()` | `--data-attribute-id` | 4 | Update an existing data attribute in Intercom |
| `update-external-page` | `intercom.updateExternalPage()` | `--external-id` `--html` `--locale` `--page-id` `--source-id` `--title` `--url` | 1 | Update an existing external page in Fin Content Library |
| `update-internal-article` | `intercom.updateInternalArticle()` | `--author-id` `--body` `--internal-article-id` `--owner-id` `--title` | 0 | Update an internal article with new title, body, author or owner information |
| `update-ticket` ·common | `intercom.updateTicket()` | `--ticket-id` | 8 | Update an existing ticket in Intercom |
| `update-ticket-type` | `intercom.updateTicketType()` | `--ticket-type-id` | 6 | Update an existing ticket type in the workspace |
| `update-ticket-type-attribute` | `intercom.updateTicketTypeAttribute()` | `--attribute-id` `--ticket-type-id` | 9 | Update an existing attribute for a ticket type |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
