Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Add IPs



API Overview

api-overview page anchor

Elements that can be shared among more than one endpoint definition.


POST/v3/ips

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

This endpoint is for adding a(n) IP Address(es) to your account.


Authentication

authentication page anchor
Authorizationstringrequired
Default: Bearer <<YOUR_API_KEY_HERE>>
SchemaExample
countintegerrequired

The amount of IPs to add to the account.


subusersarray[string]

Array of usernames to be assigned a send IP.


warmupboolean

Whether or not to warmup the IPs being added.

Default: false
201400
SchemaExample
ipsarray[object]

List of IP objects.


remaining_ipsinteger

The number of IPs that can still be added to the user.


warmupboolean

Whether or not the IPs are being warmed up.

Add IPs

add-ips page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
curl

_27
const client = require('@sendgrid/client');
_27
client.setApiKey(process.env.SENDGRID_API_KEY);
_27
_27
const data = {
_27
"count": 90323478,
_27
"subusers": [
_27
"subuser1",
_27
"subuser2"
_27
],
_27
"warmup": true,
_27
"user_can_send": true
_27
};
_27
_27
const request = {
_27
url: `/v3/ips`,
_27
method: 'POST',
_27
body: data
_27
}
_27
_27
client.request(request)
_27
.then(([response, body]) => {
_27
console.log(response.statusCode);
_27
console.log(response.body);
_27
})
_27
.catch(error => {
_27
console.error(error);
_27
});


Rate this page: