Issue with searching tickets containing spaces in Intercom API | Community
Skip to main content

I'm experiencing an issue when using the Intercom API to search for tickets. When I try to search for a title that contains spaces, the API does not return the expected results. For example:

  1. The query below returns the ticket correctly:

{ "query": { "field": "title", "operator": "~", "value": "Atraso" } }

  1. However, when I add a space after "Atraso", no results are returned:

{ "query": { "field": "title", "operator": "~", "value": "Atraso " } }

I have already tried the following approaches without success:

  • Using regular expressions with \b

  • Encoding the space as %20

  • Using the exact match operator "="

Expected result :

" { "type": "ticket.list", "pages": { "type": "pages", "page": 1, "per_page": 20, "total_pages": 1 }, "total_count": 1, "tickets": : { "type": "ticket", "id": "9", "ticket_id": "3", "ticket_attributes": { "_default_title_": "Atraso na criação de atividades no Pipedrive", "_default_description_": "Solicitação de análise urgente de atraso na criação de atividades no Pipedrive, impactando a organização do time. Cliente aguarda retorno sobre a resolução do problema.", ...

Endpoint of this request:
https://api.intercom.io/tickets/search
Docs of this API application:
https://developers.intercom.com/docs/references/2.10/rest-api/api.intercom.io/tickets/searchtickets

The expected behavior would be for the API to return results even with extra spaces. How can I resolve this issue to effectively search for ticket titles containing spaces?

Hey ​@Matheus Simonaci 👋 Jacques here from Intercom Support. I hope all is well today!

This seems like a bug to me. Would you be able to reach out to Intercom Support via the Messenger and outline this issue to them? They’ll be able to look in our logs for those calls and get a report written up for our engineering team.

Thanks for flagging this!