Searching for archived contacts with API to get Intercom ID

Hello there,

Using API 2.2 and intercom-php 4.4.1

I had and issue with a Conflict error when adding a contact, and I found out, where using Postman instead of the Intercom-PHP Library (that for some reason prefers not to tell us what the problem is), that I can’t add a user because “An archived contact matching those details already exists with id=5d8cc8f51be7dea644dab25b”.

Now, I could catch the error and unarchive the contact, BUT I need the Intercom ID to do so and the Search endpoint does NOT return archived contacts, I don’t save the Intercom ID in my database (I mean, the external_id serves this purpose, does it not?) and since intercom-php doesn’t return the error that the API usually returns, I can’t parse the message to get the ID.

Is there another way I did not consider to fix this situation? Thanks