Skip to content

API reference/address

Restore the default shipping policy

DELETE/api/v1/address/policy

authentication
Secret API key as a bearer token
billing
Free.

Puts the published defaults back — block above 60 and on undeliverable, placeholder and vacant, no register requirement — and forgets when the policy was last changed.

Example request

curl -X DELETE https://spaw.co/api/v1/address/policy \
  -H "Authorization: Bearer sk_live_…"
const response = await fetch('https://spaw.co/api/v1/address/policy', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer sk_live_…',
  },
});
const result = await response.json();
import requests

response = requests.delete(
    'https://spaw.co/api/v1/address/policy',
    headers={'Authorization': 'Bearer sk_live_…'},
)
result = response.json()
$ch = curl_init('https://spaw.co/api/v1/address/policy');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer sk_live_…'],
]);
$result = json_decode(curl_exec($ch), true);
from spaw import Client

client = Client('sk_live_…')
result = client.reset_address_policy()
import Spaw from 'spaw';

const spaw = new Spaw({ apiKey: 'sk_live_…' });
const result = await spaw.resetAddressPolicy();
use Spaw\Client;

$spaw = new Client('sk_live_…');
$result = $spaw->resetAddressPolicy();

This endpoint has no console on its page. It writes to your account. A documentation page can show you the request; making the change is for the dashboard or for a call you make yourself.

Responses

200The defaults, in force again.

Error codes

Failures answer { success: false, error: { code, message, request_id } }. Each code has its own page.

markdown version·openapi.json