I noticed what looks like a type inconsistency between two related schemas in the REST API.
On the Admin object (/admins/admin), the id field is defined as a string — and the example values in the docs reflect this (e.g. "493881", "1295").
However, on the Contact object, the owner_id field — which the docs describe as "the id of an admin that has been assigned account ownership of the contact" — is defined as an integer.
These two fields represent the same value (an admin's ID), but they're typed differently depending on which side of the relationship you're looking at. This creates a few practical problems:
- Strict-typed languages choke on this. If I model
Admin.idas a string andContact.owner_idas an integer (matching the docs), I can't do a straightforward equality check without casting one or the other. - Search filter confusion. When using the Search Contacts endpoint and filtering by
owner_id, should I be passing a string or an integer? The field type says integer, but the actual admin ID is documented as a string. - Serialization edge cases. Depending on the JSON parser,
"493881"(string) and493881(integer) are not equal, which can cause subtle bugs in integrations.
Is this an intentional design choice, or is it a documentation inconsistency? If the admin ID is truly a string under the hood, should owner_id on the Contact schema be updated to reflect that?
Would love to hear from the team or anyone else who's run into this. Thanks!
https://developers.intercom.com/docs/references/rest-api/api.intercom.io/admins/admin
https://developers.intercom.com/docs/references/rest-api/api.intercom.io/contacts.md
https://developers.intercom.com/docs/references/rest-api/api.intercom.io/contacts/contact