Search

Query customers, conversations, messages, companies, notes and custom objects with Kustomer's search API, including filters, operators, dates, custom attributes, sorting, limits and every standard attribute.

The search API runs the same queries as saved searches in Kustomer. One endpoint covers every object type: you pick what to return with queryContext, and filter with and, or and not criteria on any standard or custom attribute.

post/v1/customers/search
cURL
curl -X POST "https://acme.api.kustomerapp.com/v1/customers/search?pageSize=100" \
  -H "Authorization: Bearer $KUSTOMER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "queryContext": "conversation",
    "and": [
      { "conversation_status": { "equals": "open" } },
      { "conversation_priority": { "gte": 4 } },
      { "conversation_created_at": { "gte": "2026-10-01" } }
    ],
    "timeZone": "America/New_York"
  }'

Despite the path, the endpoint isn't limited to customers. With queryContext: "conversation", it returns conversations.

Request body

Search body
queryContextstringrequired
andobject[]
orobject[]
notobject | object[]
sortobject[]
timeZonestring
includeDeletedboolean
fieldsobject[]

Query parameters: page, pageSize (up to 500), and idsOnly=true to return only matching IDs, which is faster for large syncs.

Criteria

Each criterion maps one attribute to one operator and value:

JSON
{ "<attribute>": { "<operator>": <value> } }

Attribute names are <object>_<attribute> in snake case, such as conversation_status or customer_created_at. You can filter on attributes of related objects too: a customer search can filter on conversation_status to find customers with open conversations.

Operators

Which operators an attribute accepts depends on its operator group, listed in the standard attributes tables.

Operator groupOperatorsExample
stringequals, not_equals, contains, not_contains, is_set, not_set{ "customer_name": { "contains": "doe" } }
string_notanalyzedequals, not_equals, is_set, not_set (exact match){ "customer_externalId": { "equals": "crm-10293" } }
textcontains, not_contains, is_set, not_set{ "message_body": { "contains": "refund" } }
listequals, not_equals, in, not_in, is_set, not_set{ "conversation_status": { "in": ["open", "snoozed"] } }
numberequals, between, gte, lte, is_set, not_set{ "conversation_message_count": { "gte": 5 } }
datetimegt, gte, lt, lte, is_set, not_set{ "conversation_created_at": { "gte": "2026-10-01" } }
booleanequals, is_set, not_set{ "kobject_imported": { "equals": true } }
anymatches (free-text match across the object){ "customer_any_text": { "matches": "order 4417" } }

in and not_in take arrays. is_set and not_set ignore their value; send an empty string (company searches need true). contains is case-insensitive.

Combining criteria

JSON
{
  "queryContext": "customer",
  "and": [{ "customer_custom_loyaltyTierStr": { "equals": "gold" } }],
  "or": [
    { "conversation_status": { "equals": "open" } },
    { "conversation_status": { "equals": "snoozed" } }
  ],
  "not": [{ "customer_email": { "contains": "@acme.example" } }]
}
InteractiveBuild a search, watch it filter
conversation_statusequals
conversation_prioritygte
4
conversation_created_atgte / lte
customer_custom_loyaltyTierStrequals
POST/v1/customers/search
{
"queryContext": "conversation",
"and": [
{ "conversation_status": { "equals": "open" } },
{ "conversation_priority": { "gte": 4 } },
{ "conversation_created_at": { "gte": "2026-10-01" } }
],
"timeZone": "America/New_York"
}
3matchesof 12 conversations
sort asc
  • #1Where is my order?
    openP4Oct 03
    Jane Riveragold
    cust. updated Oct 18
  • #2Damaged item on arrival
    openP5Oct 19
    Luis Ortegagold
    cust. updated Oct 13
  • #3Order arrived late
    openP4Oct 20
    Ben Cartersilver
    cust. updated Oct 16
  • outRefund for #4417
    snoozedP3Oct 12
    Omar Haddadsilver
    cust. updated Oct 20
  • outChange shipping address
    openP2Oct 15
    Mia Chenbronze
    cust. updated Oct 09
  • outCancel my subscription
    doneP3Sep 28
    Ava Patelsilver
    cust. updated Oct 02
  • outPromo code not working
    openP1Oct 07
    Noah Kimbronze
    cust. updated Oct 14
  • outExchange for a larger size
    snoozedP4Oct 05
    Zoe Martingold
    cust. updated Oct 11
  • outInvoice copy request
    doneP2Oct 16
    Ethan Brooksbronze
    cust. updated Oct 17
  • outPackage not delivered
    openP5Sep 30
    Sofia Rossisilver
    cust. updated Oct 06
  • outWarranty claim
    snoozedP5Oct 17
    Liam Walshgold
    cust. updated Oct 19
  • outUpdate billing email
    doneP1Oct 10
    Grace Leegold
    cust. updated Oct 12
Twelve sample conversations, filtered in your browser with the documented operators. Several statuses become one in under and, or one equals each under or. Local dates are read in timeZone, and lte includes the whole day. Sorting uses customer attributes even for conversation results.

Dates

Dates can be local (YYYY-MM-DD) or UTC timestamps:

  • A local date is interpreted in timeZone, or GMT if you omit it. {"conversation_created_at": {"lte": "2026-10-19"}} with "timeZone": "America/New_York" means "up to the end of 19 October, New York time."
  • A UTC timestamp such as 2026-10-20T16:34:00.000Z is used exactly, with no time-zone adjustment.

Custom attributes

ObjectPatternExample
Standard objects<object>_custom_<attribute>{ "customer_custom_loyaltyTierStr": { "equals": "gold" } }
Custom objectskobject_custom_<klass>_<attribute>{ "kobject_custom_ecomm-order_totalPriceNum": { "gte": 100 } }

The attribute's suffix decides its operator group: Str behaves like string, Num like number, At like datetime, Bool like boolean.

Sorting

Sorting only works on customer attributes, whatever the queryContext:

JSON
{ "sort": [{ "customer_updated_at": "asc" }] }

Sortable attributes: customer_name, customer_gender, customer_created_at, customer_updated_at, customer_modified_at, customer_externalId, customer_activity_at, customer_last_seen_at, customer_signed_up_at, customer_lastmessage_preview, customer_progressive_status, customer_done, customer_open, customer_snoozed, customer_last_message_sent_at, customer_last_message_out_sent_at, customer_last_message_unresponded_to_sent_at, customer_last_message_at.

Response

200 OK
{
  "meta": { "pageSize": 100, "page": 1, "total": 238, "totalPages": 3 },
  "links": { "self": "...", "next": "..." },
  "data": [
    { "type": "conversation", "id": "58228e05d4e96711004eccb7", "attributes": { "name": "Where is my order?", "status": "open" } }
  ]
}

Limits

  • 10,000 results per query. pageSize goes up to 500, and a request where page × pageSize is over 10,000 returns 400. For bigger result sets, window the query by updated_at and run one search per window. Search recipes has the code.
  • Two years of data. Search covers records updated in the past two years. For older standard and custom objects, use the archive search endpoint with the same body:
post/v1/customers/archive/search
  • Rate limit. Machine users (API keys) can make 100 search requests per minute. See Rate limits.
  • Index delay. Search is updated asynchronously, so a record you just created can take a moment to appear. To read your own writes, fetch the record by ID or externalId.

Standard attributes JSON schema

Every standard attribute you can filter on, grouped by object. The operator group decides which operators apply. The full JSON schema is also in the search endpoint's reference.

Customer attributes

AttributeTypeOperator groupValues
customer_any_textstringany
customer_namestringstring
customer_genderstringlistm, f
customer_presencestringlistonline, offline, idle
customer_emailstringstring
customer_shared_emailstringstring
customer_phonestringstring
customer_shared_phonestringstring
customer_urlsstringstring
customer_addressstringstring
customer_localestringstring
customer_activity_atdate-timedatetime
customer_last_seen_atdate-timedatetime
customer_signed_up_atdate-timedatetime
customer_last_message_sent_atdate-timedatetime
customer_last_message_out_sent_atdate-timedatetime
customer_last_message_unresponded_to_sent_atdate-timedatetime
customer_last_message_atdate-timedatetime
customer_externalIdstringstring_notanalyzed
customer_shared_externalIdstringstring_notanalyzed
customer_created_atdate-timedatetime
customer_updated_atdate-timedatetime
customer_modified_atdate-timedatetime
customer_created_byuserlist
customer_modified_byuserlist
customer_satisfaction_avg_scorenumbernumber
customer_satisfaction_avg_ratingnumbernumber
customer_conversations_countnumbernumber
customer_statusstringlistsnoozed, open, done
customer_progressive_statusstringlistsnoozed, open, done
customer_active_usersuserlist
customer_watchersuserlist
customer_tagsstringlist
customer_sentimentstringlisthappy, unhappy, indifferent
customer_social_typestringlistfacebook, instagram, whatsapp, linkedin, pinterest, twitter
customer_social_useridstringstring_notanalyzed
customer_social_usernamestringstring_notanalyzed
customer_shared_social_typestringlistfacebook, instagram, whatsapp, linkedin, pinterest, twitter
customer_shared_social_useridstringstring_notanalyzed
customer_shared_social_usernamestringstring_notanalyzed
customer_default_langstringstring_notanalyzed
customer_imported_atdate-timedatetime
customer_importedbooleanboolean

Company attributes

AttributeTypeOperator groupValues
company_any_textstringany
company_namestringstring
company_tagsstringlist
company_default_langstringstring_notanalyzed
company_imported_atdate-timedatetime
company_importedbooleanboolean

Message attributes

AttributeTypeOperator groupValues
message_any_textstringany
message_bodystringtext
message_channelstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
message_sizenumbernumber
message_directionstringbooleanin, out
message_sent_atdate-timedatetime
message_created_atdate-timedatetime
message_updated_atdate-timedatetime
message_created_byuserlist
message_modified_byuserlist
message_sentimentstringlisthappy, unhappy, indifferent
message_customer_idstringstring_notanalyzed
message_statusstringlistsent, received, error
message_error_atdate-timedatetime
message_error_titlestringstring
message_external_idstringstring_notanalyzed
message_direction_typestringlistinitial-in, initial-out, response-in, response-out, followup-in, followup-out
message_created_by_teamsstringstring_notanalyzed
message_redactedstringboolean
message_redacted_atdate-timedatetime
message_imported_atdate-timedatetime
message_importedbooleanboolean
message_recipientsstringstring
message_senderstringstring
message_shortcutsstringstring_notanalyzed
message_subjectstringtext
message_sourcestringlistbulk
message_attachment_countnumbernumber
message_autostringboolean
message_langstringstring_notanalyzed

Note attributes

AttributeTypeOperator groupValues
note_any_textstringany
note_bodystringtext
note_created_atdate-timedatetime
note_modified_atdate-timedatetime
note_updated_atdate-timedatetime
note_created_byuserlist
note_modified_byuserlist
note_deleteduserboolean
note_user_mentionsuserlist
note_team_mentionsstringlist
note_attachment_countusernumber
note_external_idstringstring_notanalyzed
note_customer_idstringstring_notanalyzed
note_conversation_idstringstring_notanalyzed
note_langstringstring_notanalyzed
note_imported_atdate-timedatetime
note_importedbooleanboolean

Conversation attributes

AttributeTypeOperator groupValues
conversation_any_textstringany
conversation_namestringstring
conversation_sentimentstringlisthappy, unhappy, indifferent
conversation_statusstringlistsnoozed, open, done
conversation_sub_statusstringstring_notanalyzed
conversation_created_atdate-timedatetime
conversation_updated_atdate-timedatetime
conversation_modified_atdate-timedatetime
conversation_modified_byuserlist
conversation_message_countnumbernumber
conversation_note_countnumbernumber
conversation_satisfaction_survey_idstringlist
conversation_satisfaction_sent_byuserlist
conversation_satisfaction_sent_by_teamsstringlist
conversation_satisfaction_created_atdate-timedatetime
conversation_satisfaction_scorenumbernumber
conversation_satisfaction_ratingnumbernumber
conversation_satisfaction_statusstringlistcanceled, scheduled, offered, unresponded, rated, commented
conversation_channelsstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
conversation_satisfactionstringstring
conversation_priorityintegernumber
conversation_tagsstringlist
conversation_assigned_usersuserlist
conversation_assigned_teamsstringlist
conversation_last_message_sent_atdate-timedatetime
conversation_last_message_out_sent_atdate-timedatetime
conversation_last_message_unresponded_to_sent_atdate-timedatetime
conversation_last_message_atdate-timedatetime
conversation_first_response_sent_atdate-timedatetime
conversation_first_response_timenumbernumber
conversation_first_response_created_byuserlist
conversation_last_response_created_byuserlist
conversation_last_message_directionstringlistin, out
conversation_directionstringlistin, out
conversation_outbound_message_countnumbernumber
conversation_customer_idstringstring_notanalyzed
conversation_campaign_idstringstring_notanalyzed
conversation_first_message_in_sent_atdate-timedatetime
conversation_first_message_in_direction_typestringlistinitial-in, initial-out, response-in, response-out, followup-in, followup-out
conversation_first_message_in_channelstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
conversation_first_message_out_sent_atdate-timedatetime
conversation_first_message_out_direction_typestringlistinitial-in, initial-out, response-in, response-out, followup-in, followup-out
conversation_first_message_out_channelstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
conversation_time_created_atdate-timedatetime
conversation_time_conversation_idstringstring_notanalyzed
conversation_time_created_by_teamsstringlist
conversation_time_assigned_usersuserlist
conversation_time_assigned_teamsstringlist
conversation_time_touchedstringboolean
conversation_time_reopenedstringboolean
conversation_time_snoozedstringboolean
conversation_time_resolvedstringboolean
conversation_time_message_atdate-timedatetime
conversation_time_message_timenumbernumber
conversation_time_messages_sentnumbernumber
conversation_time_note_atdate-timedatetime
conversation_time_note_timenumbernumber
conversation_time_notes_sentnumbernumber
conversation_time_handle_atdate-timedatetime
conversation_time_handle_timenumbernumber
conversation_time_channelsstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
conversation_default_langstringstring_notanalyzed
conversation_sla_statusstringlistdone, pending, paused
conversation_sla_version_idstringstring_notanalyzed
conversation_sla_idstringlist
conversation_sla_breachedbooleanboolean
conversation_sla_breach_atdate-timedatetime
conversation_sla_satisfied_atdate-timedatetime
conversation_sla_breach_metricstringlistfirstResponse, nextReply, totalCustomerWaitTime, longestUnrespondedMessage, totalConversationOpenTime
conversation_first_done_created_byuserlist
conversation_last_done_created_atdate-timedatetime
conversation_last_done_created_byuserlist
conversation_last_done_created_by_teamsstringlist
conversation_reply_channelstringlistsms, chat, email, facebook, voice, twitter-dm, twitter-tweet, instagram, whatsapp
conversation_queuestringlist
conversation_external_queuestringlistamazon-connect
conversation_endedbooleanboolean
conversation_ended_atdate-timedatetime
conversation_ended_reasonstringstring
conversation_imported_atdate-timedatetime
conversation_importedbooleanboolean

Other attributes

AttributeTypeOperator groupValues
any_textstringany
tracking_eventsstringnumber

Kobject attributes

AttributeTypeOperator groupValues
kobject_any_textstringany
kobject_created_atdate-timedatetime
kobject_updated_atdate-timedatetime
kobject_imported_atdate-timedatetime
kobject_importedbooleanboolean