Menu

Contacts

Get Batched Contacts by IDs

Get Batched Contacts by IDs

POST /marketing/contacts/batch

This endpoint is used to retrieve a set of contacts identified by their IDs.

This can be more efficient endpoint to get contacts than making a series of individual GET requests to the "Get a Contact by ID" endpoint.

You can supply up to 100 IDs. Pass them into the ids field in your request body as an array or one or more strings.

Twilio SendGrid recommends exporting your contacts regularly as a backup to avoid issues or lost data.

Request Body

object

Array of IDs

ids
array[string]
maxItems: 100
required
{
  "ids": [
    "1234",
    "1235"
  ]
}

Responses

object
result
array[object]
id
string
first_name
string
last_name
string
unique_name
string
email
string
alternate_emails
array[string]
address_line_1
string
address_line_2
string
city
string
state_province_region
string
country
string
postal_code
string
phone_number
string
whatsapp
string
line
string
facebook
string
list_ids
array[string]
segment_ids
array[string]
custom_fields
object
created_at
string
updated_at
string
_metadata
object
self
string

A link to this object.

object
errors
array[object]
message
string

the error message

field
string or null

the field that generated the error

help
object

helper text or docs for troubleshooting

id
string
{
  "errors": [
    {
      "field": "field_name",
      "message": "error message"
    }
  ]
}
object
errors
array[object]
message
string

the error message

field
string or null

the field that generated the error

help
object

helper text or docs for troubleshooting

id
string
{
  "errors": [
    {
      "field": "field_name",
      "message": "error message"
    }
  ]
}
object
object
errors
array[object]
message
string
Rate this page:

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the SendGrid tag on Stack Overflow.

Thank you for your feedback!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending your feedback...
🎉 Thank you for your feedback!
Something went wrong. Please try again.

Thanks for your feedback!

Refer us and get $10 in 3 simple steps!

Step 1

Get link

Get a free personal referral link here

Step 2

Give $10

Your user signs up and upgrade using link

Step 3

Get $10

1,250 free SMSes
OR 1,000 free voice mins
OR 12,000 chats
OR more