Skip to main content

Hello!

I am trying to create a user by using the API endpoint described here:
https://developers.intercom.com/docs/references/1.0/rest-api/users/create-or-update-user

This is the cURL that I am using:
 

curl -X POST https://api.intercom.io/users -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -d '{"user_id":"3ba5cb8d-8d66-4887-8d1b-4a9b66031f90"}'

It throws this error: 

{
"errors": "
{
"code": "media_type_not_acceptable",
"message": "The Accept header should send a media type of application/json"
}
],
"type": "error.list"
}

After that, I add the Accept header and now I get this error no matter what I send:

curl -X POST https://api.intercom.io/users -H "Authorization: Bearer <token>" -H "Accept: application/json" -H "Content-Type: application/json" -d '{"id":"3ba5cb8d-8d66-4887-8d1b-4a9b66031f90","user_id":"3ba5cb8d-8d66-4887-8d1b-4a9b66031f90"}'

 

{
"errors": s
{
"code": "not_found",
"message": "The requested resource does not exist; check your path and try again"
}
],
"type": "error.list"
}

The docs clearly state: 

Users not found via email or user_id will be created, and those that are found will be updated.

Be the first to reply!

Reply