Skip to content

POST · Bearer

POST /api/v1/domains/:id/setup-link

Summary

Create one link the human opens to publish this domain's DNS records. Body expires_in_hours is an optional integer from 1 to 168 and defaults to 72. Returns HTTP 201 {url, expires_at, domain_id, hostname}. url is https://cooperemail.com/setup/domain/{token}. The token is stored as a SHA-256 hash and is not an API key. A new link revokes the previous link for that domain. A verified domain can still have a link. DELETE /api/v1/domains/:id/setup-link revokes the current link and returns HTTP 204. Calling DELETE again is the same HTTP 204. Another account's id is 404 domain_not_found. The page shows the hostname, pending or verified, each record with a copy button, the last status and hint, an existing_mail_provider warning when one is present, a zone file, and short DNS steps. Check now runs the same check as POST /api/v1/domains/:id/verify, including the 60 second limit and domain.verified. An expired, revoked, or unknown token returns HTTP 404 and does not show the hostname. When dns.mode is external, POST /api/v1/domains adds setup_link_hint. Agent: add the domain, create a setup link, send it to your human; listen for domain.verified.

Request

{
  "expires_in_hours": 72
}

Response

HTTP 201. Sample values illustrate the schema.

{
  "url": "https://example.com/hooks/cooper",
  "expires_at": "2026-10-18T12:00:00.000Z",
  "domain_id": "inb_example",
  "hostname": "string"
}

Errors

  • HTTP 404 domain_not_found
  • HTTP 400 invalid_body

Idempotency

This route does not document Idempotency-Key or client_id.