IP Address Lists API

IP Address lists can be created, edited and viewed using the api.  When you have created an IP Address list, you can attach that list to a demand or supply tag for targeting. 

Creating an IP Address List

SDK

Use tab completion with SDK to auto-complete function names or show field options!

REST API

POST /api/v0/ip_lists

Headers

Body (example)

{
  "name": "My IP List",
    "description": "My description"
}

Required parameters: name

Response

Status code 200

Get an IP Address List

SDK

REST API

GET /api/v0/ip_lists/<id>

Headers

Response

Status code 200

Add IPs to an Address list

SDK

  • Please note that only valid IP addresses will save to list

REST API

POST /api/v0/ip_lists/<id>/ips/bulk_create

Headers

Body (example)

Response

Status code 200

Add IPs to an Address list from a File

Appends ip addresses in the csv file to the list

SDK

  • Please note that only valid IP addresses will save to list

REST API

POST /api/v0/ip_lists/<id>/ips/file_bulk_create

Response

Status code 201

Replace Entire IP Address List

SDK

REST API

POST /api/v0/ip_lists/<id>ips/bulk_replace

Headers

Body (example)

Response
Status code 201

Replace Entire IP List with File

Replaces ip list with the ip addresses in the csv file

SDK

REST API

POST /api/v0/ip_lists/<id>/ips/file_bulk_replace

Response

Status code 201

Get IP Addresses in a IP Address List

SDK

REST API

GET /api/v0/ip_lists/<id>/ips

Headers


Response (note you need to paginate)

Status code 200

Remove specific IP Addresses

SDK

REST API

DELETE /api/v0/ip_lists/<id>/ips/bulk_delete

Headers

Body (example) where "1" and "2" are the numeric 


Response (note you need to pagenate)

Status code 200

Remove IP Addresses using a File

Removes IP addresses in the csv file from the list

SDK

REST API

DELETE /api/v0/ip_lists/<id>/ips/file_bulk_delete

Response

Status code 200

Delete all ip addresses in a list

SDK

Attach to a Demand or Supply Tag

To attach an ip list to a supply or demand tag you must set the following fields on a supply or demand tag

  • ip_list_ids → this is a list of ip list ids that you want to target on the supply or demand tag
  • ip_targeting → Whether or not to treat it like an 'Allowlist' or 'Blocklist'

SDK

REST API

See documentation on the Supply and Demand Tag APIs