Ontwikkelaars → REST API
Domeinen, DNS, SSL en app-servers via HTTPS. JSON erin, JSON eruit, één basis-URL.
https://nameocean.net/api/v1
Authorization: Bearer <key> met een sleutel uit Dashboard → API-sleutels.
/api/v1/openapi.json · importeer het in Postman, Insomnia of Bruno, of genereer een client.
Elke sleutel heeft rechten. GET vereist <area>:read, andere methoden <area>:write; bij elk endpoint hieronder staat wat nodig is. Ontbreekt het recht, dan is het antwoord 403 met code missing_scope en required_scopes. Alle scopes.
Elke fout heeft dezelfde vorm: een bericht geschreven voor mensen en AI-agents, en een stabiele code om op te vertakken. field noemt de foutieve invoer, als die er is.
{"error": "ip: Enter a valid IPv4 or IPv6 address.", "code": "invalid_field", "field": "ip"}
Codes: invalid_request invalid_field unauthorized forbidden missing_scope not_found conflict already_exists insufficient_credit domain_unavailable premium_not_accepted email_not_confirmed contact_details_missing renewed_recently nameservers_not_nameocean rate_limited idempotency_key_reused idempotency_in_progress upstream_error unavailable limit_reached not_eligible mx_records_exist forwarding_off invalid_code refused not_approved
120 requests per minuut per account. Elk antwoord bevat X-RateLimit-Limit, X-RateLimit-Remaining en X-RateLimit-Reset (seconden totdat er weer ruimte vrijkomt). Boven de limiet is het antwoord 429 met code rate_limited en retry_after in seconden.
Stuur bij POST, PUT, PATCH en DELETE een Idempotency-Key-header (een UUID) mee. Valt de verbinding weg, probeer het dan opnieuw met dezelfde sleutel: u krijgt het eerste antwoord terug met Idempotent-Replayed: true, en het domein wordt niet twee keer geregistreerd of in rekening gebracht. Succesvolle antwoorden worden per account 24 uur bewaard; dezelfde sleutel met een ander verzoek wordt geweigerd met 422 idempotency_key_reused. Fouten worden niet bewaard, dus nadat u de oorzaak hebt verholpen (bijvoorbeeld door tegoed toe te voegen), wordt een nieuwe poging met dezelfde sleutel opnieuw uitgevoerd.
$ curl -X POST https://nameocean.net/api/v1/domains \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" -d '{"name": "example.com", "years": 1}'
Account, credit and the activity log.
/ #Describe the API. Endpoints, record types, TTL values and scopes, as JSON.
Scopes: geen
curl -X GET https://nameocean.net/api/v1/ \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
Fouten: 400 · 401 · 404 · 429
/account #Account and credit. Your email and account credit in USD.
Scopes: account:read
curl -X GET https://nameocean.net/api/v1/account \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
email | string | |
credit | string | USD amount as a decimal string |
currency | "USD" | |
domains | integer | |
dns_zones | integer | |
add_funds_url | string |
Fouten: 400 · 401 · 403 · 404 · 429
/audit #Activity log. What was done on the account through the API, the CLI and MCP (every write call, refused calls and transfer-code reads) and API key and app changes in the dashboard. Newest first; pass next_cursor as cursor for the next page.
Scopes: account:read
| Parameter | In | Beschrijving |
|---|---|---|
limit | query | |
cursor | query | next_cursor from the previous page |
channel | query |
curl -X GET https://nameocean.net/api/v1/audit?limit=1&cursor=1&channel=1 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
events | AuditEvent[] | |
next_cursor | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
Search, register, renew and manage domains.
/domains/check #Check availability and price. Is a domain free to register, and what it costs.
Scopes: domains:read
| Parameter | In | Beschrijving |
|---|---|---|
name * | query | bijv. example.com |
years | query |
curl -X GET https://nameocean.net/api/v1/domains/check?name=example.com&years=1 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
available | boolean | |
reason | string | Why it is not available. |
years | integer | |
premium | boolean | |
register_price | string | USD amount as a decimal string |
renew_price | string | USD amount as a decimal string |
currency | "USD" |
Fouten: 400 · 401 · 403 · 404 · 429
/domains #List domains
Scopes: domains:read
curl -X GET https://nameocean.net/api/v1/domains \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domains | Domain[] |
Fouten: 400 · 401 · 403 · 404 · 429
/domains #Register a domain. Paid from account credit; 402 with code insufficient_credit when it is not enough. Premium names need accept_premium: true. Send an Idempotency-Key so a retry never registers twice.
Scopes: domains:write billing:write · Idempotency-Key
| Body-veld | Type | Beschrijving |
|---|---|---|
name * | string | |
years | integer | |
accept_premium | boolean |
curl -X POST https://nameocean.net/api/v1/domains \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "example.com", "years": 1}'
201 Registered; its DNS zone is returned.
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
records | Record[] | |
hint | string |
Fouten: 400 · 401 · 402 · 403 · 404 · 429
/domains/{name} #Get a domain. Nameservers, lock, auto-renew and SSL status.
Scopes: domains:read
| Parameter | In | Beschrijving |
|---|---|---|
name * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/domains/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
active | boolean | |
pending | boolean | |
suspended | boolean | |
expires_on | string | null | |
auto_renew | boolean | |
locked | boolean | |
created_at | string | null | |
renewal_price | string | null | |
nameservers | string[] | |
custom_nameservers | boolean | |
dns_zone | boolean | |
ssl | Ssl |
Fouten: 400 · 401 · 403 · 404 · 429
/domains/{name} #Change auto-renew or lock
Scopes: domains:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
name * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
auto_renew | boolean | |
locked | boolean |
curl -X PATCH https://nameocean.net/api/v1/domains/example.com \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"auto_renew": true}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
active | boolean | |
pending | boolean | |
suspended | boolean | |
expires_on | string | null | |
auto_renew | boolean | |
locked | boolean | |
created_at | string | null | |
renewal_price | string | null | |
nameservers | string[] | |
custom_nameservers | boolean | |
dns_zone | boolean | |
ssl | Ssl |
Fouten: 400 · 401 · 403 · 404 · 429
/domains/{name}/nameservers #Set nameservers. Two to four hostnames, or "nameocean" for NameOcean DNS.
Scopes: domains:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
name * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
nameservers * | array | string |
curl -X PUT https://nameocean.net/api/v1/domains/example.com/nameservers \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"nameservers": ["ns1.example.net", "ns2.example.net"]}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
active | boolean | |
pending | boolean | |
suspended | boolean | |
expires_on | string | null | |
auto_renew | boolean | |
locked | boolean | |
created_at | string | null | |
renewal_price | string | null | |
nameservers | string[] | |
custom_nameservers | boolean | |
dns_zone | boolean | |
ssl | Ssl |
Fouten: 400 · 401 · 403 · 404 · 429
/domains/{name}/renew #Renew one year. Paid from account credit, within 60 days of expiry. Send an Idempotency-Key.
Scopes: domains:write billing:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
name * | path | Domain name bijv. example.com |
curl -X POST https://nameocean.net/api/v1/domains/example.com/renew \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
renewed | string | |
charged | string | USD amount as a decimal string |
credit | string | USD amount as a decimal string |
Fouten: 400 · 401 · 402 · 403 · 404 · 429
/domains/{name}/auth-code #Get the transfer code. The EPP code to move the domain away.
Scopes: domains:write
| Parameter | In | Beschrijving |
|---|---|---|
name * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/domains/example.com/auth-code \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
auth_code | string |
Fouten: 400 · 401 · 403 · 404 · 429
Zones and records.
/dns #List DNS zones
Scopes: dns:read
curl -X GET https://nameocean.net/api/v1/dns \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
zones | object[] |
Fouten: 400 · 401 · 403 · 404 · 429
/dns #Create a DNS zone. Free. Point the domain's nameservers to ns1-ns4.nameocean.net to use it.
Scopes: dns:write · Idempotency-Key
| Body-veld | Type | Beschrijving |
|---|---|---|
name * | string |
curl -X POST https://nameocean.net/api/v1/dns \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name": "example.com"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
name | string | |
records | Record[] | |
hint | string |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records #List records
Scopes: dns:read
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/dns/example.com/records \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
zone | string | |
records | Record[] |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records #Add a record
Scopes: dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
type * | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname * | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
curl -X POST https://nameocean.net/api/v1/dns/example.com/records \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "A", "hostname": "@", "ip": "203.0.113.10", "ttl": "1h"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
type | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records/{type}/{id} #Get a record
Scopes: dns:read
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
type * | path | Record type: A, CNAME, MX, TXT, SRV, PTR or REDIRECT bijv. A |
id * | path | Numeric id bijv. 42 |
curl -X GET https://nameocean.net/api/v1/dns/example.com/records/A/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
type | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records/{type}/{id} #Change a record. Send only the fields to change.
Scopes: dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
type * | path | Record type: A, CNAME, MX, TXT, SRV, PTR or REDIRECT bijv. A |
id * | path | Numeric id bijv. 42 |
| Body-veld | Type | Beschrijving |
|---|---|---|
type * | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname * | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
curl -X PATCH https://nameocean.net/api/v1/dns/example.com/records/A/42 \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"ip": "203.0.113.20"}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
type | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records/{type}/{id} #Replace a record. Same as PATCH.
Scopes: dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
type * | path | Record type: A, CNAME, MX, TXT, SRV, PTR or REDIRECT bijv. A |
id * | path | Numeric id bijv. 42 |
| Body-veld | Type | Beschrijving |
|---|---|---|
type * | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname * | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
curl -X PUT https://nameocean.net/api/v1/dns/example.com/records/A/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
type | string | One of: A, CNAME, MX, TXT, SRV, PTR, REDIRECT |
hostname | string | @ for the zone itself |
ip | string | A (IPv4 or IPv6) |
target | string | CNAME, MX, SRV, PTR, REDIRECT |
text | string | TXT |
priority | integer | MX, SRV |
weight | integer | SRV |
port | integer | SRV |
save_path | boolean | REDIRECT: keep the path |
ttl | string | One of: 5m, 15m, 30m, 1h, 1d |
Fouten: 400 · 401 · 403 · 404 · 429
/dns/{zone}/records/{type}/{id} #Delete a record
Scopes: dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
type * | path | Record type: A, CNAME, MX, TXT, SRV, PTR or REDIRECT bijv. A |
id * | path | Numeric id bijv. 42 |
curl -X DELETE https://nameocean.net/api/v1/dns/example.com/records/A/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
Free wildcard certificates.
/ssl/{zone} #Certificate status
Scopes: ssl:read
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/ssl/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
zone | string | |
status | string | One of: none, issuing, waiting_for_nameservers, active |
auto_renew | boolean | |
expires_on | string | null | |
download_url | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/ssl/{zone} #Issue a certificate. Free wildcard Let's Encrypt certificate; the zone must use NameOcean nameservers. Poll GET until active.
Scopes: ssl:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
curl -X POST https://nameocean.net/api/v1/ssl/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
202 Issuing
| Antwoordveld | Type | Beschrijving |
|---|---|---|
status | string | One of: none, issuing, waiting_for_nameservers, active |
auto_renew | boolean | |
expires_on | string | null | |
download_url | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/ssl/{zone} #Change auto-renew
Scopes: ssl:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
zone * | path | DNS zone (domain) name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
auto_renew * | boolean |
curl -X PATCH https://nameocean.net/api/v1/ssl/example.com \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"auto_renew": true}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
zone | string | |
status | string | One of: none, issuing, waiting_for_nameservers, active |
auto_renew | boolean | |
expires_on | string | null | |
download_url | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
App servers: ports and domain bindings.
/servers #List app servers
Scopes: servers:read
curl -X GET https://nameocean.net/api/v1/servers \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
servers | Server[] |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server} #Get a server. SSH, git remote, ports and domains.
Scopes: servers:read
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
curl -X GET https://nameocean.net/api/v1/servers/3f9a1c2e \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
name | string | |
status | string | |
plan | string | null | |
default_domain | string | |
cpu | integer | |
memory_mb | integer | |
disk_gb | integer | |
private_ip | string | null | |
ipv6 | string | null | |
ssh | object | |
git_remote | string | null | |
backups | boolean | |
ports | Port[] | |
domains | Binding[] |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/ports #List open ports
Scopes: servers:read
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
curl -X GET https://nameocean.net/api/v1/servers/3f9a1c2e/ports \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
server | string | |
ports | Port[] |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/ports #Open a port. The external port is assigned.
Scopes: servers:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
| Body-veld | Type | Beschrijving |
|---|---|---|
port * | integer | |
protocol | string | One of: tcp, udp |
curl -X POST https://nameocean.net/api/v1/servers/3f9a1c2e/ports \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"port": 25565, "protocol": "tcp"}'
201 Opened
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
protocol | string | One of: tcp, udp |
internal_port | integer | |
external_port | integer | |
connect_to | string | Only when the port was just opened. |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/ports/{id} #Close a port
Scopes: servers:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
id * | path | Numeric id bijv. 42 |
curl -X DELETE https://nameocean.net/api/v1/servers/3f9a1c2e/ports/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Closed
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/domains #List bound domains
Scopes: servers:read
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
curl -X GET https://nameocean.net/api/v1/servers/3f9a1c2e/domains \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
server | string | |
domains | Binding[] |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/domains #Bind a domain. Serves a domain or subdomain from the server: DNS records, SSL and the load balancer. Poll GET until status is active.
Scopes: servers:write dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
| Body-veld | Type | Beschrijving |
|---|---|---|
domain * | string | |
subdomain | string |
curl -X POST https://nameocean.net/api/v1/servers/3f9a1c2e/domains \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"domain": "app.example.com"}'
201 Setting up
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
domain | string | |
status | string | One of: setting_up, active |
url | string |
Fouten: 400 · 401 · 403 · 404 · 429
/servers/{server}/domains/{id} #Unbind a domain
Scopes: servers:write dns:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
server * | path | Server id, or its default domain such as 3f9a1c2e.nameocean.org bijv. 3f9a1c2e |
id * | path | Numeric id bijv. 42 |
curl -X DELETE https://nameocean.net/api/v1/servers/3f9a1c2e/domains/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Unbound
Fouten: 400 · 401 · 403 · 404 · 429
Mailboxes, aliases and mailing lists on your paid mail domains (Mox).
/email/domains #List mail domains. Domains with paid email hosting. Buying, upgrading and reactivating a plan is done in the dashboard.
Scopes: email:read
curl -X GET https://nameocean.net/api/v1/email/domains \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domains | MailDomain[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain} #Get a mail domain. With its mailboxes, aliases, mailing lists and the IMAP/SMTP settings.
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
active | boolean | |
suspended_reason | string | null | One of: unpaid, ended, admin, None |
plan | string | null | |
storage_gb | integer | |
used_gb | string | Decimal GB, as of the last refresh |
assigned_gb | integer | Sum of the mailboxes' quotas (at most storage_gb) |
max_mailboxes | integer | null | |
mailbox_count | integer | |
expires_at | string | null | |
auto_renew | boolean | |
dashboard | string | |
mailboxes | Mailbox[] | Only on GET /email/domains/{domain} |
aliases | MailAlias[] | |
lists | MailingList[] | |
settings | object | IMAP, SMTP and webmail for mail clients |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain} #Change mail auto-renew
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
auto_renew * | boolean |
curl -X PATCH https://nameocean.net/api/v1/email/domains/example.com \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"auto_renew": true}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
active | boolean | |
suspended_reason | string | null | One of: unpaid, ended, admin, None |
plan | string | null | |
storage_gb | integer | |
used_gb | string | Decimal GB, as of the last refresh |
assigned_gb | integer | Sum of the mailboxes' quotas (at most storage_gb) |
max_mailboxes | integer | null | |
mailbox_count | integer | |
expires_at | string | null | |
auto_renew | boolean | |
dashboard | string | |
mailboxes | Mailbox[] | Only on GET /email/domains/{domain} |
aliases | MailAlias[] | |
lists | MailingList[] | |
settings | object | IMAP, SMTP and webmail for mail clients |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/dns-check #Check mail DNS. Looks up NS, MX, SPF, DKIM and DMARC now and compares them with what NameOcean mail needs.
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/dns-check \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
ok | boolean | |
checks | object | ns, mx, spf, dkim, dmarc |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes #List mailboxes
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/mailboxes \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
mailboxes | Mailbox[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes #Create a mailbox. Without a password one is generated. The answer is the only time the password is returned. quota_gb comes out of the plan's storage (default 1).
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
username * | string | |
full_name | string | |
password | string | |
quota_gb | integer |
curl -X POST https://nameocean.net/api/v1/email/domains/example.com/mailboxes \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"username": "info", "full_name": "Info"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
username | string | |
full_name | string | |
quota_gb | integer | |
used_gb | string | |
aliases | string[] | |
password | string | Only in the answer that set it |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes/{username} #Get a mailbox
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
username * | path | Mailbox name, the part before @ (or the full address) bijv. info |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/mailboxes/info \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
username | string | |
full_name | string | |
quota_gb | integer | |
used_gb | string | |
aliases | string[] | |
password | string | Only in the answer that set it |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes/{username} #Change a mailbox. Send only what changes.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
username * | path | Mailbox name, the part before @ (or the full address) bijv. info |
| Body-veld | Type | Beschrijving |
|---|---|---|
full_name | string | |
quota_gb | integer |
curl -X PATCH https://nameocean.net/api/v1/email/domains/example.com/mailboxes/info \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"quota_gb": 5}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
username | string | |
full_name | string | |
quota_gb | integer | |
used_gb | string | |
aliases | string[] | |
password | string | Only in the answer that set it |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes/{username} #Delete a mailbox. Deletes the mailbox, all its mail and its aliases. This can't be undone.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
username * | path | Mailbox name, the part before @ (or the full address) bijv. info |
curl -X DELETE https://nameocean.net/api/v1/email/domains/example.com/mailboxes/info \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/mailboxes/{username}/password #Set a mailbox password. Sets the password you send, or generates one when you send none, and returns it.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
username * | path | Mailbox name, the part before @ (or the full address) bijv. info |
| Body-veld | Type | Beschrijving |
|---|---|---|
password | string |
curl -X POST https://nameocean.net/api/v1/email/domains/example.com/mailboxes/info/password \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
username | string | |
full_name | string | |
quota_gb | integer | |
used_gb | string | |
aliases | string[] | |
password | string | Only in the answer that set it |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/aliases #List mail aliases
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/aliases \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
aliases | MailAlias[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/aliases #Add a mail alias. Mail to alias is delivered to the mailbox. Both are on the same domain; send the full address or the part before @.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
alias * | string | |
mailbox * | string |
curl -X POST https://nameocean.net/api/v1/email/domains/example.com/aliases \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"alias": "sales", "mailbox": "info"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
mailbox | string | The mailbox that receives it |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/aliases/{alias} #Delete a mail alias
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
alias * | path | Alias address, or the part before @ bijv. sales |
curl -X DELETE https://nameocean.net/api/v1/email/domains/example.com/aliases/sales \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/lists #List mailing lists
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/lists \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
lists | MailingList[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/lists #Create a mailing list. Mail to the list's address goes to every member (mailboxes of the domain).
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
address * | string | |
name | string | |
members | string[] |
curl -X POST https://nameocean.net/api/v1/email/domains/example.com/lists \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address": "team", "members": ["info", "sales"]}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
name | string | |
members | string[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/lists/{address} #Get a mailing list
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
address * | path | Mailing list address, or the part before @ bijv. team |
curl -X GET https://nameocean.net/api/v1/email/domains/example.com/lists/team \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
name | string | |
members | string[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/lists/{address} #Change a mailing list. members replaces the whole member list.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
address * | path | Mailing list address, or the part before @ bijv. team |
| Body-veld | Type | Beschrijving |
|---|---|---|
name | string | |
members | string[] |
curl -X PATCH https://nameocean.net/api/v1/email/domains/example.com/lists/team \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"members": ["info"]}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
address | string | |
name | string | |
members | string[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/domains/{domain}/lists/{address} #Delete a mailing list
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
address * | path | Mailing list address, or the part before @ bijv. team |
curl -X DELETE https://nameocean.net/api/v1/email/domains/example.com/lists/team \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
Free forwarding and mail-to-webhook for domains registered at NameOcean.
/email/forwarding #List forwarding domains. Every active domain registered in your account, with whether forwarding is on and, when off, why it can't be.
Scopes: email:read
curl -X GET https://nameocean.net/api/v1/email/forwarding \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domains | Forwarding[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain} #Get forwarding. Aliases and mail webhooks.
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/forwarding/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
active | boolean | |
disabled_reason | string | null | |
problems | string[] | Why it can't be turned on, when it is off |
alias_count | integer | |
webhook_count | integer | |
mx | string | The MX host forwarding writes into the zone |
max_aliases | integer | |
max_webhooks | integer | |
daily_limit | integer | Mails forwarded per domain and day |
aliases | ForwardAlias[] | |
webhooks | MailWebhook[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain} #Turn forwarding on. Free for domains registered at NameOcean that use NameOcean nameservers. Writes the MX record; other MX records are removed only with replace_mx: true (otherwise 409 mx_records_exist).
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
replace_mx | boolean |
curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"replace_mx": false}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
active | boolean | |
disabled_reason | string | null | |
problems | string[] | Why it can't be turned on, when it is off |
alias_count | integer | |
webhook_count | integer | |
mx | string | The MX host forwarding writes into the zone |
max_aliases | integer | |
max_webhooks | integer | |
daily_limit | integer | Mails forwarded per domain and day |
aliases | ForwardAlias[] | |
webhooks | MailWebhook[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain} #Turn forwarding off. Removes the MX record; aliases are kept for when it is turned on again.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X DELETE https://nameocean.net/api/v1/email/forwarding/example.com \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Turned off
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/aliases #List forwarding aliases
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/forwarding/example.com/aliases \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
aliases | ForwardAlias[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/aliases #Add a forwarding alias. localpart@domain forwards to `to`; * forwards every address without its own alias. An address not confirmed yet gets a mail with a link and a code; mail is forwarded once it is confirmed.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
localpart * | string | |
to * | string |
curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com/aliases \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"localpart": "hello", "to": "me@gmail.com"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
localpart | string | * = every address without its own alias |
address | string | |
catch_all | boolean | |
to | string | |
to_status | string | One of: pending, confirmed, refused |
active | boolean | |
note | string | Only when just added: what happens next |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/aliases/{localpart} #Delete a forwarding alias. Use * (%2A) for the catch-all.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
localpart * | path | The part before @, or * (%2A) for the catch-all bijv. hello |
curl -X DELETE https://nameocean.net/api/v1/email/forwarding/example.com/aliases/hello \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/targets #List forwarding targets. Addresses you forward to and whether they confirmed.
Scopes: email:read
curl -X GET https://nameocean.net/api/v1/email/forwarding/targets \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
targets | ForwardTarget[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/targets/{id}/verify #Confirm a forwarding target. The 6-digit code from the confirmation mail.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
| Body-veld | Type | Beschrijving |
|---|---|---|
code * | string |
curl -X POST https://nameocean.net/api/v1/email/forwarding/targets/42/verify \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"code": "123456"}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
email | string | |
status | string | One of: pending, confirmed, refused |
confirmed_at | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/targets/{id}/resend #Resend a confirmation code. At most 3 a day per address.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
curl -X POST https://nameocean.net/api/v1/email/forwarding/targets/42/resend \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
email | string | |
status | string | One of: pending, confirmed, refused |
confirmed_at | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/messages #List forwarded mail. The last 30 days, newest first: headers and what happened, never the body.
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
limit | query | |
cursor | query | |
status | query |
curl -X GET https://nameocean.net/api/v1/email/forwarding/example.com/messages?limit=1&cursor=1&status=1 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
messages | ForwardedMessage[] | |
next_cursor | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/messages/{message_id}/release #Forward held mail. Forwards a message held as spam, over the daily limit or failed (releasable: true).
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
message_id * | path | Message id (uuid) bijv. 6f1c2a4e-8b3d-4f5a-9c7e-1d2b3a4c5e6f |
curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com/messages/6f1c2a4e-8b3d-4f5a-9c7e-1d2b3a4c5e6f/release \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
202 Forwarding
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | string | |
received_at | string | null | |
to | string | |
forwarded_to | string | null | |
from | string | null | |
subject | string | null | |
size | integer | |
status | string | One of: forwarded, spam, quota, release_requested, released, bounced, loop, failed |
spam_score | number | null | |
releasable | boolean | |
smtp_response | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/webhooks #List mail webhooks. Addresses whose mail is posted to your URL as JSON, with their signing secrets.
Scopes: email:read
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
curl -X GET https://nameocean.net/api/v1/email/forwarding/example.com/webhooks \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
domain | string | |
webhooks | MailWebhook[] |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/webhooks #Add a mail webhook. Mail to localpart@domain is posted to url as JSON (an email.received event). Open after a short review (403 not_approved until then); ask for it in the dashboard.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
| Body-veld | Type | Beschrijving |
|---|---|---|
localpart * | string | |
url * | string |
curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com/webhooks \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"localpart": "inbound", "url": "https://example.com/hooks/mail"}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
localpart | string | |
address | string | |
catch_all | boolean | |
url | string | |
active | boolean | |
created_at | string | null | |
secret | string | whsec_...; signs X-NameOcean-Signature |
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/webhooks/{localpart} #Delete a mail webhook
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
localpart * | path | The part before @, or * (%2A) for the catch-all bijv. hello |
curl -X DELETE https://nameocean.net/api/v1/email/forwarding/example.com/webhooks/hello \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
/email/forwarding/{domain}/webhooks/{localpart}/rotate-secret #Rotate a mail webhook secret. The old secret stops working at once.
Scopes: email:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
domain * | path | Domain name bijv. example.com |
localpart * | path | The part before @, or * (%2A) for the catch-all bijv. hello |
curl -X POST https://nameocean.net/api/v1/email/forwarding/example.com/webhooks/hello/rotate-secret \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
localpart | string | |
address | string | |
catch_all | boolean | |
url | string | |
active | boolean | |
created_at | string | null | |
secret | string | whsec_...; signs X-NameOcean-Signature |
Fouten: 400 · 401 · 403 · 404 · 429
Endpoints that receive account events: https://nameocean.net/developers/webhooks/
/webhooks/events #List event types. Every event type and group you can subscribe to.
Scopes: webhooks:read
curl -X GET https://nameocean.net/api/v1/webhooks/events \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
events | object[] | |
groups | string[] |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks #List webhook endpoints
Scopes: webhooks:read
curl -X GET https://nameocean.net/api/v1/webhooks \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
webhooks | WebhookEndpoint[] |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks #Add a webhook endpoint. An https URL on a public server. The answer includes the signing secret. Up to 10 endpoints.
Scopes: webhooks:write · Idempotency-Key
| Body-veld | Type | Beschrijving |
|---|---|---|
url * | string | |
events * | string[] | |
description | string |
curl -X POST https://nameocean.net/api/v1/webhooks \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/hooks/nameocean", "events": ["dns.*", "ssl.issued"]}'
201 Created
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
url | string | |
description | string | |
events | string[] | Event types, groups like "dns.*", or ["*"] |
active | boolean | |
disabled_reason | string | null | Why NameOcean turned it off |
secret | string | whsec_...: verify X-NameOcean-Signature with it. Not in list answers. |
created_at | string | null | |
last_success_at | string | null | |
last_failure_at | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id} #Get a webhook endpoint. With its signing secret.
Scopes: webhooks:read
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
curl -X GET https://nameocean.net/api/v1/webhooks/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
url | string | |
description | string | |
events | string[] | Event types, groups like "dns.*", or ["*"] |
active | boolean | |
disabled_reason | string | null | Why NameOcean turned it off |
secret | string | whsec_...: verify X-NameOcean-Signature with it. Not in list answers. |
created_at | string | null | |
last_success_at | string | null | |
last_failure_at | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id} #Change a webhook endpoint. Send only what changes. active: true turns a disabled endpoint back on.
Scopes: webhooks:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
| Body-veld | Type | Beschrijving |
|---|---|---|
url | string | |
events | string[] | |
description | string | |
active | boolean |
curl -X PATCH https://nameocean.net/api/v1/webhooks/42 \
-H "Authorization: Bearer $NAMEOCEAN_API_KEY" \
-H "Content-Type: application/json" \
-d '{"active": true}'
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | integer | |
url | string | |
description | string | |
events | string[] | Event types, groups like "dns.*", or ["*"] |
active | boolean | |
disabled_reason | string | null | Why NameOcean turned it off |
secret | string | whsec_...: verify X-NameOcean-Signature with it. Not in list answers. |
created_at | string | null | |
last_success_at | string | null | |
last_failure_at | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id} #Delete a webhook endpoint
Scopes: webhooks:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
curl -X DELETE https://nameocean.net/api/v1/webhooks/42 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
204 Deleted
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id}/test #Send a test event. Posts a webhook.test event now, whatever the endpoint's event filter, and returns the delivery.
Scopes: webhooks:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
curl -X POST https://nameocean.net/api/v1/webhooks/42/test \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | string | whd_..., also sent as X-NameOcean-Delivery |
event | object | |
status | string | One of: pending, succeeded, failed |
attempts | integer | |
next_attempt_at | string | null | |
last_attempt_at | string | null | |
response_status | integer | null | |
response_body | string | null | First 500 characters |
error | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id}/deliveries #List deliveries. Newest first; pass next_cursor as cursor for the next page.
Scopes: webhooks:read
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
limit | query | |
cursor | query | |
status | query |
curl -X GET https://nameocean.net/api/v1/webhooks/42/deliveries?limit=1&cursor=1&status=1 \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
deliveries | WebhookDelivery[] | |
next_cursor | string | null |
Fouten: 400 · 401 · 403 · 404 · 429
/webhooks/{id}/deliveries/{delivery_id}/resend #Resend a delivery. Posts the same event (same id) again now.
Scopes: webhooks:write · Idempotency-Key
| Parameter | In | Beschrijving |
|---|---|---|
id * | path | Numeric id bijv. 42 |
delivery_id * | path | Delivery id (whd_...) bijv. whd_3f9a1c2e4b5d6a7c8e9f0a1b |
curl -X POST https://nameocean.net/api/v1/webhooks/42/deliveries/whd_3f9a1c2e4b5d6a7c8e9f0a1b/resend \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY"
200 OK
| Antwoordveld | Type | Beschrijving |
|---|---|---|
id | string | whd_..., also sent as X-NameOcean-Delivery |
event | object | |
status | string | One of: pending, succeeded, failed |
attempts | integer | |
next_attempt_at | string | null | |
last_attempt_at | string | null | |
response_status | integer | null | |
response_body | string | null | First 500 characters |
error | string | null |
Fouten: 400 · 401 · 403 · 404 · 429