Skip to content

Commit e98d502

Browse files
kstensonclaude
andcommitted
docs(preview): document updatable fields and tag add/remove on POST /contacts/bulk
- Documents the full set of updatable fields the endpoint accepts (user_id, phone, owner_id, unsubscribed_from_emails, avatar, custom_attributes, companies, company) and notes that other fields are ignored. - Adds a `tags` object (add/remove arrays of `{ id }`) to each contact. - Adds a tag request example and the missing-`id` 422 example. Tag application is best-effort and asynchronous: unknown tag IDs are skipped and per-tag results are not yet returned in the job status, so no synchronous tag-error response is documented. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent fce5a62 commit e98d502

1 file changed

Lines changed: 97 additions & 1 deletion

File tree

descriptions/0/api.intercom.io.yaml

Lines changed: 97 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7178,13 +7178,16 @@ paths:
71787178
- Contacts
71797179
operationId: BulkUpdateContacts
71807180
description: |
7181-
You can bulk update contacts by submitting an array of contact objects with the fields to update. Each contact must include an `id` field identifying the contact to update.
7181+
You can bulk update contacts by submitting an array of contact objects with the fields to update. Each contact must include an `id` field identifying the contact to update. You can also add or remove tags on each contact by including a `tags` object.
7182+
7183+
Only the fields listed in the request schema below can be set. Any other fields in a contact object are ignored.
71827184

71837185
The endpoint creates an async job that processes the updates in the background. Use the returned job ID with `GET /contacts/bulk/{id}` to check the job status.
71847186

71857187
{% admonition type="info" name="Limits" %}
71867188
- Maximum of 100 contacts per request.
71877189
- You can append tasks to an existing job by including `job.id` in the request body.
7190+
- Tag application is best-effort and processed asynchronously: unknown tag IDs are skipped, and per-tag results are not returned in the job status.
71887191
{% /admonition %}
71897192
requestBody:
71907193
content:
@@ -7203,6 +7206,17 @@ paths:
72037206
- id: ghi789
72047207
language_override: es
72057208
name: "María García"
7209+
with_tags:
7210+
summary: Add and remove tags
7211+
value:
7212+
contacts:
7213+
- id: abc123
7214+
name: Updated Name
7215+
tags:
7216+
add:
7217+
- id: '123'
7218+
remove:
7219+
- id: '456'
72067220
append_to_existing_job:
72077221
summary: Append to existing job
72087222
value:
@@ -7261,6 +7275,13 @@ paths:
72617275
errors:
72627276
- code: missing_field
72637277
message: contacts field must be supplied
7278+
missing_id:
7279+
value:
7280+
type: error.list
7281+
request_id: 2859da57-c83f-405c-8166-240a312442a3
7282+
errors:
7283+
- code: missing_field
7284+
message: contacts must be identified by id
72647285
too_many_contacts:
72657286
value:
72667287
type: error.list
@@ -22879,9 +22900,84 @@ components:
2287922900
description: A preferred language setting for the contact, used by
2288022901
the Intercom Messenger.
2288122902
example: fr
22903+
user_id:
22904+
type: string
22905+
description: A unique identifier for the contact that you provide. Maps to the contact's external user ID.
22906+
example: '25'
22907+
phone:
22908+
type: string
22909+
description: The contact's phone number.
22910+
example: "+353871234567"
22911+
owner_id:
22912+
type: integer
22913+
description: The ID of the teammate who owns the contact.
22914+
example: 123
22915+
unsubscribed_from_emails:
22916+
type: boolean
22917+
description: Whether the contact is unsubscribed from emails.
22918+
example: true
22919+
avatar:
22920+
type: string
22921+
description: An image URL for the contact's avatar. You can also pass an object with an `image_url` field.
22922+
example: https://www.example.com/avatar.png
2288222923
custom_attributes:
2288322924
type: object
2288422925
description: Custom attributes to update on the contact.
22926+
companies:
22927+
type: array
22928+
description: A list of companies to associate with the contact. Each company is identified by the `company_id` you have defined. Companies that do not exist are created.
22929+
items:
22930+
type: object
22931+
properties:
22932+
company_id:
22933+
type: string
22934+
description: The company ID you have defined for the company.
22935+
example: '6'
22936+
name:
22937+
type: string
22938+
description: The name of the company.
22939+
example: Blue Sun
22940+
company:
22941+
type: object
22942+
description: A single company to associate with the contact, identified by the `company_id` you have defined. Created if it does not exist.
22943+
properties:
22944+
company_id:
22945+
type: string
22946+
description: The company ID you have defined for the company.
22947+
example: '6'
22948+
name:
22949+
type: string
22950+
description: The name of the company.
22951+
example: Blue Sun
22952+
tags:
22953+
type: object
22954+
description: |
22955+
Tags to add to or remove from the contact. Each tag is identified by its `id`, which must be a positive integer for a tag that already exists in your workspace. Tag application is best-effort: unknown tag IDs are skipped while the rest of the contact update still applies. Per-tag results are not yet returned in the job status.
22956+
properties:
22957+
add:
22958+
type: array
22959+
description: Tags to add to the contact.
22960+
items:
22961+
type: object
22962+
required:
22963+
- id
22964+
properties:
22965+
id:
22966+
type: string
22967+
description: The ID of an existing tag to add to the contact.
22968+
example: '123'
22969+
remove:
22970+
type: array
22971+
description: Tags to remove from the contact.
22972+
items:
22973+
type: object
22974+
required:
22975+
- id
22976+
properties:
22977+
id:
22978+
type: string
22979+
description: The ID of an existing tag to remove from the contact.
22980+
example: '456'
2288522981
job:
2288622982
type: object
2288722983
description: Optional. Include to append tasks to an existing job.

0 commit comments

Comments
 (0)