Register the source address the current API key is called from

POSThttps://api.sqx.com/v1/access/ip

Registers one public IPv4 address for the key. After registration the key is accepted only from its registered addresses.

A key registers its own address within 7 days of being issued, while an address slot is free (self_serve.open is true). After that, and to change or remove a registered address or to add a slot, contact inquiries@sqx.com.

The address is the one in the request body. It is not taken from the calling connection, because the host that registers is often not the host the key runs on. A range is not accepted; contact inquiries@sqx.com to register a range.

Registering an address the key already holds returns 200 with the existing registration, so the request is safe to repeat.

Authorization

Send your API key in the X-API-Key header. See Authentication.

Request body

application/json

ipstringrequired

One public IPv4 address. A range, an IPv6 address, and a private, loopback or reserved address are refused.

Response fields

Inside the envelope's data. Every response also carries errors and meta (Envelope).

addressesarray of objectrequired

The addresses registered for this key, oldest first.

addresses[].addressstringrequired
addresses[].statestring: pending, activerequired

pending until the address reaches the shared network allowlist, active afterwards.

slotsobject | nullrequired

Address slots of the key. Null for a key that does not register its own address.

slots.totalintegerrequired
slots.usedintegerrequired
self_serveobjectrequired
self_serve.openbooleanrequired

True while the key can register an address itself (inside the 7-day window, with a free slot).

self_serve.closes_atstring | null (date-time)required

When the 7-day window ends. Null for a key that does not register its own address.

callerstringrequired

The address this request arrived from.

Status codes

StatusMeaning
200

The address was already registered for this key

201

The address is registered and pending

400

Validation / parse error

401

Missing or invalid API key

403

Self-serve registration is closed for this key (code 1037): the 7-day window has ended, or the key does not register its own address. Contact inquiries@sqx.com.

409

Every address slot of the key is in use (code 1036). Contact inquiries@sqx.com.

429

Batch too large, or a per-key limit was reached

500

Unexpected server error

503

The job could not be started (code 1060); the request is safe to retry

Talk to SQX

Tell us what data you need. Ask today and get a response today.

Or email inquiries@sqx.com