Answered

Why can't I search for a tag using the API?

  • 14 March 2022
  • 1 reply
  • 80 views

Hi! 

 

I'm looking at loading a user's conversations and trying to find out if a specific tag is attached to a conversation.

 

I'm using https://developers.intercom.com/intercom-api-reference/reference/search-for-conversationswith v2.4

 

current query on /conversations/search

{
"query": {
"operator": "AND",
"value": [
{
"field": "contact_ids",
"operator": "=",
"value": "myUserID"
},
{
"field": "tags_id",
"operator": "=",
"value": "myTagID"
}
]
}
}

response:

{
"type":"error.list",
"request_id":"0003pv47mhfa21qk9k60",
"errors":[
{
"code":"invalid_field",
"message":"tags_id is not a valid search field"
}]
}

Is the documentation not up to date with the code or the opposite?

Am I doing that wrong?

 

Is there a better way to retrieve conversations flagged with a particular tag?

 

Lemme know if you need further information,

 

Regards,

Nicolas

icon

Best answer by Nicolas C 15 March 2022, 12:46

View original

1 reply

Problem with the user.... typo:

"field": "tags_id" -> "field": "tag_ids"
 

 

Reply