Set an IP as the account default
Marks this IP as the default. Sends that omit ip_id will route through
the default IP. Each account has exactly one default at a time — calling
this endpoint clears the previous default automatically.
curl -X POST "https://api.supasend.io/v1/ips/example_string/default" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY"
import requests
import json
url = "https://api.supasend.io/v1/ips/example_string/default"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch("https://api.supasend.io/v1/ips/example_string/default", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("POST", "https://api.supasend.io/v1/ips/example_string/default", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.supasend.io/v1/ips/example_string/default')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"id": "example_string",
"ip_address": "203.0.113.45",
"region": "EU",
"business_name": "Acme Mailer",
"status": "provisioning",
"is_default": true,
"monthly_price_cents": 2000
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Not Found",
"message": "The requested resource was not found",
"code": 404
}
{
"error": "Internal Server Error",
"message": "An unexpected error occurred on the server",
"code": 500,
"requestId": "req_1234567890"
}
/v1/ips/{id}/defaultTarget server for requests. Edit to use your own host.
API key in the format sk_live_<64 hex characters>
sk_live_<64 hex characters>Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. API key in the format sk_live_\<64 hex characters\>
Path Parameters
Responses
EUUSactive — usable for sends. suspended — monthly charge could
not be covered; top up the wallet to restore it. Other states are
transitional while the SupaSend team provisions or releases the IP.
provisioningactivereleasingreleasedsuspendedWhen true, this IP is used for any send that omits ip_id.
Each account has exactly one default IP at a time; the first IP
assigned to your account is auto-promoted to default.