Menu

Expand
Rate this page:

Lists

Lists are static collections of Marketing Campaigns contacts. This API allows you to interact with the list objects themselves. To add contacts to a list, you must use the Contacts API.

You can also manage your lists using the Contacts menu in the Marketing Campaigns UI. For more information about lists and best practices for building them, see "Building your Contact List".

Get All Lists

GET /v3/marketing/lists

Base url: https://api.sendgrid.com

This endpoint returns an array of all of your contact lists.

Authentication

  • API Key

Headers

Authorization
string
default: Bearer <<YOUR_API_KEY_HERE>>
required

Query String

page_size
number

Maximum number of elements to return. Defaults to 100, returns 1000 max

default: 100
page_token
string

token corresponding to a specific page of results, as provided by metadata

default: None

Responses

object
result
array[object]
id
string

The generated ID for your list.

maxLength: 36minLength: 36
name
string

The name you gave your list.

contact_count
integer

The number of contacts currently stored on the list.

_metadata
object
self
string

A link to this object.

_metadata
object
prev
string

The URL of the previous page of results. If this field isn't present, you're at the start of the list.

format: uri
self
string

The URL of the current page of results.

format: uri
next
string

The URL of the next page of results. If this field isn't present, you're at the end of the list.

format: uri
count
number

The number of items in the entire list, i.e., across all pages.

Loading Code Sample...
        
        

        Get All Lists

        Rate this page:

        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.

        Loading Code Sample...
              
              
              

              Thank you for your feedback!

              Please select the reason(s) for your feedback. The additional information you provide helps us improve our documentation:

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

              Thanks for your feedback!

              thanks-feedback-gif