Cerca contatti
GET/api/partner-gateway/v1/contacts
Searches and retrieves contacts with flexible filtering and pagination. This endpoint has two distinct behaviors depending on the listIds parameter. When listIds is provided (comma-separated contact list IDs), it returns the distinct set of contacts that belong to those lists, with optional additional filters applied on top. When listIds is omitted, it searches across all contacts in your account matching the provided filters. Use notListIds to exclude contacts that belong to specific lists, which is useful for finding contacts not yet assigned to a target list. The search parameter performs a case-insensitive match against the contact name and other text fields. You can filter by gender, isValid (whether the phone number has been validated), communicationSupported (e.g., SMS, RCS, WHATSAPP), isTest (to find or exclude test contacts), phoneNumber (exact match), and email (exact match). Results are paginated: page is 0-based, limit defaults to 10 (maximum 1000). Use sortBy to choose the sort field (defaults to fullName) and sortOrder for asc or desc. The sortPriorityListId parameter causes contacts belonging to that specific list to appear first in the results, which is useful when displaying contacts with a primary list highlighted. To retrieve contacts for a specific list with a cleaner API, consider using GET /contacts/list/{listId}/contacts instead. Returns 500 if an unexpected server error occurs.
Richiesta
Risposte
- 200
- 500
Contatti recuperati con successo
Errore interno del server