Menu

Expand
Rate this page:

IP Address Management API

The IP Address Management API combines functionality that was previously split between the Twilio SendGrid IP Address API and IP Pools API. This functionality includes adding IP addresses to your account, assigning IP addresses to IP Pools and Subusers, among other tasks. More details about each operation can be found in the descriptions and schemas for each endpoint.

Get a List of all IP Addresses on your Account

The IP Address Management API is in public beta at this time. This means the API and documentation are still in development and subject to change without advanced notice.

GET /v3/send_ips/ips

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

This operation returns a list of all IP addresses associated with your account. A sample of IP details is returned with each IP, including which Pools the IP is associated with, whether the IP is set to warm up automatically, and when the IP was last updated.

Limitations

The is_parent_assigned parameter and pool parameter cannot be used at the same time. By definition, an IP cannot be assigned to a Pool if it is not first enabled. You can use either the before_key or after_key in combination with the limit parameter to iterate through paginated results but not both.

Query String

ip
string

Specifices an IP address. The ip query parameter can be used to filter results by IP address.

default: None
limit
integer

Specifies the number of results to be returned by the API. This parameter can be used in combination with the before_key or after_key parameters to iterate through paginated results.

default: None
after_key
integer

Specifies which items to be returned by the API. When the after_key is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with limit to iterate through paginated results.

default: None
before_key
string

Specifies which items to be returned by the API. When the before_key is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with limit to iterate through paginated results.

default: None
is_leased
boolean

Indicates whether an IP address is leased from Twilio SendGrid. If false, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account.

default: None
is_enabled
boolean

Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is null for Twilio SendGrid IP addresses.

default: None
is_parent_assigned
boolean

Indicates if a parent on the account is able to send email from the IP address. When set to true, only enabled IP addresses will be returned.

default: None
pool
string

Specifies the unique ID for an IP Pool. When included, only IP addresses belonging to the specified Pool will be returned.

default: None
start_added_at
integer

The start_added_at and end_added_at parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The start_added_at parameter sets the beginning of the time window.

default: None
end_added_at
integer

The start_added_at and end_added_at parameters are used to set a time window. IP addresses that were added to your account in the specified time window will be returned. The start_added_at parameter sets the end of the time window.

default: None
region
string

Filter for IP addresses from a specific region: either eu or us. Defaults to unset, which will return all IPs, regardless of region. (Regional email is in Public Beta and requires SendGrid Pro plan or above.)

default: None
include_region
boolean

Boolean indicating whether or not to return the IP address's region information in the response. (Regional email is in Public Beta and requires SendGrid Pro plan or above.)

default: False

Responses

object
result
array[object]
ip
string

An IP address on your account.

pools
array[object]

An array of IP Pools the IP address is assigned to.

name
string

The name of the IP Pool.

id
string

The unique ID of the IP Pool.

is_auto_warmup
boolean

Indicates if the IP address is set to automatically warmup. This parameter is returned only if the IP address is set to automatically warm up.

is_parent_assigned
boolean or null

Indicates if a parent on the account is able to send email from the IP address. This parameter will be returned only if the request was made by the parent account.

updated_at
integer or null

A timestamp indicating when the IP was last updated.

is_enabled
boolean or null

Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is null for Twilio SendGrid IP addresses.

is_leased
boolean

Indicates whether an IP address is leased from Twilio SendGrid. If false, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account.

added_at
integer

A timestamp representing when the IP address was added to your account.

region
string

The region of the IP address. This is only returned if include_region is set to True in the API request.

Allowed Values: eu, us
_metadata
object
after_key
string or null

Specifies which items to be returned by the API. When the after_key is specified, the API will return items beginning from the first item after the item specified. This parameter can be used in combination with limit to iterate through paginated results. The after_key cannot be used in combination with the before_key parameter.

before_key
string or null

Specifies which items to be returned by the API. When the before_key is specified, the API will return items beginning from the first item before the item specified. This parameter can be used in combination with limit to iterate through paginated results. The before_key cannot be used in combination with the after_key parameter.

ip
string

The IP address specified in the request with the ip query parameter. This parameter is returned only when an IP is included in the request.

is_leased
boolean

Indicates whether an IP address is leased from Twilio SendGrid. If false, the IP address is not a Twilio SendGrid IP; it is a customer's own IP that has been added to their Twilio SendGrid account. This parameter is returned only if the IP address is leased.

is_enabled
boolean

Indicates if the IP address is billed and able to send email. This parameter applies to non-Twilio SendGrid APIs that been added to your Twilio SendGrid account. This parameter's value is null for Twilio SendGrid IP addresses. This parameter is returned only if the IP address is enabled.

is_parent_assigned
boolean

Indicates if a parent on the account is able to send email from the IP address. This parameter is returned only if the IP address is parent assigned.

pool
string

The IP Pool ID specified in the request with the pool query parameter. This paramerter is returned only when an IP Pool is included in the request.

start_added_at
string

The beginning of the time window specified in the request with the start_added_at query parameter. This parameter is returned only when the start_added_at parameter is included in the request.

end_added_at
string

The end of the time window specified in the request with the end_added_at query parameter. This parameter is returned only when the end_added_at parameter is included in the request.

limit
string

The number of items returned in the request. This parameter is returned only when a limit is set using the limit query parameter in the request.

object

IP Address Management Error Response Schema

errors
array[object]

An array of error objects.

field
string

Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error.

message
string

An error-specific message that provides more information about the error's cause.

object

IP Address Management Error Response Schema

errors
array[object]

An array of error objects.

field
string

Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error.

message
string

An error-specific message that provides more information about the error's cause.

object

IP Address Management Error Response Schema

errors
array[object]

An array of error objects.

field
string

Indicates which field caused the error. This may be an empty string if no specific field is responsible for the error.

message
string

An error-specific message that provides more information about the error's cause.

Loading Code Sample...
        
        

        Get a List of all IP Addresses on your Account

        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