Contacts
Everything about your contacts
Operations
| Method | Endpoint | Description |
|---|---|---|
GET | /companies/{company_id}/contacts | List attached contacts |
GET | /contacts/{contact_id}/companies | List attached companies for contact |
POST | /contacts/{contact_id}/companies | Attach a Contact to a Company |
DELETE | /contacts/{contact_id}/companies/{company_id} | Detach a contact from a company |
GET | /contacts/{contact_id}/notes | List all notes |
POST | /contacts/{contact_id}/notes | Create a note |
GET | /contacts/{contact_id}/segments | List attached segments for contact |
GET | /contacts/{contact_id}/subscriptions | List subscriptions for a contact |
POST | /contacts/{contact_id}/subscriptions | Add subscription to a contact |
DELETE | /contacts/{contact_id}/subscriptions/{subscription_id} | Remove subscription from a contact |
GET | /contacts/{contact_id}/tags | List tags attached to a contact |
POST | /contacts/{contact_id}/tags | Add tag to a contact |
DELETE | /contacts/{contact_id}/tags/{tag_id} | Remove tag from a contact |
GET | /contacts/deleted | List deleted contacts |
GET | /contacts/{contact_id} | Get a contact |
PUT | /contacts/{contact_id} | Update a contact |
DELETE | /contacts/{contact_id} | Delete a contact |
POST | /contacts/merge | Merge a lead and a user |
POST | /contacts/merge/preview | Preview a contact merge |
POST | /contacts/search | Search contacts |
GET | /contacts/activities | List all contact activities |
GET | /contacts | List all contacts |
POST | /contacts | Create contact |
GET | /contacts/find_by_external_id/{external_id} | Get a contact by External ID |
POST | /contacts/{contact_id}/archive | Archive contact |
POST | /contacts/{contact_id}/unarchive | Unarchive contact |
GET | /contacts/{id}/banners | List banners for a contact |
POST | /contacts/{id}/banners/{view_id}/dismiss | Dismiss a banner for a contact |
POST | /contacts/{contact_id}/block | Block contact |
GET | /contacts/{id}/merge_history | Get contact merge history |
POST | /contacts/bulk | Bulk create contacts |
PUT | /contacts/bulk | Bulk update contacts |
POST | /contacts/bulk/delete | Bulk delete contacts |
GET | /contacts/bulk/{id} | Get a bulk update job |
Example
List attached contacts, with the TypeScript SDK:
ts
import { Intercom } from "@octridev/intercom";
const client = new Intercom({
// Optional: replaces the default server and any server an operation declares.
baseUrl: "https://api.intercom.io",
auth: { bearerAuth: process.env.API_TOKEN! },
});
const result = await client.companies.listAttachedContacts({
companyId: "company-1",
});
console.log(result);Nine more languages
The same call exists in every SDK. See SDKs for the other nine.