Claude
Skills
Sign in
Back

intercom

Included with Lifetime
$97 forever

Intercom API for customer messaging. Use when user mentions "Intercom", "customer chat", "messaging", or asks about Intercom conversations.

Backend & APIs

What this skill does


## Troubleshooting

If requests fail, run `zero doctor check-connector --env-name INTERCOM_TOKEN` or `zero doctor check-connector --url https://api.intercom.io/admins --method GET`

## How to Use

All examples assume `INTERCOM_TOKEN` is set.

**Base URL**: `https://api.intercom.io/`

**Required Headers**:
- `Authorization: Bearer ${INTERCOM_TOKEN}`
- `Accept: application/json`
- `Intercom-Version: 2.14`

## Core APIs

### 1. List Admins

Get all admins/teammates in your workspace:

```bash
curl -s "https://api.intercom.io/admins" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Accept: application/json" -H "Intercom-Version: 2.14" | jq '.admins[] | {id, name, email}'
```

### 2. Create Contact

Create a new contact (lead or user):

Write to `/tmp/intercom_request.json`:

```json
{
  "email": "[email protected]",
  "name": "John Doe",
  "phone": "+1234567890"
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/contacts" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

With custom attributes:

Write to `/tmp/intercom_request.json`:

```json
{
  "email": "[email protected]",
  "name": "John Doe",
  "custom_attributes": {
    "plan": "premium",
    "signup_date": "2024-01-15"
  }
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/contacts" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

### 3. Get Contact

Retrieve a specific contact by ID. Replace `<your-contact-id>` with the actual contact ID:

```bash
curl -s "https://api.intercom.io/contacts/<your-contact-id>" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Accept: application/json" -H "Intercom-Version: 2.14"
```

### 4. Update Contact

Update contact information. Replace `<your-contact-id>` with the actual contact ID:

Write to `/tmp/intercom_request.json`:

```json
{
  "name": "Jane Doe",
  "custom_attributes": {
    "plan": "enterprise"
  }
}
```

Then run:

```bash
curl -s -X PATCH "https://api.intercom.io/contacts/<your-contact-id>" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Accept: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

**Note**: Newly created contacts may need a few seconds before they can be updated.

### 5. Delete Contact

Permanently delete a contact. Replace `<your-contact-id>` with the actual contact ID:

```bash
curl -s -X DELETE "https://api.intercom.io/contacts/<your-contact-id>" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Accept: application/json" -H "Intercom-Version: 2.14"
```

### 6. Search Contacts

Search contacts with filters:

Write to `/tmp/intercom_request.json`:

```json
{
  "query": {
    "field": "email",
    "operator": "=",
    "value": "[email protected]"
  }
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/contacts/search" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json | jq '.data[] | {id, email, name}'
```

Search with multiple filters:

Write to `/tmp/intercom_request.json`:

```json
{
  "query": {
    "operator": "AND",
    "value": [
      {
        "field": "role",
        "operator": "=",
        "value": "user"
      },
      {
        "field": "custom_attributes.plan",
        "operator": "=",
        "value": "premium"
      }
    ]
  }
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/contacts/search" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json | jq '.data[] | {id, email, name}'
```

### 7. List Conversations

Get all conversations:

```bash
curl -s "https://api.intercom.io/conversations?order=desc&sort=updated_at" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Accept: application/json" -H "Intercom-Version: 2.14" | jq '.conversations[] | {id, state, created_at, updated_at}'
```

### 8. Get Conversation

Retrieve a specific conversation. Replace `<your-conversation-id>` with the actual conversation ID:

```bash
curl -s "https://api.intercom.io/conversations/<your-conversation-id>" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Accept: application/json" -H "Intercom-Version: 2.14"
```

### 9. Search Conversations

Search for open conversations:

Write to `/tmp/intercom_request.json`:

```json
{
  "query": {
    "operator": "AND",
    "value": [
      {
        "field": "state",
        "operator": "=",
        "value": "open"
      }
    ]
  }
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/conversations/search" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json | jq '.conversations[] | {id, state, created_at}'
```

Search by assignee:

Replace `<your-admin-id>` with the actual admin ID in the request JSON below.

Write to `/tmp/intercom_request.json`:

```json
{
  "query": {
    "field": "admin_assignee_id",
    "operator": "=",
    "value": "<your-admin-id>"
  }
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/conversations/search" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json | jq '.conversations[] | {id, state, created_at}'
```

### 10. Reply to Conversation

Reply as an admin. Replace `<your-conversation-id>` and `<your-admin-id>` with actual IDs:

Write to `/tmp/intercom_request.json`:

```json
{
  "message_type": "comment",
  "type": "admin",
  "admin_id": "<your-admin-id>",
  "body": "Thank you for your message. We'll help you with this."
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/conversations/<your-conversation-id>/parts" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

### 11. Assign Conversation

Assign a conversation to an admin or team. Replace `<your-conversation-id>`, `<your-admin-id>`, and `<your-assignee-id>` with actual IDs:

Write to `/tmp/intercom_request.json`:

```json
{
  "message_type": "assignment",
  "type": "admin",
  "admin_id": "<your-admin-id>",
  "assignee_id": "<your-assignee-id>"
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/conversations/<your-conversation-id>/parts" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

### 12. Close Conversation

Close an open conversation. Replace `<your-conversation-id>` and `<your-admin-id>` with actual IDs:

Write to `/tmp/intercom_request.json`:

```json
{
  "message_type": "close",
  "type": "admin",
  "admin_id": "<your-admin-id>"
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/conversations/<your-conversation-id>/parts" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

### 13. Create Note

Add an internal note to a contact. Replace `<your-contact-id>` with the actual contact ID:

Write to `/tmp/intercom_request.json`:

```json
{
  "body": "Customer is interested in enterprise plan. Follow up next week."
}
```

Then run:

```bash
curl -s -X POST "https://api.intercom.io/contacts/<your-contact-id>/notes" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Content-Type: application/json" -H "Intercom-Version: 2.14" -d @/tmp/intercom_request.json
```

### 14. List Tags

Get all tags:

```bash
curl -s "https://api.intercom.io/tags" -H "Authorization: Bearer $INTERCOM_TOKEN" -H "Intercom-Version: 2.14" | jq '.data[] | {id, name}'
```

### 15. Create Tag

Create a new tag:

Write to `/tmp/intercom_request.json`:

```json
{
  "name": "VIP Customer"
}
```

Then run:

```bash
curl
Files: 1
Size: 15.8 KB
Complexity: 19/100
Category: Backend & APIs

Related in Backend & APIs