Skip to content

Commit e41f01a

Browse files
kstensonclaude
authored 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 7d48a8c commit e41f01a

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
@@ -7841,13 +7841,16 @@ paths:
78417841
- Contacts
78427842
operationId: BulkUpdateContacts
78437843
description: |
7844-
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.
7844+
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.
7845+
7846+
Only the fields listed in the request schema below can be set. Any other fields in a contact object are ignored.
78457847

78467848
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.
78477849

78487850
{% admonition type="info" name="Limits" %}
78497851
- Maximum of 100 contacts per request.
78507852
- You can append tasks to an existing job by including `job.id` in the request body.
7853+
- Tag application is best-effort and processed asynchronously: unknown tag IDs are skipped, and per-tag results are not returned in the job status.
78517854
{% /admonition %}
78527855
requestBody:
78537856
content:
@@ -7866,6 +7869,17 @@ paths:
78667869
- id: ghi789
78677870
language_override: es
78687871
name: "María García"
7872+
with_tags:
7873+
summary: Add and remove tags
7874+
value:
7875+
contacts:
7876+
- id: abc123
7877+
name: Updated Name
7878+
tags:
7879+
add:
7880+
- id: '123'
7881+
remove:
7882+
- id: '456'
78697883
append_to_existing_job:
78707884
summary: Append to existing job
78717885
value:
@@ -7924,6 +7938,13 @@ paths:
79247938
errors:
79257939
- code: missing_field
79267940
message: contacts field must be supplied
7941+
missing_id:
7942+
value:
7943+
type: error.list
7944+
request_id: 2859da57-c83f-405c-8166-240a312442a3
7945+
errors:
7946+
- code: missing_field
7947+
message: contacts must be identified by id
79277948
too_many_contacts:
79287949
value:
79297950
type: error.list
@@ -23808,9 +23829,84 @@ components:
2380823829
description: A preferred language setting for the contact, used by
2380923830
the Intercom Messenger.
2381023831
example: fr
23832+
user_id:
23833+
type: string
23834+
description: A unique identifier for the contact that you provide. Maps to the contact's external user ID.
23835+
example: '25'
23836+
phone:
23837+
type: string
23838+
description: The contact's phone number.
23839+
example: "+353871234567"
23840+
owner_id:
23841+
type: integer
23842+
description: The ID of the teammate who owns the contact.
23843+
example: 123
23844+
unsubscribed_from_emails:
23845+
type: boolean
23846+
description: Whether the contact is unsubscribed from emails.
23847+
example: true
23848+
avatar:
23849+
type: string
23850+
description: An image URL for the contact's avatar. You can also pass an object with an `image_url` field.
23851+
example: https://www.example.com/avatar.png
2381123852
custom_attributes:
2381223853
type: object
2381323854
description: Custom attributes to update on the contact.
23855+
companies:
23856+
type: array
23857+
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.
23858+
items:
23859+
type: object
23860+
properties:
23861+
company_id:
23862+
type: string
23863+
description: The company ID you have defined for the company.
23864+
example: '6'
23865+
name:
23866+
type: string
23867+
description: The name of the company.
23868+
example: Blue Sun
23869+
company:
23870+
type: object
23871+
description: A single company to associate with the contact, identified by the `company_id` you have defined. Created if it does not exist.
23872+
properties:
23873+
company_id:
23874+
type: string
23875+
description: The company ID you have defined for the company.
23876+
example: '6'
23877+
name:
23878+
type: string
23879+
description: The name of the company.
23880+
example: Blue Sun
23881+
tags:
23882+
type: object
23883+
description: |
23884+
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.
23885+
properties:
23886+
add:
23887+
type: array
23888+
description: Tags to add to the contact.
23889+
items:
23890+
type: object
23891+
required:
23892+
- id
23893+
properties:
23894+
id:
23895+
type: string
23896+
description: The ID of an existing tag to add to the contact.
23897+
example: '123'
23898+
remove:
23899+
type: array
23900+
description: Tags to remove from the contact.
23901+
items:
23902+
type: object
23903+
required:
23904+
- id
23905+
properties:
23906+
id:
23907+
type: string
23908+
description: The ID of an existing tag to remove from the contact.
23909+
example: '456'
2381423910
job:
2381523911
type: object
2381623912
description: Optional. Include to append tasks to an existing job.

0 commit comments

Comments
 (0)