Contacts
Search Contacts
POST /v3/marketing/contacts/search
Base url: https://api.sendgrid.com
Use this endpoint to locate contacts.
The request body's query
field accepts valid SGQL for searching for a contact.
Because contact emails are stored in lower case, using SGQL to search by email address requires the provided email address to be in lower case. The SGQL lower()
function can be used for this.
Only the first 50 contacts that meet the search criteria will be returned.
If the query takes longer than 20 seconds, a 408 Request Timeout
status will be returned.
Formatting the created_at
and updated_at
values as Unix timestamps is deprecated. Instead they are returned as ISO format as string.
Authentication
- API Key
Headers
Request Body
An SGQL search string or other pattern.
{
"query": "email LIKE 'ENTER_COMPLETE_OR_PARTIAL_EMAIL_ADDRESS_HERE%' AND CONTAINS(list_ids, 'YOUR_LIST_IDs')"
}
Responses
A link to this object.
A link to this object.
The total number of contacts matched.
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
the error message
the field that generated the error
helper text or docs for troubleshooting
{
"errors": [
{
"field": "field_name",
"message": "error message"
}
]
}
Need some help?
We all do sometimes. Get help now from the Twilio SendGrid Support Team.
Running into a coding hurdle? Lean on the wisdom of the crowd by browsing the SendGrid tag on Stack Overflow or visiting Twilio's Stack Overflow Collective.