ravenhook

Get your namespace

GET/namespaceBearer token required

Your namespace and the domain built from it. You need this once, during setup — put the domain in an environment variable and never call this again.

Parameters

None.

Example

import os, requests

reply = requests.get(
    "https://api.ravenhook.dev/namespace",
    headers={"Authorization": f"Bearer {os.environ['RAVENHOOK_TOKEN']}"},
)

domain = reply.json()["domain"]
# store this as RAVENHOOK_DOMAIN
const res = await fetch("https://api.ravenhook.dev/namespace", {
  headers: { Authorization: `Bearer ${process.env.RAVENHOOK_TOKEN}` },
});

const { domain } = await res.json();
// store this as RAVENHOOK_DOMAIN
curl -s "https://api.ravenhook.dev/namespace" \
  -H "Authorization: Bearer $RAVENHOOK_TOKEN"

Response

{
  "namespace": "ex4mple0ns",
  "domain": "ex4mple0ns.inbox.ravenhook.dev",
  "address_format": "{anything}@ex4mple0ns.inbox.ravenhook.dev"
}
namespaceThe random label allocated to your account, permanently
domainWhat you append your local parts to. This is your RAVENHOOK_DOMAIN
address_formatA template showing where the local part goes

address_format is a template, not an address

{anything} is a placeholder. Substitute any local part you like and mail sent there arrives — no registration, no setup call, no limit on how many you use.

It is written this way on purpose. An earlier version returned a plausible example address, and read cold that looks like an inbox you already have, which made people think the endpoint was stale when mail arrived somewhere else. A template cannot be mistaken for an instance.

There is no endpoint that lists your addresses

Not an unimplemented one — the question has no answer in this design. Addresses are never created, so there is no set of them to return. Any local part is valid the moment mail arrives for it, which is exactly what lets a test use a fresh UUID and have it work first time.

If what you want is "which addresses have received mail", read the to field from GET /messages.

Your namespace never changes

It is allocated once and belongs to the account, not the bearer token. Rotating or replacing your token keeps every address working. Namespaces are also never reused between accounts, so a new customer cannot inherit an address still sitting in someone's old test configuration.

Errors

CodeCause
401Token missing, malformed, or unknown
403Valid token, but no namespace allocated to the account. This should not happen — contact support
429Too many requests