I get a 400 "Query body must contain a query hash".
When using contact search everything works fine
Hello @user919​ , Can you post the full API request?
Hi,
Â
we call https://api.intercom.io/conversations/search/p>
with body params:
{
 "query": {
  "field": "contact_ids",
  "operator": "=",
  "value": "600bfa5ff56b2ea78672f2d0"
 }
Â
}
@user919​ , I just tested this out, it's working fine from me. Can you confirm that you are sending JSON request from Postman?
(I think there some problems with your Postman configuration).
Yes, I confirm that.
I am using postman. This API https://developers.intercom.com/intercom-api-reference/reference#search-for-conversations/p>
- with Bearer Token: <mytoken>
- with header Accept: Application/json
with body: {
 "query": {
  "field": "contact_ids",
  "operator": "=",
  "value": "600bfa5ff56b2ea78672f2d0"
 }
}
Â
But we still get 400 Bad request and response:
{
    "type": "error.list",
    "request_id": "001do3dkinhl2i45r9dg",
    "errors":Â
        {
            "code": "invalid_query",
            "message": "Query body must contain a query hash"
        }
    ]
}
Â
Any hint?
@user919​ , Sorry for the late reply here, Sending you some Postman Configuration screenshots:
Body:
Headers:
Can you change the configuration like this and try once again to send the request?
Â
Looking forward.
Thank you very much.
It seems that Content-Type: application/json fixed the issue for us.
Â
Thanks again,
Apostolis
Reply
Join the Intercom Community 🎉
Already have an account? Login
Login to the community
No account yet? Create an account
Intercom Customers and Employees
Log in with SSOEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.