Replace the full set of companies a contact has been granted access to.
This is a replacement, not an append. The company_ids you send become the contact's entire granted set — any company id you leave out is dropped. To add a company, send the existing ids plus the new one; to remove one, send the existing ids minus that one; to drop every grant, send an empty array.
Identify companies by the company_id you set on them, the same values GET /contacts/{contact_id}/granted_companies returns. Duplicates in the request are collapsed. A contact can be granted at most 100 companies.
The response echoes the stored set, so a 200 is confirmation of exactly what the contact can now read.
This endpoint returns 404 with the code granted_companies_not_enabled unless granted companies are enabled for the workspace. Contact Intercom Support to enable it.
Requires the write_users_companies OAuth scope. Set Intercom-Version: Preview.
Preview Intercom API version. Used for closed beta endpoints or other features under managed availability.
The full set of companies to grant the contact access to. Any company id left out is dropped.
- The production API serverhttps://api.intercom.io/contacts/{contact_id}/granted_companies
- The european API serverhttps://api.eu.intercom.io/contacts/{contact_id}/granted_companies
- The australian API serverhttps://api.au.intercom.io/contacts/{contact_id}/granted_companies
curl -i -X PUT \
https://api.intercom.io/contacts/63a07ddf05a32042dffac965/granted_companies \
-H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
-H 'Content-Type: application/json' \
-H 'Intercom-Version: Preview' \
-d '{
"company_ids": [
"acme-corp",
"1234",
"globex"
]
}'Successful
A list of the company ids a contact has been granted access to.
The company_id values of the companies the contact has been granted access to.
[ "acme-corp" ]
Pagination details. Null on the replace response, which returns the whole stored set.
{ "type": "list", "company_ids": [ "acme-corp", "1234", "globex" ], "pages": null, "total_count": 3 }