Skip to content

Remove an IP from the domain pool, unlink a DIPP or remove the domain pool

Request

The behavior of the endpoint depends on the value of the ip parameter. It can be one of the following:

  • a valid IP address: this IP address will be removed from the domain pool.
  • string all: the entire domain pool will be removed. As far as the system is concerned, such domain will no longer exist.
  • string ip_pool: the DIPP which is currently linked to the domain will be unlinked.

Removing An IP

Note that it's impossible to alter domain IPs if a DIPP is linked to the domain.

If the account is not eligible for shared IPs, additional rules apply:

  • removing the last IP from the domain is not allowed;
  • if all of the remaining dedicated IPs are on warmup, an extra IP might be added to the domain pool.

Unlinking The DIPP

The account must have 'DIPPs' feature enabled.

Either ip or pool_id query parameter must be specified, but not both.

If the special value shared is used for the replacement IP, the account must be eligible for shared IPs. In this case the system will assign a shared IP as the replacement.

Security
basicAuth
Path
ipstringrequired

One of the following: all, ip_pool or a valid IP address.

namestringrequired

Domain name. Converted to X-Mailgun-Domain-Id header by the middleware.

Query
ipstring

Replacement IP or special value shared.

pool_idstring

Replacement DIPP id.

curl -i -X DELETE \
  -u '<username>:<password>' \
  'https://api.mailgun.net/v3/domains/{name}/pool/{ip}?ip=string&pool_id=string'

Responses

A 200 response

Bodyapplication/json
messagestringrequired

Response message

Response
{ "message": "success" }