Skip to content
sproutboatDocs
Esc
↑↓navigate↵open⌘Jpreview

Release a custom domain

Refused with 409 domain-in-use while an app of the team still routes the name; remove those routes first.

DELETE/v1/domains/{host}
Authorization
AuthorizationBearer token · headerrequired

A team API key, sbk_..., from Settings, API keys.

or
x-api-keyAPI key · headerrequired

The same key, in a header of its own.

Path parameters
hoststringrequired

A custom domain, lowercase, percent-encoded if needed.

Responses
200

Released.

deletedstringrequired

The hostname.

401

No key, or an invalid, expired or revoked key (unknown or missing API token, invalid, expired or revoked API key). No reason.

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
403

The key lacks a grant (reason: forbidden, need: "<resource>:<action>").

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:forbidden
needstringrequired

The grant, as <resource>:<action>, for example app:write.

404

No such app, build, secret, manifest or claim in this team (another team's resource looks the same).

errorstringrequired

A message for people. Do not parse it.

reasonstring

A stable, machine-readable cause, when there is one.

pathstring

The request field at fault.

needstring

The grant a 403 asks for, app:write for example.

retry_after_sinteger
409

An app of the team still routes the name (reason: domain-in-use).

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:domain-in-use
429

The key is over its requests a minute (600, or 2,000 with app:write; reason: key-rate-limited, retry_after_s, Retry-After). Wait that long and retry.

errorstringrequired

A message for people. Do not parse it.

reasonstringrequired
Allowed:key-rate-limited
retry_after_sintegerrequired

Seconds to wait; also the Retry-After header.

Request
curl -X DELETE 'https://dash.sproutboat.com/v1/domains/app.example.com' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "deleted": "string"
}