# weird documentation, in full
Every page of https://docs.weird.ro in reading order. Prices are never written here: they are in the price book (`weird credits charges`).
---
# weird documentation
URL: https://docs.weird.ro/
weird is a Romanian hosting platform: .ro domains, DNS hosting, storage served at your own domain over HTTPS, tunnels to an app on your own computer, P2P apps and servers in the EU. Everything is used from the `weird` command line, from an AI assistant through the CLI's MCP server, from [your account](https://app.weird.ro/login?lang=en), or directly through the API.
The only thing bought is credits; every product spends them. Credit charges live in the list of credit charges and are always shown in credits (see [how billing works](/guides/billing/)).
## Start here
- [Getting started](/guides/getting-started/): an account, credits and a first site.
- [How billing works](/guides/billing/): credits, hourly billing, per-request reads, the low-balance warning.
- [Using weird with an AI assistant](/guides/ai-assistants/): the MCP server, its own limited key, confirmations.
## Guides
| Guide | What it covers |
|---|---|
| [Domains](/guides/domains/) | registering, renewing and transferring .ro domains |
| [DNS](/guides/dns/) | zones, records, DNSSEC, moving a live domain |
| [Storage and sites](/guides/storage/) | uploading, copies, attaching a domain, versions, taking down |
| [Locked content](/guides/locked-content/) | encrypted on your computer, opened with a password, a link or a key |
| [Tunnels](/guides/tunnels/) | an app on your own computer at your own hostname, over HTTPS |
| [P2P apps](/guides/p2p-apps/) | signalling, relay, TURN and an offline mailbox for your app |
| [Servers](/guides/servers/) | tiers, volumes, snapshots, one-command apps |
| [Account and security](/guides/account-security/) | sign-in without a password, the authenticator, keys, your data |
## Reference
- [The API](/api/): every operation, generated from the API's public document.
- [The weird CLI](/cli/): every command and flag, generated from the CLI itself.
- [The MCP server](/mcp/): every toolset and tool an agent can use.
- [Formats](/formats/): the published format of locked content.
For assistants: [llms.txt](/llms.txt) lists every page, and [llms-full.txt](/llms-full.txt) is the whole documentation as one text file.
---
# Guides
URL: https://docs.weird.ro/guides/
Each guide explains one product: what it is, how to use it with the `weird` command line, what it costs (always in credits, from the list of credit charges) and what to know before relying on it. The [reference](/api/) has every detail.
Install the command line first: the [CLI reference](/cli/#install) says how, and `weird help ` explains each area in the terminal.
---
# Getting started
URL: https://docs.weird.ro/guides/getting-started/
This guide takes you from nothing to a first site online with the `weird` command-line program. Everything here can also be done through the [API](/api/).
## 1. Create your account
```terminal
$ weird signup
```
You are asked for your email address and sent a sign-up link; paste it back into the terminal (or open it on the same computer and paste the address it opened). A link works for at least an hour. One address receives only a few sign-up emails an hour: past that nothing new is sent, and you are told to use the most recent link in your inbox (look in spam too), which still works. weird has no passwords: from then on you sign in with a code emailed to you, plus your authenticator once you have one (see [Account and security](/guides/account-security/)).
On another computer, sign in with:
```terminal
$ weird login
```
## 2. Accept the terms
```terminal
$ weird terms
```
This shows the current terms of service and privacy notice and offers to accept them. Until the current versions are accepted, the account and its API keys can be used for nothing else; when a new version is published you are asked again. A version published ahead is listed with the day it takes effect on the application's legal documents page.
Your account has a language, Romanian or English: that of every email weird sends you and of the texts you accept. A new account takes the language the application showed when you signed up; the application's language switch changes it ([`PUT /auth/language`](/api/auth/#setLanguage)).
## 3. Set up your authenticator
```terminal
$ weird security enroll
```
Scan the QR code with an authenticator app, type the first code it shows and the code we email you for this first authenticator (eight letters and digits, `XXXX-XXXX`), and store the eight backup codes printed once. Anything that spends credits or deletes something needs your authenticator when you act from a signed-in terminal or the application.
## 4. Fill in your details and add credits
Before you can see your balance, add credits or register a domain, three things must be on file:
- your holder details (name, address, phone, and for a holder in Romania the CNP the .ro registry requires);
- your phone number, confirmed with a texted code, when the platform asks for it (`weird profile` says whether it is still missing);
- a billing profile: the details printed on your invoices.
```terminal
$ weird profile set
$ weird profile phone start
$ weird profile phone confirm
$ weird billing add
```
`weird profile` shows what is still missing. Everything on weird is paid from prepaid credits; credits are the only thing you buy, and VAT is added when you buy them. Add some:
```terminal
$ weird credits topup
```
You are shown the usual amounts, then a text about your right of withdrawal that you confirm by typing `yes`, and the payment page opens in your browser. The credits arrive as soon as the payment goes through. [How billing works](/guides/billing/) explains the rest.
```terminal
$ weird credits
$ weird status
```
`weird credits` shows the balance; `weird status` shows the account at a glance and what to do next.
## 5. A first site
A site is a folder with an `index.html` at its root. Uploading is done with the `weird` program (the web application does not upload files). Enable storage once (you are shown where the copies of your content are kept, and agree), check the folder's own rules files on your computer, then upload it:
```terminal
$ weird storage enable
$ weird storage check-site ./site
$ weird storage add ./site
```
The upload answers the content's address (its CID) and a gateway address where it can already be opened. Then give it a name, in one of two ways.
### On a free address, no domain needed
A free address is a name under one of weird's own domains, lent to you for as long as a site is on it ([Free addresses](/guides/free-address/)). One command claims the name, uploads the folder and puts it on the name:
```terminal
$ weird names check ana
$ weird names publish ana ./site
```
Free addresses exist only under the domains the platform has opened for them (`weird names bases` lists them); under one not open yet, the claim is refused, says so and gives its credits back: try later, or put the site on a domain of your own.
### On your own domain
A hostname can be attached only inside a DNS zone that is **live**, and a zone goes live only once the domain points at the zone's nameservers. Check and register a domain (both show the credit charge and ask first), with its DNS zone created at the same time:
```terminal
$ weird domains check example.ro
$ weird domains register example.ro --with-dns
```
weird points a domain registered here at its zone by itself: the answer says so, and that the zone goes live once the registry publishes the change. If it says instead that the zone is waiting for the nameserver switch (the automatic pointing failed), point the domain at it:
```terminal
$ weird domains nameservers example.ro --use-weird-dns
```
Then wait until the zone is live. The registry can take from a few minutes to a few hours to publish the change; the zone is checked automatically, and you can check at once:
```terminal
$ weird dns check example.ro
```
When it says the zone is live, attach the content to a hostname of that zone:
```terminal
$ weird storage domains attach www.example.ro
```
An attach refused because the zone is still pending means the domain does not point at the zone yet, and one refused because the zone waits for the registry to publish its nameservers succeeds a few minutes later: run `weird dns check example.ro` and try again. A domain registered elsewhere works too: host its DNS on weird with `weird dns create example.ro`, set the nameservers you are given at its registrar, and wait for the same check ([DNS](/guides/dns/)).
### Later versions
To publish a new version, upload the folder again and point the same hostname at the new CID (on a free address, `weird names publish` does both):
```terminal
$ weird storage domains retarget www.example.ro
```
The [storage and sites guide](/guides/storage/) covers paths, versions and taking a site down.
Two optional files in the folder make the site behave like any site elsewhere: `_redirects` for moved pages and your own not-found page, `_headers` for caching and security headers ([Redirects and headers for your site](/guides/site-files/)). An app with its own router needs one line: [Publishing a single-page app](/recipes/single-page-app/).
## Where next
- [How billing works](/guides/billing/): what is charged, when, and how to see credit charges.
- [Domains](/guides/domains/) and [DNS](/guides/dns/).
- [Using weird with an AI assistant](/guides/ai-assistants/): `weird mcp setup` gives an agent its own limited key.
- The [CLI reference](/cli/) lists every command; `weird help ` prints a short guide to each area.
---
# How billing works
URL: https://docs.weird.ro/guides/billing/
## Credits
```credit-price
```
Everything on weird is paid from one prepaid balance of credits. **Credits are the only thing you buy**: VAT is added when you buy them, and the invoice is for the credits. Domains, DNS, storage, tunnels, p2p apps and servers then *spend* credits. Every credit charge on weird is stated in credits. How credits are bought is explained on the [Credits and charges page](https://weird.ro/en/credite/#credite). Until weird sets the price of a credit, credits are not on sale: the price above says so, `credit_price` is `null` in `GET /public/charges` and `GET /credits/topup`, and a top-up is refused.
```terminal
$ weird credits
$ weird credits topup
$ weird credits topup options
```
`weird credits topup options` shows how many credits you can add at once, the usual amounts, the VAT rate and the payment providers. A top-up opens the payment page; nothing is charged until you pay there, and an unpaid order lapses. Each top-up needs your acknowledgement of a text about your right of withdrawal (see [Withdrawing from a top-up](#withdrawing)).
## Where to see credit charges {#charges}
One thing has a price: a credit, shown at the top of this page (VAT included) and when you buy credits. Everything else is a credit charge, in credits, from the platform's list of credit charges. Each credit charge has a **contract** (such as `domains.register`) and a **rate** (such as `per_year`, `per_hour`, `per_mb_hour` or `per_request`).
- `weird credits charges` lists every credit charge and any announced change.
- `GET /credits/charges` answers the list of credit charges in force, and the next one when a change is scheduled ([API](/api/credits/#getCharges)).
- The [Credits and charges page](https://weird.ro/en/credite/) on weird.ro shows them, read live from the list of credit charges.
Every API operation that costs something says so in its `x-weird-charged` facts, and every command and MCP tool that spends credits shows the credit charge and asks first. Never rely on a remembered credit charge: read the book.
## How things are charged
| How | When | Examples |
|---|---|---|
| Up front | taken from the credits before the action runs; refunded if the action fails | registering or renewing a domain, a transfer, creating a DNS zone, writing DNS records, enabling storage |
| By the hour | every hour while the thing exists; deleting it stops the charge | servers, volumes, snapshots, tunnels, p2p apps, stored content (per MB and copy), the records of a live DNS zone |
| By use | per unit used | traffic served from storage, DNS answers, relayed p2p traffic |
| Per request | after a successful request; failed or refused requests are free | reading your products: listing and showing domains, zones, storage, tunnels, apps, servers |
Per-request charges are added up and taken from the credits every hour. Calls about the account itself (the balance, credit charges, the profile, top-ups) are not charged. Writing to support is free, whatever the ticket is about: opening a ticket and every message in it take no credits.
For example, a domain registration and the hourly rate of a tunnel:
```cost
price: domains.register per_year
show: as-is
note: Taken from the credits when the registration is ordered, times the number of years.
```
```cost
price: recurring.tunnel-hourly per_hour
show: year
note: A tunnel is billed by the hour while it exists; this is a full year of it.
```
## Your history and invoices
```terminal
$ weird credits history
$ weird credits statement
$ weird invoices
```
The history lists every charge, top-up and refund; the statement groups spending per day and service; invoices are issued for your top-ups, and the application's Billing page lists them with each one's PDF (add a billing profile with `weird billing add` to have them made out to a person or a company).
## The low-balance warning
weird estimates what your account spends per hour (servers by tier, volumes, snapshots, stored content, live DNS zones, tunnels and p2p apps, plus the recent average of what is billed by use) and warns you by email and in your notifications:
- once when the credits left last fewer hours than your threshold (72 hours unless you change it, from 24 to 720);
- optionally once when the balance falls under an amount you choose;
- a second, stronger warning when fewer than 24 hours are left.
The account is checked about every hour, and a warning is not repeated until the balance has recovered.
```terminal
$ weird credits warning show
$ weird credits warning set --hours 120
```
The warnings cannot be turned off in the email choices, only with `weird credits warning set --off`.
## When credits run out
An action charged up front is simply refused (`402 insufficient-funds`) and nothing is done: add credits and retry. What is billed by the hour is charged from the credits each hour; when an hour cannot be paid, each product follows its own sequence. The periods below are each service's defaults (an operator may set a longer grace for an account); the notices you are sent name the dates that apply to you.
**Domains.** Registering, renewing and transferring are refused when the credits do not cover them (nothing is sent to the registry). Automatic renewal is tried from 30 days before the expiry, once a day, and you are emailed each day it cannot be paid (and reminded 30, 7 and 1 days before the expiry, and on the day). It keeps being tried for as long as the registry still holds the domain for your account, past the expiry too, through the registry's grace period while the registry accepts a renewal. Paying lets the next daily attempt renew, or renew it yourself. A renewal the registry refuses is refunded and not ordered again for that term. weird never suspends or deletes a domain for unpaid credits; a domain that is not renewed lapses as the .ro registry decides.
**DNS zones.** An active zone keeps being served while its hours are refused, for a grace of 24 hours (with a reminder 6 hours before its end); then it stops being served: it keeps its records and its DNSSEC key, and its unserved hours are not billed. To bring it back, pay: a top-up retries the zone's payment, and once paid it is served again. If it stays unpaid, the zone is deleted automatically 720 hours (30 days) after it stopped being served (a longer period may be set, never a shorter one), announced by email 72 hours and again 6 hours before; right before the deletion its payment is checked one last time, and if your credits now cover it the zone is served again instead. A deleted zone can be added again by the same account for the same domain for a while. A zone held for an abuse review, or of an account under a legal hold, is not deleted. A zone whose activation could not be paid waits (held, not removed) and is activated once the credits cover it.
**Storage.** As soon as an hour is refused you are told, and nothing new can be stored, pinned or attached (`402 account-unpaid`, with the date the grace ends); what you have stays readable and can be retargeted, detached or deleted. After a grace of 24 hours (with a reminder 6 hours before its end) your content and hostnames stop being served; everything stored is kept, and stays billed. After 30 more days the content may be removed, announced by email 72 hours and again 6 hours before (the removal never comes sooner than 6 hours after that last reminder reached you), and by default only once an operator has approved it. Paying at any point serves everything again as it was, at the same addresses.
**Tunnels, P2P apps (rooms), servers.** A new one is refused when the credits do not cover its first hour. An unpaid hour starts a grace of 24 hours, with a reminder 6 hours before its end; the tunnel, the app or the server keeps running meanwhile. Then it is suspended: a tunnel or an app stops being served (its hostname, port, domains and mailbox kept; its suspended hours keep being billed); a server is powered off (and keeps being billed, as a stopped server still costs) and its volumes and snapshots are held. Paying at any point charges the unpaid hours and brings it back as it was: the server is powered on again. A server powered off for unpaid hours cannot be started by hand until its hours are paid.
If it stays unpaid after its retention, it is deleted: never sooner than 720 hours (30 days) after the suspension (a longer retention may be set), no sooner than its `delete_at` (in the product's billing block), announced beforehand (72 hours by default) and, by default, only once our team has approved it. See your product's notice for the dates that apply.
Set the low-balance warning so this never happens.
## Withdrawing from a top-up {#withdrawing}
Within 14 days of paying you may withdraw from a top-up without giving a reason (12 months longer when no acknowledgement was recorded with the order: `extended_period`). Its unused credit is set aside from your balance at once (you can no longer spend it), and its price, VAT included, goes back to the payment the top-up was made with by `pay_by` at the latest (14 days from your request; the withdrawal sheet names that day before you confirm, from `refund_pay_by` of the withdrawable top-up); credit already used is not refunded. In the application it is the "Withdraw from contract here" button on the Wallet page, confirmed with your authenticator or a backup code; you can also withdraw by writing to us by email or by post, and then no code is needed. The confirmation, with the date and time we received the withdrawal and the date the refund is paid by, comes by email. Credit that cannot be refunded (promotional, carried over, received as a gift) is used first, then purchased credit, oldest top-up first.
```terminal
$ weird credits withdrawals
$ weird credits withdraw
```
`weird credits withdrawals` shows what each withdrawal would refund now, and every refund of the account and where it stands: being checked (`awaiting-approval`, with `pay_by`), being made, waiting for your bank details, paid, or not refunded (`rejected`, with the reason in plain words; the credit is then back in your balance and you may withdraw again within the period). Withdrawing cannot be undone, and needs a current authenticator code (or an unused backup code) in the request itself: a recent step-up is not enough. `weird credits withdraw` asks for it hidden (in a script, `--code-fd N` or `--code-env NAME`, never on the command line); the application asks for it in the withdrawal sheet; through the API it is `totp_code` or `backup_code` in the body of [`POST /credits/withdrawals`](/api/credits/#withdraw). When a payment can no longer be refunded that way, the refund is made by bank transfer: you are asked for your IBAN in a support ticket.
Before the money leaves, our team checks every refund of unused purchased credit (a withdrawal, the closing refund, a goodwill refund): that the payment isn't disputed and the request isn't a duplicate. This check never refuses a withdrawal made in time and never delays the refund past its `pay_by`. While it waits, the credit is set aside; a refund that is not made says why and gives the credit back.
Closing the account also refunds unused purchased credit, after the same check; see [Account and security](/guides/account-security/#closing).
## Promotional credit
```terminal
$ weird credits promotional
```
Shows promotional credit (referral rewards among it), what is available and what is about to lapse. Promotional credit is spent before purchased credit, on anything; it expires; it is never refunded or paid out, and the closing settlement and the withdrawal view name it apart.
### Credits included with a domain {#included-allowance}
When weird runs it, registering, renewing or transferring in a domain grants promotional credits once a year of the registration: year one when the order is made, each later year at its anniversary while the domain is still yours (a transfer in grants once, and only when it was charged above zero). The domain operations' answers and `GET /domains/availability` carry it as `allowance` ([`IncludedAllowance`](/api/domains/#registerDomain): `credits_per_year`, `years`, `expires_after_days`, `promotional`); without it there is none, which is the case unless the operator has switched it on. Each grant can be spent for `expires_after_days` days. You are told each grant. If the order is reversed (a lost payment dispute), the unspent part is taken back. The application shows the grant, with its amount from the API, where a domain is checked, ordered and renewed.
---
# Domains
URL: https://docs.weird.ro/guides/domains/
weird registers `.ro` domains in your name, renews them from your credits, moves them in from another company and lets them leave. A domain registered elsewhere can still use weird for its DNS: see [DNS](/guides/dns/).
## Before you register
- **Your holder details.** You are the domain's holder (registrant) as a person, with the details of your profile. Fill them in with `weird profile set`. Without a profile the registration is refused.
- **The CNP.** For a holder in Romania (country `RO`) the .ro registry requires a valid 13-digit personal numeric code (CNP). The CLI asks for it, hidden, if it is not on file; the API refuses with `403 cnp-required` until the profile has one.
- **Your authenticator**, when you act from a signed-in terminal or the application.
## Checking and registering
```terminal
$ weird domains check example.ro
$ weird domains register example.ro --years 2 --with-dns
```
`check` says whether the name is free and its credit charge. `register` shows the credit charge and asks first; a registration is for 1 to 10 years. `--with-dns` also creates the domain's DNS zone on weird, at no extra charge, filled from the domain's live DNS. The zone answers on the internet, and hostnames can be attached in it, once it is live: once the domain points at the zone's nameservers. weird points the domain at the zone by itself (the answer's `hosting.delegation`: `delegated`, or `pending` while the registry processes it); asked while the registration is still pending, hosting is set up, and the domain pointed, once it is active. When the pointing failed and the zone waits for the nameserver switch, run `weird domains nameservers example.ro --use-weird-dns`. Then `weird dns check example.ro` until it says the zone is live (the registry can take from minutes to a few hours to publish the change; the zone is also checked automatically).
```cost
price: domains.register per_year
show: as-is
note: Per year of registration, taken from the credits when the registration is ordered; refunded in full if the registry refuses it.
```
A registration the registry does not finish at once is answered as `pending`; `weird domains show example.ro` shows it become `active` (or `failed`, and refunded). The confirmation is emailed to you.
## The acknowledgement {#acknowledgement}
Registering, renewing, transferring a domain and changing its holder start at once, within the 14-day withdrawal period, so each order needs your own acknowledgement. You are shown this text (version 2026-11-21) in your language and confirm it by typing `yes` (in the application, by ticking its boxes):
> I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned.
The text is shown, and recorded with the order, in the language you read: the application's language switch (which is also your account's language, that of the emails you get), or the `lang` the request names, else its `Accept-Language`, else your account's language.
In scripts, pass both `--request-immediate-start` and `--acknowledge-withdrawal-terms`; `--yes` alone never gives it. Through the API the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, both `true`, and may name the `acknowledgement_version` you showed; the current text is answered by `GET /legal/acknowledgements` (kind `domain-order`) and is the operation's `x-weird-acknowledgement`. A stale version is refused `409 acknowledgement-outdated` with the current text. An AI agent passes these fields only after you have accepted the text yourself.
## Renewal
```terminal
$ weird domains renew example.ro --years 1
$ weird domains auto-renew example.ro on
```
Automatic renewal is on for every domain by default: the domain is renewed for one year from your credits 30 days before it expires. When the credits do not cover it nothing is renewed, you are emailed, and it is tried again daily until the expiry. With automatic renewal off, the domain lapses at its expiry unless you renew it yourself. A renewal cannot be undone: the years added are not refunded.
```cost
price: domains.renew per_year
show: as-is
note: Per year added, taken from the credits when the renewal is ordered.
```
## Moving a domain to weird
```terminal
$ weird domains transfer in example.ro
```
You need the domain's transfer (authorization) key from its current registrar; the CLI asks for it hidden, or reads it from standard input with `--key-stdin`. The domain is listed as `transfer-requested` until the registry completes the transfer. A domain not registered anywhere is refused (register it instead). The transfer needs the same [acknowledgement](#acknowledgement).
```cost
price: domains.transfer per_request
show: as-is
note: Taken from the credits when the transfer is requested; refunded in full if the request is refused.
```
A domain transferred in keeps its previous holder contact, whose email may be the previous holder's. Within 30 days of its arrival you may put one of your verified addresses on it, once: `weird domains adopt-email example.ro you@example.com`.
## Moving a domain away
```terminal
$ weird domains transfer out example.ro
```
This records that the domain is leaving: automatic renewal is turned off and the DNSSEC (DS) record weird published for it is withdrawn (a domain that leaves with a DS its new DNS host does not serve stops resolving). You then get the authorization key from the registry's own domain panel and give it to the new registrar. The domain stays active, manageable and renewable here until it has left; afterwards it is listed `transferred-out` and its DNS zone on weird is exported and removed. `weird domains transfer cancel example.ro` withdraws the intent.
## Becoming the holder (change of holder)
When you manage a domain whose holder is someone else, a change of holder makes you the holder:
```terminal
$ weird domains trade example.ro
$ weird domains trade example.ro --start --years 1
```
The first shows the credit charge and any change in progress; the second starts it with the authorization key the current holder obtains from the registry's domain panel. It costs a registration period (contract `domains.register`), and the expiry **restarts** from the day the registry completes the change: the time left on the current registration is lost. Without the registry's confirmation within 14 days it is cancelled and refunded.
In the application, **Change the registrant** on the domain's page shows the expiry today and the one the period you choose would give, asks for the authorization key and shows [the acknowledgement](#acknowledgement): a change of holder is a domain order like the others, and [`POST /domains/{domain}/trade`](/api/domains/#tradeDomain) needs `immediate_start_requested` and `withdrawal_terms_acknowledged`, both `true` (400 otherwise, nothing charged), and refuses a stale `acknowledgement_version` with `409 acknowledgement-outdated`.
`weird domains trade --start` shows the same acknowledgement and asks you to type yes (or pass `--request-immediate-start --acknowledge-withdrawal-terms`; `--yes` alone is not enough).
## Nameservers, contact details and DNS
```terminal
$ weird domains nameservers example.ro
$ weird domains nameservers example.ro --use-weird-dns
$ weird domains registrant example.ro --phone +40712345678
$ weird domains host example.ro
```
- `nameservers` shows the current nameservers, replaces them with 2 to 6 of your choice, or points the domain at its weird DNS zone.
- `registrant` replaces the holder's address, phone and email at the registry (the registry takes the whole set; missing details are asked for). The email must be one of your verified addresses: the registry sends the domain's transfer key there. The holder's name and ID change only through a change of holder.
- `host` creates the domain's DNS zone on weird (or reuses it), copies its current records and tells you the nameservers to switch to; it costs the same as creating a DNS zone.
## Protecting a domain
```terminal
$ weird domains protect example.ro on
```
A protected (sensitive) domain can be changed only by you, signed in with a fresh authenticator code, never by an API key or an AI agent. Turning the protection off needs an authenticator code in that very request.
## Sharing a domain
You can let another weird account manage parts of a domain (its DNS records, tunnels, storage domains or servers under it) and choose who pays for what they do; the registration itself is never shared. Inviting needs an authenticator code.
```terminal
$ weird domains share add example.ro ana@example.com --scope dns
$ weird domains share list example.ro
```
## Reference
- CLI: [weird domains](/cli/domains/)
- API: [domains](/api/domains/)
- MCP: [the domains toolset](/mcp/domains/)
---
# DNS
URL: https://docs.weird.ro/guides/dns/
weird hosts the DNS of any domain, registered with weird or elsewhere. A **zone** holds a domain's records; each zone gets its own pair of nameservers, and the records take effect once the domain points at them.
## Creating a zone
```terminal
$ weird dns create example.ro
```
The zone is created *pending*, with its nameserver pair. Add records, then point the domain at those nameservers at its registrar and ask for a check:
```terminal
$ weird dns check example.ro
```
The delegation is also checked automatically, often in the first hours, so a zone goes live by itself; `check` just does it now. Once the domain points at the pair the zone becomes *active* and is served.
For a domain registered with weird, `weird domains host example.ro` creates the zone, copies the records the domain has today and tells you the nameservers; `weird domains nameservers example.ro --use-weird-dns` then switches it. Registering with `--with-dns` does both at once.
Zones are per domain and per account: you can hold one zone of a domain, and another account holding a zone of the same name is no obstacle (only the one the domain points at is served).
```cost
price: dns.manage per_request
show: as-is
note: Taken once when a zone is created, and again for each change of records; deleting a zone that never went live refunds its creation.
```
```cost
price: recurring.dns-entry-hourly per_entry_hour
show: year
note: Per record of a live zone (its own SOA and NS records excluded), billed by the hour; a full year of one record.
```
DNS answers served for a live zone are billed by use (contract `dns.traffic-hourly`, rate `per_answer`).
## Records
```terminal
$ weird dns records example.ro
$ weird dns set example.ro @ A 192.0.2.10
$ weird dns set example.ro www CNAME app.example.net
$ weird dns set example.ro @ MX 10 mail.example.net 20 backup.example.net
$ weird dns set example.ro @ TXT "v=spf1 include:_spf.example.net -all"
$ weird dns set example.ro @ TXT "site-verification=abc" --add
$ weird dns delete example.ro www A
```
Records are set by **RRset**: all the records of one name and type together. Setting a name and type replaces every existing value of it, unless `--add` keeps the others. The name is `@` for the domain itself or a name inside it (`www`, `mail.eu`); a target without a dot is a name inside the zone. `--ttl` sets the time-to-live in seconds (default: the zone's).
- Types: A, AAAA, CNAME, MX, TXT, SRV, CAA, NS and DS (below the apex), PTR, HTTPS, SVCB, TLSA and SSHFP.
- A CNAME holds one value and never sits at the apex.
- The apex NS records are the zone's nameserver pair and cannot be set.
- Records another product wrote for you (a tunnel's hostname, a storage domain, a server's hostname, a one-command app) are managed by that product: change them through it. Writing over one is refused `409 managed-record`.
- The records replaced are not kept: to restore them, set them again.
A whole zone can be saved as a standard zone file and replaced from one:
```terminal
$ weird dns export example.ro -o example.ro.zone
$ weird dns import example.ro example.ro.zone
```
`import` replaces the zone's records with those of the file (a record the file does not hold is deleted); one refused record refuses the whole file. Keep an export first.
## DNSSEC
Every live zone is signed with DNSSEC (algorithm 13, ECDSA P-256 with SHA-256). To complete the chain of trust the domain's registrar needs the zone's DS record:
```terminal
$ weird dns dnssec example.ro
```
For a domain registered with weird whose zone here is active, the DS record is published at the registry for you, at no charge, and kept in line whenever the domain is read (`weird domains show example.ro`). For a domain registered elsewhere, give the DS record to its registrar.
## Moving a live domain to weird {#moving}
Moving a domain that already serves a site or mail should not interrupt either. weird reads what the domain publishes today and gives the safe order:
```terminal
$ weird dns create example.ro
$ weird dns move example.ro
```
The order is:
1. **Remove an old DS record** at the current registrar, if the domain has one, and wait for its TTL to pass. A DS from the old provider left in place breaks the domain for validating resolvers the moment the nameservers change.
2. **Copy the current records** into the zone while it is still pending, so it answers exactly like the domain does today:
```terminal
$ weird dns snapshot take example.ro
$ weird dns seed example.ro --preview
$ weird dns seed example.ro
```
Records you already set win unless you pass `--replace`; a seed costs one record change in total.
3. **Lower the TTLs** at the old DNS host a day before switching.
4. **Switch the nameservers** at the registrar to the zone's pair, then run `weird dns check example.ro`.
5. **Add weird's DS record** at the registrar (`weird dns dnssec example.ro`).
If records change at the old host after the seed, catch up before switching:
```terminal
$ weird dns resync check example.ro
$ weird dns resync preview example.ro
$ weird dns resync apply example.ro
```
## Zone states and events
A zone is *pending* until the domain points at it, *active* while it is served, and *suspended* when it stops being served: when the domain no longer points at its nameservers, after a run of unpaid hours (its records are kept and it is served again once paid; left unpaid, it is deleted after a period announced beforehand; see [billing](/guides/billing/)), or after a review ([restrictions](/guides/abuse-restrictions/)).
```terminal
$ weird dns events
```
lists what happened to your zones: went live, suspended, seeded.
## Deleting a zone
```terminal
$ weird dns delete-zone example.ro
```
Deletes the zone and every record in it; a live zone stops answering at once and the domain stops resolving until its nameservers point elsewhere. It cannot be undone. Deleting a zone that never went live refunds its creation; deleting a live one refunds nothing.
```cost
price: dns.zone-cancel per_request
show: as-is
note: Taken when a zone is deleted (it may be free).
```
## Reference
- CLI: [weird dns](/cli/dns/)
- API: [dns](/api/dns/)
- MCP: [the dns toolset](/mcp/dns/)
---
# Storage and sites
URL: https://docs.weird.ro/guides/storage/
Storage keeps your files and folders by their content address (a CID) as several copies, each at a different storage provider, and serves them over HTTPS: at a gateway address, and at hostnames of your own domains. A folder with an `index.html` at its root is a website.
Everything here works from the `weird` command line, from an AI assistant through [the MCP server](/guides/ai-assistants/), or straight through [the API](/api/ipfs/).
## Switch storage on (once)
Before the first upload, read where your copies may be kept and agree to it. The location notice says which regions the storage providers may be in (by default the European Economic Area only).
```terminal
$ weird storage notice
$ weird storage enable
```
`weird storage enable` shows the notice, asks you to agree, and switches storage on. Enabling is charged once, per copy your account keeps (two by default); calling it again charges nothing.
```cost
price: ipfs.storage-enable per_data_set
show: as-is
note: Charged once when storage is switched on, times the number of copies.
```
## Upload a file or a folder
```terminal
$ weird storage add photo.jpg
$ weird storage add ./site
$ weird storage add backup.tar --copies 3
```
Each upload prints its content id, its CID and its gateway address. The CID is also computed on your computer and compared with the one stored, so you know the bytes arrived as they left.
- **A file** goes up in parts, straight to a storage node. If you stop it with Ctrl-C nothing is billed for it; with `--keep` you can continue later with `weird storage add --resume `.
- **A folder** goes up as one zip the storage node unpacks, so it must fit in one upload part (the command tells you the limit). `.DS_Store` and `__MACOSX` are left out; symbolic links are refused. It is served as a website: `index.html` at its root.
- **A CAR file** packed with another IPFS tool goes up as it is, with `--car`.
Stored content is billed by the hour for every megabyte of every copy kept, and per megabyte served.
```cost
price: recurring.ipfs-pin-hourly per_mb_hour
show: year
note: Per MB of every copy, for a full year of keeping it.
```
```cost
price: recurring.ipfs-pin-hourly per_mb_served
show: as-is
note: Per MB served to visitors.
```
> [!WARNING]
> Public means public. Anyone who has the address of stored content can fetch it, and its CID can be fetched from the public IPFS network too. To keep something private, [lock it](/guides/locked-content/) before it leaves your computer.
## See what you store
```terminal
$ weird storage list
$ weird storage show
$ weird storage status
```
`weird storage show` lists the copies of one content and any copy still being made. `weird storage status` shows your usage and says plainly whether storage is unpaid and when serving would stop. Reading these is a small charge per successful request (failed calls are free).
```cost
price: ipfs.reads per_request
show: as-is
note: Each successful read of your storage.
```
How much each site is visited (requests, data, pages, errors, nothing about the visitors) is in [Traffic statistics](/guides/traffic-statistics/).
## Copies
Every content is kept as at least two copies, at different storage providers. Raise or lower the number for one content:
```terminal
$ weird storage copies 3
```
Raising needs enough credits to keep the added copies; they are made one by one and billed as each is ready. Lowering never goes below two.
## Gateway addresses (pins)
A pin is what makes stored content reachable at a gateway address. An upload gets one automatically.
```terminal
$ weird storage pins
$ weird storage pins delete
$ weird storage pins create
```
Retiring a pin takes the gateway address down shortly; the content stays stored (and billed). Creating a pin for the same CID again puts it back.
At the API's current version a gateway address has the form `https:///ipfs//ipfs/` (`gateway_url` in the answers of [the pin operations](/api/ipfs/#listPins)).
### Each content has its own address
A web page runs with the permissions of its *origin* (the scheme and hostname it was loaded from): it can read the cookies, the local storage and the other windows of every page on the same origin. The path form above puts every customer's content on one origin, so it is fine for fetching bytes (a file, an image, an archive) and wrong for opening a site.
That is why each content is served on a hostname of its own, derived from its CID: `https://.ipfs./` (the CID as lowercase CIDv1 base32). It is the address to open and to share; the path form is for raw fetches. The storage service serves both, and a web page asked for in the path form is sent to its own address.
Every pin answer carries both: `subdomain_url`, the content's own address (null when the gateway serves none for it), and `gateway_url`, the path form ([the pin operations](/api/ipfs/#listPins)). The application shows the own address first. Read addresses from the command's output or the API's answer rather than building them yourself.
**Cookies on a content address.** Every content address is a subdomain of the same gateway domain. A cookie your page sets with a `Domain=` attribute naming that domain is sent to every other customer's content too, and theirs to yours. If your site needs cookies, serve it on your own domain (below), or set only host-only cookies: no `Domain` attribute, best with the `__Host-` prefix (`Set-Cookie: __Host-session=…; Path=/; Secure`), which the browser refuses to share with any other host.
## Serve it at your own hostname
Attach a hostname under one of your live [DNS zones](/guides/dns/), or one of your [free addresses](/guides/free-address/), to stored content:
```terminal
$ weird storage domains attach www.example.ro
$ weird storage domains list
```
weird writes the records in your zone for you: an address record pointing at the serving node and, unless you pass `--no-dnslink`, the DNSLink TXT record at `_dnslink.www.example.ro`. An attach never overwrites records: a name that already has an A, AAAA or CNAME record is refused. The records it writes belong to the storage hostname; change them through storage, not by editing the zone. Your site is then served at `https://www.example.ro`.
Each attach, retarget and detach is a DNS change.
```cost
price: dns.manage per_request
show: as-is
note: Each attach, retarget or detach of a hostname.
```
## Publish a new version
Content never changes: a new version of a site is a new upload with a new CID. Point the hostname at it:
```terminal
$ weird storage add ./site
$ weird storage domains retarget www.example.ro
```
The hostname serves the new content shortly. To go back, retarget to the previous CID (keep it stored until you are sure). Delete old versions you no longer need, since every stored version is billed.
## Redirects and headers
Two optional files at the root of the folder give a site its own rules: `_redirects` (moved pages, a single-page app's fallback, your own not-found page) and `_headers` (caching, a content security policy, CORS). They apply on your own hostname, a free address and the content's own address, not on the shared gateway address or under a path map. See [Redirects and headers for your site](/guides/site-files/).
## Path maps
A path map serves one of your pins under a path of one of your storage hostnames, for example a second folder at `https://www.example.ro/photos/`:
```terminal
$ weird storage path-maps create www.example.ro /photos
$ weird storage path-maps list
$ weird storage path-maps set off
$ weird storage path-maps set on
```
`set off` stops serving it and keeps it listed; `set on` serves it again. `weird storage path-maps delete ` retires it for good (create it again to bring it back).
## Take a site down
- **Stop serving a hostname**, keeping the content: `weird storage domains detach www.example.ro` removes its records.
- **Stop serving a gateway address**: `weird storage pins delete `.
- **Delete the content and every copy**: `weird storage delete `. This cannot be undone. It is refused while a hostname or a path map still serves the content: detach or retarget those first. Once deleted, it stops being billed, listed and served at once, and each copy is removed from its storage provider.
## Download
```terminal
$ weird storage get -o ./out
```
Folders are unpacked; every file is checked against the content id.
## When credits run out
While storage has unpaid charges, nothing new can be stored. After a grace period your pins and hostnames stop being served, while everything stored is kept; topping up restores them at the next billing. Content is removed only after a retention period. `weird storage status` shows each date for your account. See [How billing works](/guides/billing/).
## Sharing a domain's hostnames
`weird storage grants create ` lets another account manage storage hostnames under one of your domains; `--payer` chooses who is billed. `weird storage grants revoke ` ends it.
## Reference
- Commands: [weird storage](/cli/storage/)
- API: [IPFS storage operations](/api/ipfs/)
- MCP tools: [storage toolset](/mcp/storage/)
---
# Redirects and headers for your site
URL: https://docs.weird.ro/guides/site-files/
A site on weird can carry two plain text files at the root of its folder, next to `index.html`:
- **`_redirects`**: what happens to an address that names no file: send the visitor elsewhere (a moved page), serve another page of the site in its place (a single-page app), or answer with a page of your own and an error status (your not-found page).
- **`_headers`**: response headers for the paths you choose: caching, a content security policy, CORS, framing, search engines.
Both are optional. Without them a site is served as it is. They are read by the storage gateway when it serves your site; nothing runs on your computer and nothing is added to your pages. The formats are the ones other static hosts use: `_redirects` is the [IPFS Web Redirects File](https://specs.ipfs.tech/http-gateways/web-redirects-file/), `_headers` the format of Netlify and Cloudflare Pages, so a site moving from there usually keeps both files unchanged ([Moving from another host](/recipes/moving-from-another-host/)).
## Where they apply
The two files are read at the root of the content a site serves, on the site's own addresses only:
- **your own hostname** (a hostname of your domain the content is [attached to](/guides/storage/#serve-it-at-your-own-hostname));
- **a free address** (such as `ana.e-weird.ro`, [A free address](/guides/free-address/));
- **the content's own address**, `https://.ipfs./` ([Each content has its own address](/guides/storage/#each-content-has-its-own-address)).
They are never read on the shared gateway address (the path form `/ipfs/…`, one address for every customer), nor for content served under a [path map](/guides/storage/#path-maps) of a hostname: that content is not served from its own root.
The files are part of the content: a change to either is a new upload and a retarget, like any other change to the site ([Publish a new version](/guides/storage/#publish-a-new-version)). Each file is read once per content and kept with it.
## `_redirects` {#redirects}
One rule a line: where from, where to, and an optional status.
```_redirects
# from to status
/about.html /about/ 301
```
- Fields are separated by spaces or tabs. Blank lines and lines starting with `#` are ignored.
- **from** is a path of your site, starting with `/`. A trailing slash makes no difference. It carries no query.
- **to** is a path of your site, starting with `/`, or, for a redirect only, a full address (`https://…`, `http://…`, `ipfs://…`, `ipns://…`).
- **status** is 301 when left out.
| status | what the visitor gets |
| --- | --- |
| `301`, `302`, `303`, `307`, `308` | a redirect to `to` (301 and 308 are permanent, the others temporary) |
| `200` | the page at `to`, served at the address asked for (the address bar does not change) |
| `404`, `410`, `451` | the page at `to`, with that status: your own error page |
A `200`, `404`, `410` or `451` rule must name a page of your site, never a full address: the gateway serves your own content, it never fetches another site for you.
### Moved pages
```_redirects
/about.html /about/ 301
/blog/:year/:slug /posts/:year/:slug 301
/old-blog/* /blog/:splat 301
/shop https://shop.example.ro/ 302
```
- `:name` is a placeholder: it matches one whole segment of the path and can be used in `to`. A name is letters, digits and `_`.
- A `*` as the whole last segment of `from` matches everything under it; what it matched is `:splat` in `to`. So `/old-blog/2024/notes` goes to `/blog/2024/notes`.
- A `from` holds at most 8 placeholders (the `*` counts as one).
### A single-page app
An app that draws its own pages in the browser (React, Vue, Svelte and the like, with their own router) needs every address that is not a file to load `index.html`:
```_redirects
/* /index.html 200
```
Your scripts, styles and images are still served as they are: a rule only applies to an address that names nothing ([Existing files win](#existing-files-win)). The recipe [Publishing a single-page app](/recipes/single-page-app/) goes through it step by step.
### Your own not-found page
```_redirects
/* /404.html 404
```
Any address that names nothing gets your `404.html`, with the status 404, so search engines know the page does not exist. An error page served through a rule (`404`, `410` or `451`) is kept in caches for a minute (`Cache-Control: public, max-age=60`) unless your `_headers` gives it another `Cache-Control`.
Rules can be combined. The first rule that matches wins, so put the precise ones first and a catch-all last:
```_redirects
# moved pages first
/about.html /about/ 301
/old-blog/* /blog/:splat 301
# then everything else that names no file
/* /404.html 404
```
### Existing files win
A rule is looked at only when the address names nothing: a missing file, or a folder without an `index.html`. A file that exists is always served, whatever the rules say. There is no way to force a rule over an existing file: a status written with `!` (such as `200!`), which some hosts accept, makes the file invalid here. To retire a page, delete it from the folder and add its redirect.
A rewrite (`200`) or an error page serves the target as it is: its own target is not looked up in the rules again. If the target is missing too, the visitor gets the gateway's plain 404.
### The visitor's query
A redirect keeps the query the visitor sent. With the rule `/search /find 301`, `/search?q=boots` goes to `/find?q=boots`. When the target carries its own query, both are kept, and for a name both carry the visitor's value wins: with `/search /find?lang=ro 301`, `/search?lang=en` goes to `/find?lang=en`.
### On a free address
A free address may redirect within itself, rewrite and serve its own error pages like any site, but a redirect to another site is refused: the visitor gets `403` (`external-redirect-refused`). A free address under weird's domain must not send people elsewhere. Your own hostname and the content's own address may redirect anywhere.
## `_headers` {#headers}
A path pattern at the start of a line, then the headers for it, each on its own indented line:
```_headers
/*
X-Frame-Options: DENY
Referrer-Policy: strict-origin-when-cross-origin
```
- **The pattern**: a path (`/`, `/about/`, `/blog/:slug`) with `:name` placeholders for whole segments, and at most one `*`, anywhere in it, matching any text (across segments too: `/*.html`). A pattern may also be a full address, `https://www.example.ro/*`, for a site served at several names.
- **The header lines** start with a space or a tab: `Name: value` sets a header, `! Name` removes it. Names are letters, digits and `-`; values are plain printable characters.
- `:name` and `:splat` (what the `*` matched) can be used in a value.
- Every pattern that matches applies, in the order of the file. A header set by two matching rules gets both values, joined with `, `; to replace an earlier value, remove it first with `! Name`.
- Lines starting with `#` and blank lines are ignored.
### Caching
```_headers
/*
Cache-Control: no-cache
/assets/*
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
```
Pages are checked again on every visit, so a new version shows at once; files under `/assets/`, whose names change with every build, are kept for a year. The `! Cache-Control` line removes the value the first rule set, so the two are not joined.
### A content security policy
```_headers
/*
Content-Security-Policy: default-src 'self'; img-src 'self' data:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'
Permissions-Policy: camera=(), microphone=(), geolocation=()
```
Try a new policy first with `Content-Security-Policy-Report-Only`: the browser reports what the policy would block without blocking it.
### CORS: letting another site read your files
```_headers
/api/*
Access-Control-Allow-Origin: https://app.example.ro
Access-Control-Allow-Methods: GET
Access-Control-Max-Age: 600
```
The content's own address always answers `Access-Control-Allow-Origin: *` and keeps it: these lines apply on your own hostname and a free address.
### The headers you may set
Only the headers in this table are applied; any other header in the file is dropped and the rest of the file still applies.
| header | your own hostname | a free address | the content's own address |
| --- | --- | --- | --- |
| `Cache-Control`, `Content-Security-Policy` (`-Report-Only`), `X-Frame-Options`, `Referrer-Policy`, `Permissions-Policy`, `Cross-Origin-Opener-Policy`, `Cross-Origin-Embedder-Policy`, `Cross-Origin-Resource-Policy`, `Link`, `X-Robots-Tag`, `Access-Control-Max-Age`, `Service-Worker-Allowed`, `Timing-Allow-Origin`, custom `X-…` | yes | yes | yes |
| `Content-Type` (a media type), `Content-Disposition`, `Content-Language` (on your site's own files and pages only) | yes | yes | yes |
| `Access-Control-Allow-Origin`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Headers`, `Access-Control-Expose-Headers` | yes | yes | no: the gateway's `*` stays |
| `Access-Control-Allow-Credentials`, `Strict-Transport-Security`, `Clear-Site-Data`, `Origin-Agent-Cluster` | yes | no | no |
| `X-Content-Type-Options` | no: always `nosniff` | no | no |
| `Set-Cookie`, `Location`, `Refresh`, `Content-Length`, `Transfer-Encoding`, `Connection`, `Upgrade`, `Server`, `Alt-Svc`, `ETag`, `Vary`, the gateway's own headers, `X-Ipfs-…`, `X-Accel-…`, `X-Forwarded-…`, `X-Real-IP`, anything else | never | never | never |
**Which wins.** On your own hostname, your header replaces the gateway's header of the same name. On a free address and on the content's own address, the platform's safety headers (`Origin-Agent-Cluster: ?1`, `X-Content-Type-Options: nosniff`, HSTS, and the CORS headers of the content's own address) cannot be removed or replaced; yours are added beside them. The rules apply to every answer for the path asked for (a page, a rewrite, your error page, a redirect, a refusal) except a `451` and a server error.
## Limits
| | `_redirects` | `_headers` |
| --- | --- | --- |
| size of the file | 64 KiB | 64 KiB |
| rules | 1000 | 500 |
| placeholders in one `from` | 8 | |
| headers in one rule | | 32 |
| length of one line | | 2000 characters |
| headers added to one answer | | 8 KiB |
## When a file is wrong
A file that is too large or holds a line that does not parse is not half applied: the site answers `500` with the reason in a short plain-text message, such as `_redirects line 3: missing 'to'`.
- A broken **`_redirects`** answers 500 for the addresses it would decide: those that name no file. Existing pages are still served.
- A broken **`_headers`** answers 500 for **every** address of the site. A site that relies on its content security policy must never be served without it, so nothing is served instead.
A few lines that make a file invalid:
```text
/* /index.html 200! forced rules do not exist here
/docs/*/old /docs/new 301 a * only as the whole last segment of from
/* https://cdn.example.ro/ 200 a 200 rule must name a page of your site
```
**Check before you publish.** First check both files on your computer: `weird storage check-site` reads them with the gateway's own rules and reports every problem with its line, without sending anything (`weird storage add` runs the same check first, as a warning):
```terminal
$ weird storage check-site ./site
```
Then try the answers. Every upload has its own address, and the two files already apply there. Upload the new version, open the content's own address the upload printed (`https://.ipfs./`) and try the addresses your rules decide, in the browser or with `curl`:
```terminal
$ weird storage add ./site
$ curl -I https://.ipfs./about.html
$ curl -I https://.ipfs./assets/app.js
```
When the answers are right, point your hostname at it ([Publish a new version](/guides/storage/#publish-a-new-version)):
```terminal
$ weird storage domains retarget www.example.ro
```
Two answers differ on purpose between the two addresses: the content's own address keeps its `Access-Control-Allow-Origin: *` and its safety headers, and a free address refuses redirects to other sites.
## What it costs
There is no charge for the files themselves beyond storing them, which is a few bytes.
- **A redirect is not charged** as traffic. In your [traffic statistics](/guides/traffic-statistics/) it is counted as a request with a 3xx status.
- **A page served through a rule is charged** as the content it serves: a rewrite (`200`) and your own error page (`404`, `410`, `451`) are traffic like any page, counted under the address the visitor asked for.
```cost
price: recurring.ipfs-pin-hourly per_mb_served
show: as-is
note: Each MB sent to visitors, including pages served through a rule.
```
## Reference
- The attach operation states both formats: [`POST /ipfs/domains`](/api/ipfs/#attachIpfsDomain).
- [Storage and sites](/guides/storage/), [A free address](/guides/free-address/), [Publishing a single-page app](/recipes/single-page-app/), [Moving from another host](/recipes/moving-from-another-host/).
---
# A free address on e-weird.ro
URL: https://docs.weird.ro/guides/free-address/
A free address is a name under one of weird's own domains, such as `ana.e-weird.ro`, that you put a site on. It is for a first site without registering a domain, a project page, a test. The name is **lent, not sold**: you can use it while a site is on it, but it is not yours the way a registered domain is; it goes back when it is left unused, when the account closes, after an abuse decision or when the platform releases it (you are told).
Claiming the name has its own contract in the list of credit charges (below; while it is set at zero the claim is free). What you put on it is not free: the site is stored content, billed as [storage](/guides/storage/) always is (every megabyte kept and served), and attaching it is a DNS change like any other.
```cost
price: names.free-claim per_request
show: as-is
note: Claiming a name (set free in the list of credit charges).
```
You need a [complete profile](/guides/account-security/#email-addresses-and-your-profile) (your details, a verified phone, a billing profile) to check, claim or list names.
## The domains (bases)
The names live under the platform's free-name bases (`e-weird.ro`, and others the operator adds). Each base is `open` (it takes new names) or `closed` (it keeps serving the names it has and takes no more). A claim under a base whose free addresses are not open yet is refused `503 free-names-not-ready`, and its charge is refunded; a site can then go on a domain of your own ([Getting started](/guides/getting-started/#on-your-own-domain)). The application lists them; through the API, [`GET /names/bases`](/api/names/#listFreeNameBases) answers the bases, the label rules, the limits and the periods below, in the platform's current numbers.
## Rules for a name
- One label of the letters `a`-`z`, digits and hyphens inside it (not first or last). No accents and no other alphabet, so a name cannot be made to look like another one in a different script; two hyphens in places three and four are not allowed.
- Between a minimum and a maximum length (4 and 40 characters by default; `rules` in `GET /names/bases`).
- Reserved names (weird's own, public bodies, well-known brands) are refused, and so are names that look like one of them once look-alike characters are folded (`0` as `o`, `1` as `l`, `rn` as `m` …) or that hold a word that is not allowed.
[`GET /names/check?label=ana`](/api/names/#checkFreeName) says whether a label can be claimed now (`available`), and otherwise why (`reason`): `base-closed`, `name-reserved`, `name-forbidden`, `name-taken`, `name-yours`, `name-quarantined` or `base-full`. A label that is not a valid label at all is refused `400`. Each check is a read, charged as reads are:
```cost
price: names.reads per_request
show: as-is
note: Each successful read of your names, the bases or a check.
```
## Claim a name
In the application: **Hosting → Free address**, type the name, and claim it once it is shown as free. The confirmation states the facts below and the charge.
From the terminal:
```terminal
$ weird names bases
$ weird names check ana
$ weird names claim ana
$ weird names list
```
Or the whole path in one command: claim the name, upload the folder and attach it, each charge shown first:
```terminal
$ weird names publish ana ./site
```
Through the API: [`POST /names`](/api/names/#claimFreeName) with `{"label": "ana"}` (and `base`, or the first open base is used). It needs a recent second factor from a session, and an `Idempotency-Key` makes a retry safe. The refusals, each with what to do:
| Refusal | Meaning |
|---|---|
| `409 base-closed` | the base takes no new names; pick another open one |
| `409 name-reserved`, `409 name-forbidden` | the name is not allowed (see the rules) |
| `409 name-taken` | someone else holds it |
| `409 name-quarantined` | it was released recently; `until` says from when it can be claimed |
| `409 claim-limit` | the account already holds the most names one account can (`limits.per_account`, 3 by default) |
| `409 base-full` | the base has no room for new names right now; try another base, or later |
| `403 account-too-new` | the account is too new to claim; `retry_after` is the seconds to wait, `retry_at` the moment |
| `429 claim-rate-limited` | too many claims (`limits.claims_per_day` for one account, and a limit for everyone together); `retry_after` is the seconds to wait, `retry_at` the moment |
| `503 unavailable` | free names are not available right now |
## Put a site on it
A claimed name gets a site the way a hostname of your own domain does: with the storage attach. First upload the folder (from the terminal: the browser does not upload):
```terminal
$ weird storage notice
$ weird storage enable
$ weird storage add ./site
```
Then attach the content to the name, in the application (the name's **Put it on the name**) or from the terminal with the CID the upload printed:
```terminal
$ weird storage domains attach ana.e-weird.ro
```
Through the API it is [`POST /ipfs/domains`](/api/ipfs/#attachIpfsDomain) with the name as `hostname` (refused `409 base-full` when the base has no room for another site right now: try again later). The platform writes the name's records in its own zone; the name is then `serving` and the site is at `https://ana.e-weird.ro/`. A new version is a new upload and a retarget, exactly as for [your own hostnames](/guides/storage/#publish-a-new-version).
A site on a name can carry its own `_redirects` and `_headers` files, as on your own hostname, with one difference: a redirect to another site is refused (`403 external-redirect-refused`). See [Redirects and headers for your site](/guides/site-files/#on-a-free-address).
Only a site from your storage can go on a name: no other DNS record and no mail. Every name publishes that it sends no mail (a null MX, an SPF record allowing nothing, a DMARC reject), so nobody can send mail as it.
## The lifecycle
| State | What it means |
|---|---|
| `claimed` | yours, nothing attached yet: the idle clock runs (`release_after` says when it would be released) |
| `serving` | a site is attached |
| `suspended` | held while a report about it is reviewed (it cannot be released then) |
| `released` | given back; it leaves your list |
- **Idle names are released.** A name with nothing attached for `idle_days` (60 by default) is released; you are told `idle_notice_days` (14) before. Detaching the site starts the clock again.
- **Closing the account** releases its names at the end of the closing's grace period.
- **An abuse decision** can hold a name (`suspended`) and, if the decision stands, release it. The platform also looks at the first page of each newly served name and opens a report for a person to review when it sees a password field, a card number field, a form sending elsewhere or a reserved brand in the title; nothing is blocked automatically.
- **After any release** nobody, you included, may claim the name for `quarantine_days` (365 by default).
You can release a name yourself (`weird names release ana.e-weird.ro`, [`DELETE /names/{id}`](/api/names/#releaseFreeName), or **Release** in the application): the site stops being served at that name (the content stays stored), its records are removed, and the quarantine starts. It cannot be undone.
## Cookies between names
Every free name is a subdomain of the same base. The bases are not on the [Public Suffix List](https://publicsuffix.org/), so a browser treats `ana.e-weird.ro` and `bob.e-weird.ro` as parts of one site for cookies: a page on one name can set a cookie with `Domain=e-weird.ro` that every other name receives, and read theirs.
- Do not use a free address for a sign-in that relies on cookies.
- If your site sets cookies at all, set host-only ones: no `Domain` attribute, best with the `__Host-` prefix (`Set-Cookie: __Host-session=…; Path=/; Secure`), which the browser never shares with another host.
- For anything with accounts, use a domain of your own.
## Moving to your own domain
The content does not move: attach the same CID to a hostname of your own domain, check it is served, then release the free name.
```terminal
$ weird storage domains attach www.example.ro
```
Releasing the name first would take the site offline at the free address; attaching first keeps it served throughout. See [Domains](/guides/domains/) to register one, and [DNS](/guides/dns/) to host its zone.
## Limits, in short
- At most `limits.per_account` names per account (3 by default; the operator can set it to 0 to stop new claims) and `limits.claims_per_day` claims a day (2).
- A name with nothing on it for `idle_days` is released; a released name is unclaimable for `quarantine_days`.
- No mail, no other records, only a site from your storage.
## Reference
- API: [free names](/api/names/), [the storage attach](/api/ipfs/#attachIpfsDomain)
- Commands: [weird names](/cli/names/), [weird storage domains](/cli/storage/)
- How much it is visited: [Traffic statistics](/guides/traffic-statistics/)
---
# Traffic statistics
URL: https://docs.weird.ro/guides/traffic-statistics/
Every site you serve from your storage gets a **summary** of its traffic, included with storage: how many requests, how much data, which pages, which errors, how much came from the cache. It is made from the gateway's own log and holds **nothing about who visited**.
**Detailed statistics** are separate and off unless you switch them on, one site at a time: visitors and visits per day, referring sites, countries, browser, system and device families, bots, entry pages. They are charged by the hour while on, and switching them on makes you the controller of your visitors' data.
In the application: **Statistics** (from the menu, or **Hosting → Statistics**). From the terminal, [`weird stats`](/cli/stats/); for an assistant, the [stats toolset](/mcp/stats/) of `weird mcp`.
```terminal
$ weird stats sites
$ weird stats summary www.example.ro
$ weird stats today www.example.ro
$ weird stats pages www.example.ro --missing
```
## What has statistics
[`GET /ipfs/stats/subjects`](/api/ipfs/#listIpfsStatsSubjects) lists everything of yours that was requested in a range (the last 30 days unless you say `from` and `to`), each a `subject` with its `kind`:
| Kind | Subject |
|---|---|
| `domain` | a hostname of yours, free addresses included (`www.example.ro`, `ana.e-weird.ro`) |
| `name` | one of your names |
| `pin` | a pin's shareable link (`/ipfs//ipfs/`), by pin id |
| `content` | a content's own address (`.ipfs.`) and its bare `/ipfs/` link, counted for the account billed for that traffic |
A range is at most 400 days per request.
## The summary
[`GET /ipfs/stats/summary?subject=www.example.ro&from=2026-11-01&to=2026-11-19`](/api/ipfs/#getIpfsStatsSummary) answers, per UTC day:
- `requests` (every status) and `served_requests` (answered with content), `bytes` and `served_bytes`;
- `hot_bytes` and `cold_bytes`, with `cache_hit_ratio_bytes` and `cache_hit_ratio_requests`: the share served from the gateway's cache rather than fetched from storage;
- `status`: the counts of `2xx`, `3xx`, `4xx`, `5xx`, and exactly `404` and `451`;
- `by_hour`: 24 counts, UTC hours;
- and `totals` over the range.
A pin's summary also covers its content's own address when that traffic is billed to you (`parts` says what it covers).
- **Pages:** [`GET /ipfs/stats/paths?subject=…&day=…`](/api/ipfs/#getIpfsStatsPaths) answers the day's most requested paths (`kind=top`, the default; `error` is how far a count may be over, on very varied sites) and the paths answered not found (`kind=404`: links to fix). A path never carries its query string; a very long one is cut. `day` defaults to yesterday.
- **Today:** [`GET /ipfs/stats/today?subject=…`](/api/ipfs/#getIpfsStatsToday) answers today's running counters, updated within minutes (`updated_at`). The day's full summary, with its hours and pages, follows after the day ends.
**What it is made from.** The gateway's log of host, path without its query, status, size, cache tier and hour. No address, no browser identification, no cookie: nothing about the visitor. The numbers are as logged; your bill is authoritative.
**How long.** Daily summaries are kept 400 days by default (the operator's setting, between 30 and 1100 days).
## Detailed statistics
For a hostname of yours (not a pin or a content address), once you switch them on. Per UTC day:
- `visitors`: people counted once per site and day; `visits`: a visit ends after 30 minutes without a request;
- `requests`, `bytes`, `bot_requests` (declared crawlers) and `automated_requests` (an unusually fast client);
- `hours`: the same per UTC hour;
- `top` lists: `referrers` (the referring site's host name only), `countries` (two-letter codes, `--` unknown), `browsers`, `os`, `devices` (`desktop`, `mobile`, `tablet`, `bot`, `other`), `entry_pages`, `not_found` (missing pages with the site linking to them).
Read them with `weird stats detail www.example.ro` or [`GET /ipfs/stats/detail?subject=www.example.ro`](/api/ipfs/#getIpfsStatsDetail) (`dimensions` picks the lists; all by default). `geo` names the source of the countries (IP geolocation by DB-IP, under CC BY 4.0) and its version: show it with the countries.
### What is recorded about visitors, and what is not
- **On the gateway node that answers the request**, for a site with detailed statistics on, a separate log holds the time, the visitor's address, the path (without its query), status, size, referrer and browser identification, one file per hour. Each closed hour is processed on that node and the file deleted; a file is deleted unprocessed if it waits longer than the limit (two hours by default; the platform's setting allows at most 48 hours). The address is only looked up in a country database kept on the node (no lookup leaves it) and, with the browser's families, turned into a daily key.
- **Only aggregates leave the node**: the counts, the lists and the day's counting registers. No address, browser identification or identifier is kept.
- **Days and sites are not linked.** A visitor's key is made with a secret the node holds in memory for one day and destroys afterwards, and differs per site: counts cannot be linked from one day to the next or from one site to another. Within one day and one site, a visitor's requests share a key (that is how a day's visitors are counted). `visitors_sum` is the sum of daily visitors, **not** a count of unique people, and there is no monthly unique figure.
- **The privacy signal.** A request sent with Global Privacy Control (`Sec-GPC: 1`) is never written to the detailed log: it is counted in the summary only.
- **Nothing is added to your pages**: no cookie, no script, no header.
- **Counted per node.** Each gateway node counts with its own key; when the same visitor is answered by two nodes on one day, they are counted once on each, so a day's visitors can be slightly over.
- **Busy hours.** On a very busy hour a sample is counted (`sampled` says one in how many) and an hour that could not be counted is `lost`; the day says how many of each (`sampled_hours`, `lost_hours`). `complete` is false while a day's lists have not arrived.
**How long.** Detailed aggregates are kept 400 days by default (the operator's setting, between 30 and 1100 days); the raw hourly files at most the limit above.
### Switching on and off
In the application: open a site's statistics, **Detailed statistics → switch on**. The sheet shows what is and is not recorded, the credit charge, and the text you confirm. From the terminal (it shows the text and the hourly credit charge and asks first):
```terminal
$ weird stats detail on www.example.ro
$ weird stats detail off www.example.ro
$ weird stats settings
```
Through the API: [`POST /ipfs/domains/{id}/stats/detail`](/api/ipfs/#enableIpfsDomainStatsDetail), `id` being the gateway domain's id (`domain_id` in [`GET /ipfs/stats/settings`](/api/ipfs/#getIpfsStatsSettings)). It needs a recent second factor from a session, an `Idempotency-Key` makes a retry safe, and the first time (again whenever the text changes) `controller_terms_acknowledged` true, having shown the text of [`GET /legal/acknowledgements`](/api/legal/#legalAcknowledgements) (kind `stats-detail`). A site already on answers `changed` false and is not charged again.
| Refusal | Meaning |
|---|---|
| `409 stats-detail-unavailable` | detailed statistics are not offered |
| `403 stats-owner-only` | only the hostname's owner can switch them (access given on a domain does not) |
| `409 acknowledgement-outdated` | the text changed: show the current one (`version`, `text`) and confirm again |
| `409 domain-retired` | the hostname is detached |
| `402 insufficient-funds`, `402 account-unpaid` | the credits do not cover switching on, or the account's storage charges are unpaid: top up, then retry |
| `403 account-suspended` | the account is restricted while a report is reviewed |
[`DELETE /ipfs/domains/{id}/stats/detail`](/api/ipfs/#disableIpfsDomainStatsDetail) switches them off at once: no more visitor data is read and no further hour is charged. It is free and always possible, also while the account is restricted or its storage unpaid. What was collected stays readable and exportable for its usual period.
An API key needs the permission `stats:write` to switch them, and **no wildcard covers it** (`*`, `*:write` and `stats:*` do not): tick it by name when you make the key. Reading needs `stats:read`.
### You are the controller of your visitors' data
Switching detailed statistics on, you ask weird to process your visitors' data on your behalf: you are the controller, weird your processor, under the data processing agreement the acknowledgement names. Say in your own site's privacy notice that you measure visits this way. The acceptance is kept with its text, version and time.
The agreement is published like the terms and the privacy notice: [`GET /legal/documents/dpa`](/api/legal/#legalDocument), `weird legal show dpa`, and the data processing agreement page of weird.ro.
**A new version of the agreement.** A new version is announced by email and published ahead of the day it takes effect; the application's legal documents page lists it under "Taking effect later", with that day, and you may accept it there before then. Your acceptance of the statistics acknowledgement holds for its text and for the agreement in force when you gave it: once a new agreement has taken effect, switching on asks for the acknowledgement again (an earlier acceptance is refused `409 acknowledgement-outdated`, naming `dpa_version` and the `accepted_dpa_version`), and the detailed statistics of an account that has not accepted it are paused. [`GET /ipfs/stats/settings`](/api/ipfs/#getIpfsStatsSettings) lists those sites under `dpa_paused`, and the application says they are paused until you accept the new agreement, with the button that accepts it ([`POST /auth/legal/accept`](/api/auth/#legalAccept) with `dpa_version`); accepting switches them back on. Nothing collected is deleted and the paused hours are not charged.
## Export
[`GET /ipfs/stats/export?subject=…&from=…&to=…`](/api/ipfs/#exportIpfsStats) answers a range as a file: `level` `summary` (one row per day) or `detail` (rows per day, per hour and per list entry, `record` saying which), `format` `csv` (the default; a cell starting with `=`, `+`, `-` or `@` gets a leading `'`, so a spreadsheet never runs it) or `json` (`columns` and `rows`, the values exactly as recorded). The application's **Download CSV** and **Download JSON** save the API's answer as it is; from the terminal, `weird stats export www.example.ro -o stats.csv`.
## Charges
Every successful read of statistics is a storage read:
```cost
price: ipfs.reads per_request
show: as-is
note: Each successful read of statistics or an export.
```
The summary itself is included with storage. Detailed statistics: switching on, then every hour a site has them on, and the requests analysed:
```charged
ipfs.stats-detailed-enable per_request before
ipfs.stats-detailed-hourly per_host_hour hourly sites with detailed statistics on
ipfs.stats-detailed-hourly per_million_requests usage
```
When the hours cannot be charged, collection pauses (`paused` `unpaid`) and resumes by itself once your credits cover them; the paused hours are never charged, and what was collected stays readable.
## Reference
- API: [statistics in the storage reference](/api/ipfs/#getIpfsStatsSummary), [acknowledgements](/api/legal/#legalAcknowledgements)
- Commands: [weird stats](/cli/stats/); MCP tools: [stats toolset](/mcp/stats/)
- Guides: [Storage and sites](/guides/storage/), [A free address](/guides/free-address/), [Billing](/guides/billing/)
---
# Locked content
URL: https://docs.weird.ro/guides/locked-content/
Stored content is public: anyone with its address can fetch it. Locked content is encrypted on your computer before it is uploaded, so weird and the storage providers store only ciphertext; the password and the keys stay on your device. weird does serve the page that opens an album (and, in the application, the page that locks one), so check it as [the viewer](#the-viewer) section below says. It opens with a way in that you choose: a password, a share link, a recovery kit, or a person's public key.
The format is published as [weirdlock1](/formats/weirdlock1/) (Apache-2.0), so a locked album opens without weird too: see [Opening your content without weird](/guides/opening-without-weird/).
## Lock and upload
A file or a folder becomes a locked album:
```terminal
$ weird storage add ./wedding --lock
$ weird storage add ./wedding --lock --link --recovery-kit kit.txt
$ weird storage add doc.pdf --lock-to weirdpk1… --lock-key me
```
- `--lock`: a password, typed hidden and twice. A weak password is warned about, not refused. In scripts, read it with `--password-fd N` or `--password-env NAME`; a password never goes on the command line.
- `--link`: a share link, printed once. Its key travels in the part of the link after `#`, which browsers do not send to servers.
- `--recovery-kit FILE`: a recovery link written to a new file only you can read. Keep it offline.
- `--lock-to weirdpk1…`: a person's public key (`--lock-to-hidden` does not write whose key it is). `--lock-key NAME`: one of your own keys.
- `--pad` hides exact file sizes (at most 12% more storage); `--title` gives the album an encrypted title; `--password-hint` is a public hint shown next to the password field, readable by anyone.
Your own key pairs live on this computer only:
```terminal
$ weird storage keys create me
$ weird storage keys show me
$ weird storage keys export me -o me-key.txt
```
`weird storage keys show` prints the public key (`weirdpk1…`) to give to people who lock things for you. `weird storage keys export` writes a recovery copy of the key pair, private key included, to a new file; keep it somewhere safe, because a lost key cannot be recovered.
A single locked file that is not uploaded, to send or keep anywhere:
```terminal
$ weird storage lock seal doc.pdf -o doc.pdf.wlk --lock
```
Locked content is stored and billed like any other upload ([Storage and sites](/guides/storage/)).
## Open it
```terminal
$ weird storage get --unlock -o ./wedding
$ weird storage get --recovery-kit kit.txt -o ./wedding
$ weird storage get --key me -o ./wedding
```
`--link-key` opens with a share link or its `#k=` part, pasted at a hidden prompt. Each file is written only after its whole encrypted stream has been checked.
### In a browser: the viewer {#the-viewer}
A locked album carries its own viewer: an `index.html` at its root and a script and a stylesheet under `v//`, next to `lock/`. Open the album's address and the viewer asks for a way in; the album is decrypted in your browser and nothing you type leaves the page. It:
- **opens** with a password, with a share link (the key after `#k=` in the address, removed from the address bar as soon as it is read), or with a key file or recovery kit you choose on your device (read there, never uploaded);
- **shows** the album as a grid of previews; opens a photo, plays a video or a sound, and downloads any file decrypted;
- **locks again** when you ask, after 15 minutes without use, and when you leave the page: the album key is dropped and every decrypted file let go;
- **runs only on the album's own address**: a hostname of your domain, or the content's own address (`https://.ipfs./`, see [Storage](/guides/storage/#each-content-has-its-own-address)). It refuses to run on a shared gateway path, where other people's pages share its origin, and inside another page (a frame);
- **talks to nothing but the album's own files**: no update check, no font, no analytics, no other site. Its content security policy allows nothing else, and it never stores a key, a password or anything about you in the browser;
- **honours `--expires`**: after that date it says the owner set the album to stop opening.
Its limits: a file larger than the viewer opens in memory (512 MB; less on devices with little memory) is not opened in the browser, and the viewer names the command to use instead; a password needs about 128 MB of memory for a moment, which very old phones may not have; video plays once it is decrypted whole (no streaming); a locked site of many pages does not open (the format reserves it).
Albums locked with the weird CLI and in the application both carry the viewer ([for implementers](/formats/weirdlock1-viewer/#embedding)).
**Checking the viewer.** The viewer is the weakest point: whoever serves the album serves its code, and a changed viewer could send your password away. The release is a fixed set of files whose SHA-256 values are published [with the release](/formats/weirdlock1-viewer/#release); the script and stylesheet are loaded with Subresource Integrity, so only `index.html` can differ without the browser refusing it. Compare the served `index.html` with the published value, or open the album with the command line, which never runs web code:
```terminal
$ weird storage get --unlock -o ./wedding
```
## In the application {#in-the-application}
[app.weird.ro](https://app.weird.ro/storage/locked) locks an album in your browser: choose files, a password (typed twice; a weak one is said to be weak), optionally a public hint and a recovery kit, and confirm that a lost password cannot be recovered. The files are encrypted in the page with the viewer's own code; the password, the album key and the files never reach weird. You get the locked folder as a zip (the viewer at its root, `lock/` beside it) and, if you asked, the recovery kit as a text file.
The browser does not upload it: the storage nodes that take uploads do not accept them from a web page. Upload the folder with the command line and give it an address of its own:
```terminal
$ weird storage add ./wedding-locked
$ weird storage domains attach album.example.ro
```
The application's code is served by weird, as the viewer's is: if that matters to you, lock with the command line.
## See what is visible without a key
```terminal
$ weird storage lock show
$ weird storage lock list --unlock
```
`weird storage lock show` reads only the public parts, with no password or key: exactly what weird, the storage providers and anyone holding the CID can see. `weird storage lock list` opens the encrypted list of names, types and sizes, downloading only that.
## Change who may open it
```terminal
$ weird storage lock add-person weirdpk1…
$ weird storage lock add-password --unlock
$ weird storage lock add-link --unlock
$ weird storage lock password --unlock
$ weird storage lock remove --slot 2 --unlock
```
Each needs a way in that already works (here `--unlock`). The slot numbers come from `weird storage lock show`. For stored content, the album is uploaded again as new content with the same encrypted files and a new key list; `--host www.example.ro` serves the new copy at your hostname instead of the old one. The old copy stays stored, and billed, until you delete it with `weird storage delete`.
## What locking protects
- **From weird and the storage providers**: they hold ciphertext, sizes and upload details; never a key, a password or a link secret.
- **From anyone who finds the address or the CID** without a way in.
- **From tampering in storage**: every part of every file is authenticated. A changed, cut, reordered or swapped file fails to open, and nothing unchecked is released.
- **From fast password guessing**: the password is stretched with a memory-hard function. It slows guessing down; it does not save a weak password.
## What it cannot do
- **A weak password.** The ciphertext is public for ever and can be guessed at offline, without limit. Use a long passphrase.
- **Taking back what was opened.** Removing a way in is not revocation: whoever opened the album before may have kept the album key or the files, and the old copy still opens with the old key list. To shut someone out for good, lock everything again under a new key and upload it as new content:
```terminal
$ weird storage get --unlock -o ./wedding
$ weird storage add ./wedding --lock
```
- **Expiry.** `--expires DATE` is advisory: viewers that cooperate honour it; it cannot stop someone who saved the album.
- **Metadata.** The number of encrypted files and their approximate sizes, the number and kind of ways in, upload and access times, your account and hostname stay visible to weird.
- **A compromised device**, yours or the visitor's, or someone looking over a shoulder.
- **Leaked links.** A share link lives on in chat histories, browser history and synced bookmarks; anyone who has it can open the album.
- **Who sent it.** Anyone can lock something to a person's public key: a person key says "this was meant for you", not "this came from X".
- **Lost passwords and keys.** Nobody, weird included, can recover them. Keep a recovery kit or an exported key offline.
The full threat model is in [section 2 of the format](/formats/weirdlock1/).
## With an AI assistant
The `locked` toolset of [the MCP server](/guides/ai-assistants/) locks only for people's public keys and your own keys by name. No tool takes or returns a password, a link secret or a private key: a share link, if asked for, is written to a private file and only its path is answered, and every step that needs a password answers the terminal command for you to run.
## The older format
`--encrypt-password`, `--key-file` and `--encrypt-to` store one encrypted envelope (`weirdenc1`) instead of an album; it downloads with `weird storage get --decrypt-password` (or `--key-file`). It still works; new content should be locked.
## Reference
- Commands: [weird storage lock](/cli/storage/#weird-storage-lock), [weird storage add](/cli/storage/#weird-storage-add)
- The format: [weirdlock1](/formats/weirdlock1/)
- MCP tools: [locked toolset](/mcp/locked/)
---
# Opening your content without weird
URL: https://docs.weird.ro/guides/opening-without-weird/
A locked album or file does not need weird, an account, or a sign-in to
open: the format is published ([weirdlock1](/formats/weirdlock1/), Apache-2.0) and
`weird storage lock open` works with no credential and no weird address.
1. **Know its CID.** `weird storage list` (while you have an account), the
output of `weird storage add`, or `weird storage lock show`. Keep it with
your recovery kit.
2. **Fetch it from any IPFS gateway** — and let the CLI check every block
against the CID, so the gateway need not be trusted:
```sh
weird storage lock open bafy… --gateway https:/// -o ./photos --unlock
```
The content is read at `/ipfs/`; any gateway that serves
raw blocks (`?format=raw`) works. You can also fetch the folder with any
other IPFS tool (for example `ipfs get `) and open the local copy:
```sh
weird storage lock open ./bafy… -o ./photos --unlock
```
3. **Open it** with whichever way in you have:
- `--unlock` — a password (typed hidden; `--password-fd`/`--password-env` in scripts);
- `--recovery-kit kit.txt` — the kit written by `--recovery-kit` or
`weird storage lock add-link --write-kit`; its `#k=` line, or the
`base32:` line typed by hand, is the key;
- `--link-key` — paste a share link or its `#k=…` part;
- `--key NAME` — your own key. If this computer lost it, put back the
copy made with `weird storage keys export NAME -o FILE`:
`weird storage keys import FILE`, then `--key NAME`.
Each file is written only after its whole encrypted stream authenticated.
A single locked file (`weird storage lock seal`) opens the same way from
its path. Any other implementation of weirdlock1 opens them too; the test
vectors in `weirdlock/testdata/vectors` say exactly what it must do.
See also [locked content](/guides/locked-content/) and the [`weird storage lock`](/cli/storage/#weird-storage-lock) commands.
---
# Tunnels
URL: https://docs.weird.ro/guides/tunnels/
A tunnel makes something running on your computer reachable at `https://`: a local web app, a demo, a home dashboard. Visitors reach the tunnel's node over HTTPS; your computer keeps an outgoing connection to it, so nothing on your network needs to be opened.
## Start one
```terminal
$ weird tunnel demo.example.ro 3000
```
This creates the tunnel for that hostname (or reuses yours), connects it, and waits until it is live. Visitors to `https://demo.example.ro` reach what runs on this computer at port 3000.
The hostname must be under a domain you control:
- **Its DNS zone is at weird**: the record pointing the name at the tunnel is written for you. A name that already has an A, AAAA or CNAME record is refused, so nothing of yours is overwritten.
- **Its DNS is elsewhere** (or in a zone of yours that is not live yet): you are shown the records to add where the domain's DNS is managed: the address record, and a TXT record at `_atunnel.` holding the value you are given, which proves the name is yours (the API's `dns_txt_name` and `dns_txt_value`, while `hostname_verified` is false). The tunnel waits for them (`pending-dns`); after you add them, `weird tunnels verify-dns demo.example.ro` checks again.
A tunnel bills by the hour while it exists, connected or not.
```cost
price: recurring.tunnel-hourly per_hour
show: year
note: One tunnel kept for a full year.
```
## The background helper
A helper program keeps your tunnels connected after you close the terminal.
```terminal
$ weird agent status
$ weird agent autostart on
$ weird agent logs
```
`weird agent autostart on` starts it when you log in to your computer. The helper remembers each tunnel node's identity the first time it connects and refuses to connect if it ever changes, since the connection could be intercepted. Only when weird tells you a node was replaced, run `weird agent forget-node `.
## Manage your tunnels
```terminal
$ weird tunnels list
$ weird tunnels get demo.example.ro
$ weird tunnels stop demo.example.ro
$ weird tunnels delete demo.example.ro
```
- `weird tunnels stop` stops forwarding from this computer; the tunnel keeps existing and billing.
- `weird tunnels delete` deletes it: the hourly billing stops and the record written in your zone is removed.
Listing and showing tunnels is a small charge per successful request.
```cost
price: tunnel.reads per_request
show: as-is
note: Each successful read of your tunnels.
```
## The page shown while you are offline
When your computer is off, visitors see a standard page. Show your own instead:
```terminal
$ weird tunnels update demo.example.ro --offline-url https://example.ro/away
$ weird tunnels update demo.example.ro --offline-folder ./away
$ weird tunnels update demo.example.ro --clear-offline
```
`--offline-folder` uploads a folder (with an `index.html`) to [storage](/guides/storage/) and serves it from its gateway address; it is stored and billed like any upload, and storage must be switched on first.
## Reference
- Commands: [weird tunnel](/cli/tunnel/), [weird tunnels](/cli/tunnels/), [weird agent](/cli/agent/)
- API: [tunnel operations](/api/tunnels/)
- MCP tools: [tunnels toolset](/mcp/tunnels/)
---
# P2P apps
URL: https://docs.weird.ro/guides/p2p-apps/
A P2P app (a "room" on the main site) gives an app whose users talk to each other directly — a chat, a shared whiteboard, a game — the services it needs to find each other and connect: signaling, a relay, TURN for when a direct connection is impossible, and an optional offline mailbox for peers who are not online.
## Create an app
```terminal
$ weird p2p create chat --origin https://chat.example.ro
```
The name is a DNS label (a-z, 0-9 and inner hyphens); the app answers at once on `.`. Its addresses (signaling, TURN, relay, mailbox) are in `weird p2p get chat`.
- `--origin` lists the web origins allowed to connect (repeat it; `*.example.ro` wildcards work; at most 20). Without any, every origin may connect.
- `--mailbox` turns the offline mailbox on.
- `--setting key=number` sets one of the app's limits; values above a limit's ceiling are held at the ceiling.
An app bills by the hour while it exists, plus the traffic it relays and the mailbox it keeps:
```cost
price: recurring.p2p-app-hourly per_hour
show: year
note: One app kept for a full year.
```
```cost
price: p2p.relay-traffic per_mb_relayed
show: as-is
note: Per MB passed through the relay.
```
## Change it
```terminal
$ weird p2p update chat --add-origin https://beta.example.ro
$ weird p2p update chat --origin https://chat.example.ro
$ weird p2p update chat --clear-origins
$ weird p2p update chat --relay off --mailbox on
```
`--add-origin`, `--remove-origin`, `--setting` and `--unset` change only what they name. `weird p2p delete chat` deletes the app and stops its billing; its name is free again once it is torn down.
## Your own hostnames
```terminal
$ weird p2p domains attach chat rtc.example.ro
$ weird p2p domains verify chat rtc.example.ro
```
Point the name at the app as you are told (a CNAME, or an A record at a zone's apex); it is set up once the record has resolved for two minutes. An app has at most 5 hostnames, and a hostname belongs to one app. A wildcard hostname (`--wildcard`) needs its zone hosted with weird.
## Credentials for your app's clients
```terminal
$ weird p2p turn chat
$ weird p2p mailbox token chat --room room-1
```
TURN credentials and mailbox tokens are short-lived and printed once; give them to the client. They cannot be withdrawn: they expire, so keep their lifetime short (`--ttl`, in seconds; a mailbox token lasts at most 24 hours).
## The offline mailbox
The mailbox keeps payloads per room for peers that come online later:
```terminal
$ weird p2p mailbox send chat room-1 note.bin
$ weird p2p mailbox receive chat room-1
```
Messages are kept for 24 hours by default; each app sets its own period with its `mailbox_ttl_hours` setting, up to the ceiling the platform sets:
```terminal
$ weird p2p update chat --setting mailbox_ttl_hours=72
```
The node stores exactly the bytes sent: encrypt payloads in your app before depositing them. What the mailbox keeps is billed per MB and hour, and what it serves per MB.
```cost
price: recurring.p2p-app-hourly per_mb_hour_cached
show: year
note: Per MB kept in the mailbox, for a full year.
```
```cost
price: p2p.mailbox-traffic per_mb_served_mailbox
show: as-is
note: Per MB served from the mailbox.
```
## Build against the protocol
```terminal
$ weird p2p protocol
```
prints the signaling, relay, TURN and mailbox protocol your app is written against.
## Reference
- Commands: [weird p2p](/cli/p2p/)
- API: [p2p operations](/api/p2p/)
- MCP tools: [p2p toolset](/mcp/p2p/)
---
# Servers
URL: https://docs.weird.ro/guides/servers/
A server is a virtual machine of yours, billed by the hour while it exists. You log in with your own SSH key; weird sends no root password for a server you create.
## Sizes, places and images
```terminal
$ weird servers tiers
$ weird servers availability
$ weird servers images
$ weird servers limits
```
`weird servers tiers` lists the sizes on offer with their credit charge per hour, the locations each can be placed in, and the system images it can start from. `weird servers availability` says where a new server can be placed right now; `weird servers limits` how many servers your account may have.
## Your SSH key
```terminal
$ weird servers ssh-keys add laptop ~/.ssh/id_ed25519.pub
$ weird servers ssh-keys list
```
`weird servers ssh-keys generate ` has weird make a key pair instead; its private key is shown once (or written to a file with `-o`).
## Create a server
```terminal
$ weird servers create web --tier small --ssh-key laptop
$ weird servers create db --tier small --ssh-key laptop --zone example.ro --subdomain db
```
The tier names come from `weird servers tiers` (`small` is an example). The hourly credit charge is shown first and you confirm; the first hour is charged when the server is created, then every hour while it exists — also while it is powered off. The command waits until the server runs (`--no-wait` returns at once).
- `--location` and `--image` choose where and from what (default: the tier's first of each).
- `--zone` and `--subdomain` give the server a hostname in one of your [DNS zones](/guides/dns/) from the start.
- `--queue` waits for capacity if there is none now (nothing is charged until it is created); `--notify` emails you the outcome.
With a signed-in session, creating, resizing, rebuilding and deleting need a recent proof of your authenticator (see [Account and security](/guides/account-security/)).
## Run it
```terminal
$ weird servers list
$ weird servers get web
$ weird servers power web reboot
$ weird servers metrics web
```
`weird servers power on|off|reboot|shutdown|reset` switches it. `weird servers hostnames connect web example.ro www` points another name at it. `weird servers rdns ` sets the reverse DNS of an address. `weird servers console web` opens a console session (its address and one-time password are shown once).
`weird servers resize web --tier ` moves a powered-off server to another size; its disk grows for good. `weird servers rebuild web --image ` reinstalls it: everything on its disk is lost.
## Delete it
```terminal
$ weird servers delete web
```
The server and its disk are destroyed and nothing can be recovered; the hourly billing stops. Hours already charged are not refunded. The records of hostnames pointing at it are removed from your zones where unchanged.
## Volumes: extra disks
```terminal
$ weird servers volumes create data --size 20 --server web
$ weird servers volumes list
$ weird servers volumes resize 40
$ weird servers volumes delete
```
A volume is billed per GB and hour while it exists. It can grow, never shrink; detach it from its server (unmount it first) with `weird servers volumes detach`.
```cost
price: recurring.vps-hourly volume_gb_hour
show: year
note: One GB of volume kept for a full year.
```
## Snapshots
```terminal
$ weird servers snapshots create web before-upgrade
$ weird servers snapshots list
$ weird servers rebuild web --image snapshot:
```
A snapshot is a copy of a server's disk, billed per GB and hour while it is kept. Rebuild a server from it with `--image snapshot:`.
```cost
price: recurring.vps-hourly snapshot_gb_hour
show: year
note: One GB of snapshot kept for a full year.
```
## One-command apps
```terminal
$ weird servers apps catalog
$ weird servers apps deploy wordpress --zone example.ro --subdomain blog --tier small --ssh-key laptop
$ weird servers apps deployments
```
An app is deployed on a new server, billed by the hour like any other, at `.` in one of your zones; the record is written once the server runs. The deployment's password is shown once and never stored; `weird servers apps password ` can reveal it one more time, after which only changing it inside the server helps. The apps on offer are the ones `weird servers apps catalog` lists; you run and update them yourself.
## Handing a server to someone else
`weird servers transfers offer server web ` offers a server (with its volumes), a volume or a snapshot to another weird account; offering and accepting ask for an authenticator code. The other account pays from the next hour after accepting.
## When credits run out
Unpaid hours lead to a grace period, then the server is powered off, then deleted. Keep an eye on the low-balance warning: see [How billing works](/guides/billing/).
## Reference
- Commands: [weird servers](/cli/servers/)
- API: [VPS operations](/api/vps/)
- MCP tools: [servers](/mcp/servers/), [server-volumes](/mcp/server-volumes/), [server-snapshots](/mcp/server-snapshots/), [apps](/mcp/apps/)
---
# Using weird with an AI assistant
URL: https://docs.weird.ro/guides/ai-assistants/
The `weird` command line includes an MCP server (Model Context Protocol) that runs on your own computer, so an AI assistant such as Claude Code, Cursor or VS Code can work with your domains, DNS, storage, tunnels, P2P apps and servers. The server talks to the assistant over standard input and output; it never uses your own sign-in, only a key made for the agent.
## Set it up
You need to be signed in (`weird login`) with an authenticator set up.
```terminal
$ weird mcp setup
```
This creates an API key just for the agent, limited to the permissions the chosen toolsets need, stores it in your weird configuration, and prints how to add the server to Claude Code, Cursor and VS Code. For Claude Code it prints:
```sh
claude mcp add --scope user weird -- weird mcp
```
For Cursor (`~/.cursor/mcp.json`):
```json
{
"mcpServers": {
"weird": {
"command": "weird",
"args": ["mcp"]
}
}
}
```
For VS Code (`.vscode/mcp.json`):
```json
{
"servers": {
"weird": {
"type": "stdio",
"command": "weird",
"args": ["mcp"]
}
}
}
```
## Choose what the agent may do
Tools come in toolsets. By default the agent gets the product areas: credits, domains, dns, storage, locked, tunnels, p2p and servers, plus the guide that is always there.
```terminal
$ weird mcp setup --toolsets dns,storage
$ weird mcp setup --read-only
$ weird mcp setup --add server-volumes
```
- `--toolsets` chooses exactly which.
- `--read-only` makes a key that can change nothing.
- `--add ` widens the existing agent key: keys cannot be edited, so a new key is created and the old one revoked.
- **Opt-in toolsets** (server volumes, snapshots and keys, apps, support, notifications, legal, oauth, referrals, grants) are added by name.
- **Sensitive toolsets** (account, security, billing, withdrawals, data-export, keys, transfers) — and referrals or grants with write access — are never included unless you name them. You are shown what the agent could then do, and you confirm with a fresh code from your authenticator.
`weird mcp --read-only` or `weird mcp --tools dns,storage` narrows what one run of the server exposes, without changing the key. The full list is in [the MCP reference](/mcp/).
## Confirmations
Every tool description says what it costs: free, a small credit charge per successful request, "COSTS CREDITS" with its contract, or "BILLS HOURLY".
- Tools that spend credits up front or bill by the hour, and tools that cannot be undone, require `confirmed: true`. Called without it they do nothing and answer the current credit charge, so the agent can tell you and ask first.
- Reading your products is a small credit charge per successful request and needs no confirmation; a failed call is free.
- Charged creates take an optional `idempotency_key` and answer the one used, so a retry of the same create is never made or billed twice.
## Acknowledgements
Orders that start at once — a top-up, registering, renewing or transferring a domain — need your own acknowledgement of a text about your right of withdrawal. Called without it, the tool orders nothing and answers the text and its version. The agent must show you the text word for word and pass the acknowledgement only if you accept it. A confirmation alone never stands for it.
## What an agent can never do
These steps stay yours, in a terminal or the application:
- adding credits: paying a checkout (a top-up tool only answers the checkout address for you);
- accepting the terms;
- setting up your authenticator, or proving it — when the API needs a code, the agent must ask you for it;
- creating API keys and widening its own permissions (it asks you to run `weird mcp setup --add `);
- generating an SSH key pair, opening a server console, revealing an app's password, minting TURN or mailbox credentials for a P2P app;
- seeing a password, a share link's secret or a private key of [locked content](/guides/locked-content/): password steps answer the terminal command for you to run, and a share link goes to a private file whose path alone is answered;
- turning the newsletter or marketing on.
No tool result ever contains a secret (a token, a password, a private key). Uploads and downloads run inside the `weird mcp` process from and to local paths, so file contents never pass through the conversation.
A restriction after a review (an account suspended, content or a hostname blocked) is a decision, not an obstacle: the agent is told never to work around it with another hostname, content, account or key, and to give you the contact. See [Abuse reports and restrictions](/guides/abuse-restrictions/).
## Guides for the agent
The server sends the agent short instructions when it connects, and `weird_guide` explains each area in more depth; `weird_status` shows what the connection can do right now. The same texts are in [the MCP guides](/mcp/guides/), and `weird help ` prints them in a terminal.
```terminal
$ weird help storage
```
## Reference
- Commands: [weird mcp](/cli/mcp/)
- MCP: [toolsets and tools](/mcp/)
- API keys and permissions: [the permissions table](/api/keys-and-permissions/)
---
# Account and security
URL: https://docs.weird.ro/guides/account-security/
## Signing in without a password
weird has no passwords. To sign in you get a code by email: eight letters and digits, like `K7MP-2XQ9` (type it in any case, with or without the dash); once your account has an authenticator you also type a code from it (or one of your backup codes).
When someone keeps typing wrong codes for your account, we email you about it, at most once a day. There is nothing to do if it was you; if it was not, your account is still safe, because codes go only to your email. Never give anyone those codes, and add an authenticator if you have not yet. Too many wrong codes from one network in an hour pause sign-ins from that network only; try again later.
```terminal
$ weird login
$ weird whoami
$ weird logout
```
A terminal's sign-in lasts 30 days of inactivity and renews itself while used; it is stored in a file only you can read.
**Signing in from another device.** `weird login --device` needs no email on that machine: it shows a short code, you approve it on a device where you are already signed in, and type back the confirmation code shown there.
```terminal
$ weird device approve
$ weird device deny
```
> [!WARNING]
> weird never asks you by email for your sign-in code, your authenticator code or card details. A message that does is not from us: forward it to abuse@weird.ro.
## The authenticator and backup codes
```terminal
$ weird security enroll
$ weird security status
```
`enroll` shows a QR code for your authenticator app (and the secret to type in by hand), asks for the first code, and prints eight **backup codes** once. Store them somewhere safe: each works once instead of an authenticator code. Enrolling again replaces the authenticator and the backup codes; the old one keeps working until the new one is confirmed. Your **first** authenticator also needs a six-digit code we email to your account's address, so that whoever holds only a signed-in session cannot put their own authenticator on your account; it is set up from a signed-in terminal or the application, never with an API key.
Removing the authenticator (`weird security disable`) needs a current code in that request, and is refused while something rests on it: protected domains, or access you gave others on your domains.
## Step-up: proving it is you
From a signed-in terminal or the application, anything that spends credits, cannot be undone or changes who controls the account needs a **recent proof of your authenticator**: a code within the last 15 minutes. Commands ask by themselves when needed; `weird step-up` does it up front, for example before a script.
```terminal
$ weird step-up
```
A few actions need the code in the request itself, even right after a step-up and even with an API key: changing your login address, closing the account, removing the authenticator, withdrawing from a top-up, lifting a domain's protection and inviting another account to a domain. The CLI also sends a fresh code when it creates an API key with a sensitive permission. An API key is never asked for a second factor; that is why its permissions matter.
In the API, an operation's `x-weird-strong-auth` says which applies (`none`, `recent-step-up` or `code-in-request`); see [Authentication](/api/authentication/).
## Sessions
```terminal
$ weird sessions
$ weird sessions revoke --others
$ weird sessions revoke --all
```
`sessions` lists where your account is signed in (and recently ended sessions). Revoke one, every other one, or every one. Changing your login address (`weird emails primary`) also signs out every session.
## API keys
An API key lets a script or an agent act on your account within the **permissions (scopes)** you give it, without your sign-in.
```terminal
$ weird keys create --name deploy --scope dns:write --scope ipfs:write
$ weird keys list
$ weird keys revoke
```
- The key is shown **once**: copy it then. A key cannot be changed; revoke it and create another.
- Product scopes (`dns:read`, `vps:write`…) can be given with wildcards (`*`, `*:read`, `vps:*`). Scopes over the account, money and access are never covered by a wildcard and must be named, and so is `stats:write` (switching [detailed statistics](/guides/traffic-statistics/#switching-on-and-off) on spends credits every hour and makes you the controller of your visitors' data): `*`, `*:write` and `stats:*` do not include it.
- **Sensitive** scopes can change who controls the account, spend or move its money or resources, or read secrets; `weird keys create` asks for a fresh authenticator code for a key with one.
- At most 20 active keys per account.
The full list is in [API keys and permissions](/api/keys-and-permissions/). For an AI agent, `weird mcp setup` creates a key limited to the toolsets you choose ([AI assistants](/guides/ai-assistants/)).
## Email addresses and your profile
```terminal
$ weird emails
$ weird emails add you@example.com
$ weird profile
$ weird profile set
$ weird profile phone start
```
Your login address is where codes go. Other addresses you prove are yours can be put on a domain's holder contact. Your profile holds your details as a domain holder; it is needed before you can add credits or register a domain. The CNP is always asked hidden and never printed.
## A copy of your data
```terminal
$ weird account export request
$ weird account export status
$ weird account export download
```
You can ask for one JSON document with everything kept about your account: the account and its addresses, profile (the CNP only as whether one is held), billing profiles, sessions, API keys (never the keys themselves), accepted terms, notifications, support conversations, payments and invoices, the credit statement, domains, your free names, an inventory of every resource, and any restriction decided on the account. It is usually ready within minutes and kept for a day; one copy a day. Downloading needs your authenticator and writes a file only you can read.
## Withdrawals and refunds
Within 14 days of paying you may withdraw from a top-up: its unused credit is refunded to the payment it was made with. See [How billing works](/guides/billing/#withdrawing).
## Closing the account {#closing}
```terminal
$ weird account close
$ weird account close status
$ weird account close cancel
```
Closing is refused while the account still holds something that costs, earns or owes: registered domains (transfer them out or let them lapse), registrations or transfers under way, unfinished payments, gifts not yet claimed, a negative balance, or a review in progress. Each is listed with what to do.
Otherwise nothing happens for **14 days**: you are emailed and can cancel until then. After that, everything the account holds (servers, tunnels, apps, stored content, DNS zones, support tickets) is deleted, its [free addresses](/guides/free-address/) are released, access given to or by it ends, and the account with its sessions, keys, profile and authenticator is closed. Invoices and the records the law requires are kept. It cannot be undone once the 14 days are over.
Unused **purchased** credit is refunded at the end of the 14 days, with nothing deducted, to the payments of your recent top-ups (or by bank transfer, asked for in a support ticket). Every refund is reviewed by our team first: while it is, closing shows `refunds-awaiting-approval` with the day it is paid by (`pay_by`) at the latest, and the account closes once it is paid. Credit that is not refundable (promotional, carried over, received as a gift) ends with the account: pass `--forfeit-credits` to accept that. What would be refunded and forfeited is shown before you confirm; closing needs a current authenticator code in the request itself and your login address typed to confirm.
## Reference
- CLI: [login](/cli/login/), [security](/cli/security/), [sessions](/cli/sessions/), [keys](/cli/keys/), [account](/cli/account/)
- API: [authentication](/api/authentication/), [auth operations](/api/auth/)
- MCP: [account](/mcp/account/), [security](/mcp/security/), [keys](/mcp/keys/), [data-export](/mcp/data-export/)
---
# Abuse reports and restrictions
URL: https://docs.weird.ro/guides/abuse-restrictions/
## Reporting abuse
Anyone can report illegal content or abuse hosted or sent through weird, **without an account**: from the terminal, through the API, or by writing to abuse@weird.ro.
```terminal
$ weird abuse report --url https://example.ro/page --category malware-or-phishing --explanation "What it is and where exactly it is" --good-faith
$ weird abuse report --cid --category intellectual-property --file why.txt --name "Your Name" --email you@example.com --good-faith
```
A report names:
- **what** you report, 1 to 20 items: addresses (`--url`: http(s), `ipfs://` or `ipns://`), content ids (`--cid`) or hostnames (`--hostname`);
- its **category**: `illegal-content`, `intellectual-property`, `child-safety`, `malware-or-phishing`, `fraud-or-scam`, `spam`, `privacy`, `hate-or-violence`, `terms-violation` or `other`;
- an **explanation** of why it is illegal or against the terms and where exactly it is (20 to 5000 characters), or `--file` to read it from a file;
- your statement that the report is made in **good faith** and is accurate to the best of your knowledge (`--good-faith`; `--yes` does not give it).
Your name and email are optional. Give an address to be told the report arrived and, once decided, the outcome in general terms and how to contest it. A report about a protected work or a right of your own needs both. **The account reported never learns who reported it.** The answer gives the report's reference: quote it when you write to the abuse contact. A few reports an hour are accepted per client. One reporter address is sent only a few acknowledgements an hour; a report past that is still received, just without an acknowledgement email.
Through the API: `POST /abuse/reports` ([reference](/api/abuse/#submitAbuseReport)).
## Restrictions after a review
While a report about an account is reviewed, or after a decision, weird may:
- **suspend the account**: it can still be signed in to and read, open and answer support tickets, ask for a copy of its data and read the legal documents, but nothing can be created, changed or removed. Every such call is refused `403 account-suspended`.
- **block content**: a blocked content id is refused on every new use and no longer served (`451 content-blocked`).
- **block a hostname**: the hostname is refused for a new domain or served name, and existing ones under it stop being served (`451 hostname-blocked`).
A suspension after a review is not lifted by adding credits.
**Held resources say so themselves.** A zone, stored content, a hostname, a path map, a tunnel, a p2p app or a server held after a review carries `restriction` in its API answer: whether it is `suspended` with its account or `blocked` from being served, the decision's id (`decision_id`) when there is one, and the address to write to (`contact`). The application shows it on the resource, with a link to contest the decision.
**Free addresses.** A hostname block over one of your [free names](/guides/free-address/) holds it (`suspended`: it cannot be released or changed meanwhile); lifting the block gives it back, and a decision that stands releases it, the block staying as its quarantine. The platform also reads the first page of each newly served free name and opens a report for a person to review when it finds a password field, a card number field, a form sending elsewhere or a reserved brand in the title; nothing is blocked without that review.
```terminal
$ weird account restrictions
```
shows whether the account is restricted, and every decision taken on it or on content or a hostname it held: the action, the ground, the facts you were told, the reference to quote, and when it was contested. The CLI exits with code 4 on a restriction and prints the neutral reason and the contact.
## Contesting a decision
Open a support ticket naming the decision:
```terminal
$ weird support open --title "Contesting a decision" --abuse-decision
```
or write to the contact shown with the decision. Through the API, `POST /support/tickets` with `abuse_decision_id`.
> [!NOTE]
> A restriction is a decision, not an obstacle. Do not work around it with another hostname, content, account or key; AI agents acting through weird are told the same. Contest it instead.
## Reference
- CLI: [weird abuse](/cli/abuse/), [weird account](/cli/account/#weird-account-restrictions), [weird support](/cli/support/)
- API: [abuse](/api/abuse/), [restrictions](/api/auth/#getAccountRestrictions)
---
# The status page
URL: https://docs.weird.ro/guides/status-page/
weird's public status page is at **weirdstatus.ro**, a separate domain from weird.ro. Its DNS is served apart from the platform's own nameservers, so that the page stays reachable when the platform itself is the thing that is down.
## Checking the API yourself
The API answers a public liveness check that needs no account and is not charged:
```sh
curl https://api.weird.ro/health
```
It answers `{"ok": true}` while the API is serving ([`GET /health`](/api/health/#health)). A refusal from the API is not an outage: every refusal says what happened and the next step ([errors](/api/errors/)). The CLI exits with code 9 when the service or the network is unavailable, so a script can tell the two apart ([CLI exit codes](/cli/)).
---
# Glossary
URL: https://docs.weird.ro/guides/glossary/
| Term | Meaning |
|---|---|
| **Acknowledgement** | A text you confirm yourself before an order that starts at once, within the 14-day withdrawal period: a top-up, or registering, renewing or transferring a domain. It has a version, recorded with the order. See [domains](/guides/domains/#acknowledgement). |
| **API key** | A token (`weird_…`) that lets a script or an agent act on your account within the scopes it was given, without your sign-in. Shown once. See [API keys and permissions](/api/keys-and-permissions/). |
| **Authenticator** | The app on your phone that shows a new six-digit code every few seconds: your second factor. |
| **Backup code** | One of eight single-use codes printed when you set up the authenticator, to use instead of an authenticator code. |
| **CID** | Content identifier: the address of stored content, computed from the content itself, so the same bytes always have the same CID and changed bytes a new one. |
| **Copies** | Stored content is kept as at least two copies at independent storage providers; storage is billed per MB and copy. |
| **Credits** | The prepaid balance everything on weird is paid from, and the only thing you buy (VAT is added when you buy them). Every credit charge is stated in credits. See [billing](/guides/billing/). |
| **Detailed statistics** | Optional, per site, charged by the hour while on: visitors and visits per day, referring sites, countries, browser, system and device families, bots, entry pages, counted without keeping anything that identifies a visitor; you are the controller of your visitors' data. See [traffic statistics](/guides/traffic-statistics/#detailed-statistics). |
| **DNSSEC** | Signatures on DNS answers that let resolvers check they are genuine. Every live zone on weird is signed. |
| **DS record** | The record the registry publishes for a domain to connect it to its signed zone; it must match the zone's key. |
| **Free address** | A name under one of weird's own domains (a free-name base, such as `e-weird.ro`), lent to an account for a site from its storage; see [A free address](/guides/free-address/). |
| **Gateway** | The web server that serves stored content over HTTPS, at a gateway address and at your own hostnames. |
| **Gateway domain** | A hostname of yours that serves stored content. |
| **Grant** | Access you give another weird account on parts of one of your domains (its DNS, tunnels, storage domains or servers under it), with who pays for what they do. |
| **Hourly billing** | Charging every hour while something exists (a server, a tunnel, stored content, the records of a live zone); deleting it stops the charge. |
| **Idempotency key** | A value sent with a charged request (the `Idempotency-Key` header, or a body field) so that a retry after a lost answer is never performed or charged twice. See [idempotency](/api/idempotency/). |
| **Mailbox** | The offline mailbox of a p2p app: messages kept for a peer that is not connected, for a limited time. |
| **MCP** | Model Context Protocol: how an AI assistant uses tools. `weird mcp` is a local MCP server, run by the CLI on your computer. See [AI assistants](/guides/ai-assistants/). |
| **Nameservers** | The servers that answer for a domain's DNS. Each weird zone has its own pair; the domain must point at them at its registry. |
| **P2P app** | What a browser or device app needs to connect its users directly: signalling, a relay, TURN and an optional offline mailbox, under a hostname. See [p2p apps](/guides/p2p-apps/). |
| **Path map** | Serving one of your pins under a path of one of your gateway domains (`https:////`). |
| **Per-request credit charge** | A small credit charge taken after each successful read of your products; refused or failed requests are free. |
| **Pin** | Content kept stored and served by your account. Removing the pin stops it being kept for you. |
| **Traffic summary** | What every site served from storage gets, included: requests, data, pages, errors and the cache's share per day, made from the gateway's log with nothing about visitors. See [traffic statistics](/guides/traffic-statistics/). |
| **List of credit charges** | The platform's list of credit charges in force: contract → rate → credits. Read it with `weird credits charges`. |
| **Contract** | The name of a credit charge in the list of credit charges, such as `domains.register`; with a **rate** such as `per_year`, `per_hour` or `per_request`. |
| **Protected domain** | A domain marked sensitive: changed only from your signed-in terminal with a fresh authenticator code, never by an API key or an agent. |
| **Registrant** | The holder of a domain, as recorded at the registry. |
| **Restriction** | A suspension of an account, or a block of content or a hostname, decided after a review. See [restrictions](/guides/abuse-restrictions/). |
| **RRset** | All the DNS records of one name and type. On weird you set and replace records an RRset at a time. |
| **Runway** | How long your credits last at the current pace of spending. |
| **Scope** | A permission of an API key, such as `dns:write`. Sensitive scopes act on the account, its money or access. |
| **Session** | A signed-in terminal or browser. Listed and ended with `weird sessions`. |
| **Snapshot** | A saved copy of a server's disk, billed per GB and hour while it is kept. |
| **Step-up** | Proving your authenticator, which lets a signed-in session spend credits or delete things for the next 15 minutes. |
| **Tier** | A server size, charged per hour. |
| **Top-up** | Buying credits: an order paid on the payment page, with its invoice. |
| **TURN** | A relay that carries a call or connection between two peers that cannot reach each other directly. |
| **Tunnel** | A way to put an app running on your own computer on the internet under one of your hostnames, with HTTPS. See [tunnels](/guides/tunnels/). |
| **Volume** | An extra disk for a server, billed per GB and hour while it exists. |
| **Withdrawal** | Taking back a top-up within 14 days of paying: its unused credit is refunded. |
| **Zone** | A domain's DNS records hosted on weird, with its own nameservers. See [DNS](/guides/dns/). |
---
# Recipes
URL: https://docs.weird.ro/recipes/
Each recipe does one thing from start to end, with the commands to use. The [guides](/guides/) explain each product in full.
---
# Publishing a single-page app
URL: https://docs.weird.ro/recipes/single-page-app/
A single-page app is one `index.html` and its scripts: the app draws each page in the browser and changes the address itself (`/settings`, `/photos/42`). Opened directly, or reloaded, such an address names no file in the folder, so it needs one rule that serves `index.html` in its place. This recipe puts such an app online at your own hostname or a [free address](/guides/free-address/).
## 1. Build the app
Build it the way its tools say (`npm run build`, for example). The result is a folder, often `dist/` or `build/`, with `index.html` at its root.
Make sure the app's files are referred to from the root (`/assets/app.js`, not `assets/app.js`): a page such as `/photos/42` loads them from there. Most build tools do this by default (a "base" or "public path" of `/`).
## 2. Add `_redirects`
Put a file named `_redirects` in the built folder, next to `index.html` (most tools copy a `public/` folder into the build as it is: put it there once):
```_redirects
/* /index.html 200
```
Every address that names no file now loads your app, which shows the right page. The app's own files are served as they are: a rule only applies to an address that names nothing ([Existing files win](/guides/site-files/#existing-files-win)).
If your app has a not-found page of its own, it draws it itself: the gateway answers 200 for every address, as single-page apps need.
## 3. Add `_headers` (optional, recommended)
Build tools give the scripts and styles a new name at every build (`app.3f9a1c.js`). Those can be kept by browsers for a year; `index.html` must be checked on every visit, so a new version shows at once:
```_headers
/*
Cache-Control: no-cache
/assets/*
! Cache-Control
Cache-Control: public, max-age=31536000, immutable
```
Use the folder your tool puts those files in (`/assets/`, `/static/`, `/_app/`). The [guide](/guides/site-files/#caching) explains the `! Cache-Control` line.
## 4. Upload and check
```terminal
$ weird storage add ./dist
```
The upload prints the content's own address (`https://.ipfs./`); both files already apply there. Open it, go to a page inside the app and reload it: the app should come back on the same page.
## 5. Put it at your address
```terminal
$ weird storage domains attach app.example.ro
```
Or, on a free address, `weird storage domains attach ana.e-weird.ro `. A new version later is a new upload and a retarget:
```terminal
$ weird storage add ./dist
$ weird storage domains retarget app.example.ro
```
## What it costs
Every address served through the rule is a page sent to a visitor, charged per MB like any other ([What it costs](/guides/site-files/#what-it-costs)). Keeping the app stored is charged by the hour per MB, as for any site ([Storage and sites](/guides/storage/)).
```cost
price: recurring.ipfs-pin-hourly per_mb_served
show: as-is
note: Each MB sent to visitors.
```
---
# Moving from another host
URL: https://docs.weird.ro/recipes/moving-from-another-host/
A static site (a folder of pages, styles, scripts and pictures) moves to weird as it is. If it was built by a tool on the other host, build it on your computer and take the folder the build makes.
## What carries over unchanged
- **The folder itself**, with `index.html` at its root.
- **`_redirects`**: weird reads the same file at the root of the site. Moved pages (`301`, `302`), placeholders (`:name`), the trailing `*` with `:splat`, rewrites (`200`) and your own error pages (`404`) work the same ([the format](/guides/site-files/#redirects)).
- **`_headers`**: the same format (a path pattern, then indented `Name: value` lines), for the headers in [the table](/guides/site-files/#the-headers-you-may-set).
## What differs
Read your two files once against this list; the gateway refuses a file it cannot apply whole, so a difference shows as an error, never as a rule quietly ignored ([When a file is wrong](/guides/site-files/#when-a-file-is-wrong)).
- **Forced rules** (`200!`, `301!`), which apply over an existing file, are not accepted: a rule applies only where no file exists. Delete the file instead.
- **A rewrite to another site** (`/api/* https://api.example.com/:splat 200`), a proxy, is not accepted: a `200` rule names a page of your own site. Call the other site from the browser, with CORS on its side.
- **Conditions** on query parameters, countries, languages, roles or cookies (extra fields after the status) are not accepted: one line is `from to [status]`.
- **A `*` in the middle of `from`** (`/docs/*/old`) is not accepted: a `*` only as the whole last segment (`/docs/*`).
- **Redirects in a configuration file** (`netlify.toml`, `wrangler.toml`) are not read: move those rules into `_redirects`.
- **Headers outside the allow-list** (`Set-Cookie`, `Vary`, `Location`) are dropped; the rest of the file applies.
- **Several `*` in a `_headers` pattern** are not accepted: one `*` a pattern.
- **Form handling, serverless or edge functions and password protection** are not offered for a stored site. A [server](/guides/servers/) runs your own code; [locked content](/guides/locked-content/) keeps files behind a password.
- **The host's analytics** have their counterpart without a script: every site gets a traffic summary, and detailed statistics can be switched on per site ([Traffic statistics](/guides/traffic-statistics/)).
- **A site address on the host's domain** becomes a [free address](/guides/free-address/) on `e-weird.ro`, or your own domain.
## The order of the move
1. **Upload the folder** with both files and check it at the content's own address the upload prints ([Check before you publish](/guides/site-files/#when-a-file-is-wrong)):
```terminal
$ weird storage add ./site
```
2. **Host the domain's DNS on weird**, if it is not yet: `weird dns create example.ro`, then set the nameservers you are given where the domain is registered ([DNS](/guides/dns/)). Copy over any other records the domain needs first (mail, verification records), so nothing stops working when the nameservers change.
3. **Attach the hostname** to the content:
```terminal
$ weird storage domains attach www.example.ro
```
An attach never overwrites a record: if the zone already has an address record for that name (copied from the old host), delete it first, then attach.
4. **Keep the old site** until the new one answers at your address everywhere; then remove it from the other host.
To move the domain itself to weird later, see [Domains](/guides/domains/).
---
# The API
URL: https://docs.weird.ro/api/
Everything weird does is an operation of its API, at `https://api.weird.ro`. The `weird` command line, its MCP server and your account in the browser all use it; your own software can too. This reference is generated from the API's public OpenAPI document and changes with it.
Every operation states, as facts of the document:
- who may call it (`x-weird-auth`) and the permission an API key needs for it (`x-weird-scope`): see [authentication](/api/authentication/) and [API keys and permissions](/api/keys-and-permissions/);
- every credit charge it incurs (`x-weird-charged`): a contract of the list of credit charges, when it is billed and what multiplies it; each page fills in the credit charge in force, in credits;
- how a retry is made safe (`x-weird-idempotency`): see [idempotency](/api/idempotency/);
- whether it needs a recent proof of the authenticator (`x-weird-strong-auth`);
- for an order, the acknowledgement the person gives with it (`x-weird-acknowledgement`);
- its refusals, each with its codes: see [errors](/api/errors/).
Bodies are JSON with snake_case keys, or EDN: see [conventions](/api/conventions/). What the document says of limits is on [rate limits](/api/rate-limits/).
## Areas
| Area | Operations | What |
|---|---|---|
| [Accounts, sign-in and keys](/api/auth/) | 51 | Signing up and in without a password, the authenticator and step-up, sessions and devices, API keys, the personal and billing profiles, the copy of your data and closing the account. |
| [Credits and credit charges](/api/credits/) | 13 | The balance, buying credits, the credit history and statement, the credit charges, the low-balance warning, withdrawals and refunds. |
| [Invoices](/api/invoices/) | 3 | The invoices issued when credits are bought. |
| [Domains](/api/domains/) | 20 | Availability, registering, renewing and transferring .ro domains, nameservers, registrant details, change of holder. |
| [DNS](/api/dns/) | 20 | Zones, records, copying a domain's live DNS, DNSSEC, moving a domain. |
| [Storage](/api/ipfs/) | 46 | Uploads, stored content and its copies, pins, gateway domains, path maps, names. |
| [Tunnels](/api/tunnels/) | 6 | HTTPS tunnels to an app on your own computer, at your own hostname. |
| [P2P apps](/api/p2p/) | 11 | Signalling, relay, TURN and an offline mailbox for browser and device apps. |
| [Servers](/api/vps/) | 55 | Tiers, servers billed by the hour, volumes, snapshots, one-command apps, SSH keys. |
| [Shared access](/api/grants/) | 4 | Sharing a domain or a part of it with another account, which spends its own credits. |
| [Support](/api/support/) | 4 | Tickets and replies, and contesting a decision. |
| [Notifications](/api/notifications/) | 4 | Notices of the account and the settings of the emails it gets. |
| [Terms and acknowledgements](/api/legal/) | 3 | The terms in force, accepting them, and the texts an order is acknowledged with. |
| [Abuse reports](/api/abuse/) | 1 | Reporting illegal content or abuse, with or without an account. |
| [Referrals](/api/referrals/) | 6 | Invitations and what they give. |
| [Promotions](/api/promotions/) | 1 | Promotional codes. |
| [OAuth provider](/api/oauth/) | 6 | Letting another application act for an account: authorization code with PKCE. |
| [Contact](/api/contact/) | 3 | The contact form. |
| [Unsubscribing](/api/unsubscribe/) | 2 | Leaving an email list from its link. |
| [Webhooks](/api/webhooks/) | 2 | Notifications the platform receives from the payment processor. |
| [Health](/api/health/) | 1 | Whether the API answers. |
| [names](/api/names/) | 6 | |
| [public](/api/public/) | 4 | |
---
# Authentication and sessions
URL: https://docs.weird.ro/api/authentication/
Each operation says who may call it, in `x-weird-auth`:
- `public`: anyone, with no credential (signing in, the device login's first steps, the health check);
- `session`: a person signed in, with a session access token;
- `key`: an API key holding the permission the operation names in `x-weird-scope`, or a session;
- `oauth`: an access token an OAuth client obtained.
Every credential is sent the same way: `Authorization: Bearer `.
| Scheme | How it is sent | What it is |
|---|---|---|
| `apiKey` | `Authorization: Bearer …` | an API key token (`weird_...`), authenticating as its account within its granted scopes |
| `oauthAccessToken` | `Authorization: Bearer …` (JWT) | an OAuth access token obtained from /oauth/token by a registered client |
| `refreshCookie` | `Authorization: undefined …` | a page's refresh cookie (HttpOnly, Secure, SameSite=Strict, Path=/auth, 30 days), set by a sign-in made with `X-Weird-Session: cookie`, read by `POST /auth/refresh` alone (with that header, from the application's own origin), rotated at each refresh and cleared by a sign-out |
| `sessionToken` | `Authorization: Bearer …` (JWT) | a session access token (the auth pair's `access_token`) |
| `x-weird-auth` | Operations |
|---|---|
| `public` — none: anyone may call it | 25 |
| `session` — a session access token (a signed-in person, not an API key) | 9 |
| `key` — an API key holding the permission below, or a session | 237 |
| `oauth` — an OAuth access token | 1 |
## Sessions
There are no passwords. A person signs in with a code emailed to them:
1. [`POST /auth/login/start`](/api/auth/#loginStart) with the email address emails a sign-in code of eight letters and digits, shown `XXXX-XXXX`, and answers a flow `token` (the answer is the same whether or not the address has an account);
2. [`POST /auth/login/verify`](/api/auth/#loginVerify) with that `token`, the emailed `code` (in any case, the dash optional) and, for an account with an authenticator, its current code (`totp_code`) or an unused backup code, answers the auth pair: `access_token`, `refresh_token` and the `user`. Too many wrong codes from one network in an hour answer 429 `rate-limited` for that network only: try again later or from another network.
The access token is valid for 7 days. The refresh token is valid for 30 days and can be used only once: [`POST /auth/refresh`](/api/auth/#refresh) answers a new pair for the same session. Sending a refresh token that was already used ends the whole session, and the person must sign in again.
A terminal or another device without a browser signs in with the device login: [`POST /auth/device/start`](/api/auth/#deviceStart) answers a code the person approves while signed in elsewhere (`weird login --device` does this). Sessions are listed and ended with the [session operations](/api/auth/); `weird sessions` and `weird logout` are the CLI's.
## API keys
An API key (`weird_...`) acts as its account within the permissions it was created with. It is made by a signed-in person, shown once, and cannot be changed: see [API keys and permissions](/api/keys-and-permissions/).
## Strong authentication {#strong-authentication}
Some operations need more than a credential (`x-weird-strong-auth`):
- `none`: nothing more;
- `recent-step-up`: a caller signed in with a session needs an authenticator enrolled on the account (403 `enrolment-required` until one is) and a recent proof of it: the session was stepped up in the last 15 minutes ([`POST /auth/step-up`](/api/auth/#stepUp), or a sign-in that carried the second factor), or the request body carries `totp_code` (a current authenticator code) or `backup_code` (an unused backup code). Without either the answer is 403 `step-up-required`: step up, then retry. A wrong or used code is 422 `invalid-totp`, and too many wrong codes are 429 `rate-limited` for a while. An API key is not asked for a second factor;
- `code-in-request`: the code must be in the request body itself, from a session and an API key alike (a recent step-up is not enough). `x-weird-code-in-request-when` names the case when an operation asks for a code only sometimes.
The operations that spend credits or cannot be undone are the ones that need it; each operation's page says which.
---
# API keys and permissions
URL: https://docs.weird.ro/api/keys-and-permissions/
An API key is created by a signed-in person ([`POST /auth/api-keys`](/api/auth/#createApiKey), or `weird keys create`) with a `name` and the list of permissions (`scopes`) it may use. Creating one needs the authenticator (a recent step-up, or a code in the request). The key's `token` is shown once: keep it secret. A key cannot be changed: revoke it and create another. An account has at most 20 active keys.
Each operation names the permission it needs in `x-weird-scope`; a key without it is refused 403 `insufficient-scope`, with the permission that was needed. A session holds every permission.
- A wildcard (`*`, `*:read`, `vps:*`) covers the product permissions only. Every account, money, access, support and secret permission must be named in full.
- A **sensitive** permission can change who controls the account, spend or move its money or resources, or read secrets. Show it as such before a key is created with it.
- A key holding `api-keys:write` may create keys only with permissions it holds itself, named in full, and may revoke only itself and the keys it created.
For an AI agent, `weird mcp setup` makes a key with only the permissions of the toolsets you choose: see [using weird with an AI assistant](/guides/ai-assistants/).
## Every permission
| Permission | Area | Access | Sensitive | Covered by a wildcard | What it allows |
|---|---|---|---|---|---|
| {#account-export} `account:export` | account | export | **yes** | no | ask for and download a copy of all the data kept about the account, personal details included (it produces a copy of the account's data; it changes nothing) |
| {#account-read} `account:read` | account | read | no | no | read the account, its sessions, personal profile, linked email addresses and closing request |
| {#account-write} `account:write` | account | write | **yes** | no | change the personal profile and the email address, link addresses, end sessions and close the account |
| {#api-keys-read} `api-keys:read` | api-keys | read | no | no | list the account's API keys |
| {#api-keys-write} `api-keys:write` | api-keys | write | **yes** | no | create and revoke API keys |
| {#billing-read} `billing:read` | billing | read | no | no | read billing profiles, top-ups and invoices |
| {#billing-write} `billing:write` | billing | write | **yes** | no | change billing profiles and start top-ups (payments) |
| {#credits-read} `credits:read` | credits | read | no | yes | read the credit balance, the credit history, the statement, the credit charges and the promotional credit |
| {#dns-read} `dns:read` | dns | read | no | yes | read DNS zones, their records, events, DNSSEC and exports |
| {#dns-write} `dns:write` | dns | write | no | yes | create, change, import and delete DNS zones and records (charged) |
| {#domains-read} `domains:read` | domains | read | no | yes | read registered domains, their availability and changes of holder |
| {#domains-write} `domains:write` | domains | write | no | yes | register, renew, transfer and change domains: nameservers, registrant details, renewal, hosting (charged) |
| {#grants-read} `grants:read` | grants | read | no | no | read the access the account gave to other accounts on its domains, and the access given to it |
| {#grants-write} `grants:write` | grants | write | **yes** | no | give other accounts access to the account's domains, change or end it, and accept, decline or leave access given to the account |
| {#ipfs-read} `ipfs:read` | ipfs | read | no | yes | read stored content, uploads, pins, gateway domains, path maps, IPNS names and the storage status |
| {#ipfs-write} `ipfs:write` | ipfs | write | no | yes | enable storage, upload, pin and delete content, change its copies, and manage gateway domains, path maps and IPNS names (billed) |
| {#legal-read} `legal:read` | legal | read | no | no | read which terms of service and privacy notice the account accepted |
| {#legal-write} `legal:write` | legal | write | **yes** | no | accept the terms of service and privacy notice for the account |
| {#names-read} `names:read` | names | read | no | yes | read the free names of the account, the bases they are claimed under and whether a name is free |
| {#names-write} `names:write` | names | write | no | yes | claim and release free names (the name is free; the site behind it is billed as storage) |
| {#notifications-read} `notifications:read` | notifications | read | no | no | read the account's notifications and which kinds of email it receives |
| {#notifications-write} `notifications:write` | notifications | write | no | no | mark notifications read and choose which kinds of email the account receives |
| {#oauth-read} `oauth:read` | oauth | read | no | no | list the applications the account authorized |
| {#oauth-write} `oauth:write` | oauth | write | no | no | revoke an application's access |
| {#p2p-read} `p2p:read` | p2p | read | no | yes | read p2p apps and their domains |
| {#p2p-write} `p2p:write` | p2p | write | no | yes | create, change and delete p2p apps and their domains, and mint their credentials (billed) |
| {#profile-read} `profile:read` | profile | read | no | yes | for an OAuth application: who signed in (the account id, email address and name) (OAuth clients only) |
| {#referrals-read} `referrals:read` | referrals | read | no | no | read the referral programme, the gifts sent and received and their rewards |
| {#referrals-write} `referrals:write` | referrals | write | **yes** | no | buy, claim, renew and take back credit gifts |
| {#security-read} `security:read` | security | read | no | no | read whether a second factor is enrolled |
| {#security-write} `security:write` | security | write | **yes** | no | enrol or remove the second factor |
| {#stats-read} `stats:read` | stats | read | no | yes | read the traffic statistics of the account's sites and pins (daily summaries, top pages, errors and, where switched on, detailed statistics), export them and read which sites have detailed statistics on |
| {#stats-write} `stats:write` | stats | write | no | no | switch detailed traffic statistics on or off for the account's sites (billed by the hour while on; switching on makes you the controller of your visitors' data); granted only by naming it: no wildcard covers it |
| {#support-read} `support:read` | support | read | no | no | read the account's support tickets |
| {#support-write} `support:write` | support | write | no | no | open support tickets and reply to them |
| {#tunnels-read} `tunnels:read` | tunnels | read | no | yes | read tunnels |
| {#tunnels-write} `tunnels:write` | tunnels | write | no | yes | create, change and delete tunnels (billed by the hour) |
| {#vps-secrets-read} `vps-secrets:read` | vps-secrets | read | **yes** | no | open server consoles and reveal one-click app passwords |
| {#vps-transfers-read} `vps-transfers:read` | vps-transfers | read | no | no | read the transfers of servers, volumes and snapshots offered to and by the account |
| {#vps-transfers-write} `vps-transfers:write` | vps-transfers | write | **yes** | no | offer, accept, decline and cancel transfers of servers, volumes and snapshots between accounts |
| {#vps-read} `vps:read` | vps | read | no | yes | read servers, volumes, snapshots, one-click apps, SSH keys, availability, limits and activity |
| {#vps-write} `vps:write` | vps | write | no | yes | create, power, resize and delete servers, volumes, snapshots and app deployments, and manage SSH keys (billed by the hour) |
| {#withdrawals-read} `withdrawals:read` | withdrawals | read | no | no | read the top-ups that may still be withdrawn from, what withdrawing would refund, and the account's refunds |
| {#withdrawals-write} `withdrawals:write` | withdrawals | write | **yes** | no | withdraw from a top-up: its unused credit is removed and refunded to the payment it was made with |
Wildcards:
- `*` — every product scope (credits, ipfs, stats, dns, domains, names, vps, tunnels, p2p), read and write, except stats:write, which is granted only by naming it
- `*:*` — the same as `*`
- `*:read` — every product scope's read access
- `*:write` — every product scope's write access, except stats:write
- `:*` — both accesses of one product area, such as `vps:*` (`stats:*` covers stats:read only)
Operations by permission:
- `account:export`: [`requestDataExport`](/api/auth/#requestDataExport), [`getDataExport`](/api/auth/#getDataExport), [`downloadDataExport`](/api/auth/#downloadDataExport)
- `account:read`: [`getAccountClosing`](/api/auth/#getAccountClosing), [`getAccountRestrictions`](/api/auth/#getAccountRestrictions), [`listEmails`](/api/auth/#listEmails), [`me`](/api/auth/#me), [`getProfile`](/api/auth/#getProfile), [`listSessions`](/api/auth/#listSessions)
- `account:write`: [`requestAccountClosing`](/api/auth/#requestAccountClosing), [`cancelAccountClosing`](/api/auth/#cancelAccountClosing), [`startEmailChange`](/api/auth/#startEmailChange), [`verifyEmailChange`](/api/auth/#verifyEmailChange), [`linkEmailStart`](/api/auth/#linkEmailStart), [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`unlinkEmail`](/api/auth/#unlinkEmail), [`setLanguage`](/api/auth/#setLanguage), [`updateProfile`](/api/auth/#updateProfile), [`phoneVerifyCheck`](/api/auth/#phoneVerifyCheck), [`phoneVerifyStart`](/api/auth/#phoneVerifyStart), [`revokeSession`](/api/auth/#revokeSession)
- `api-keys:read`: [`listApiKeys`](/api/auth/#listApiKeys)
- `api-keys:write`: [`createApiKey`](/api/auth/#createApiKey), [`revokeApiKey`](/api/auth/#revokeApiKey)
- `billing:read`: [`listBillingProfiles`](/api/auth/#listBillingProfiles), [`topupConfig`](/api/credits/#topupConfig), [`topupStatus`](/api/credits/#topupStatus), [`listTopups`](/api/credits/#listTopups), [`listInvoices`](/api/invoices/#listInvoices), [`getInvoice`](/api/invoices/#getInvoice), [`getInvoicePdf`](/api/invoices/#getInvoicePdf)
- `billing:write`: [`createBillingProfile`](/api/auth/#createBillingProfile), [`updateBillingProfile`](/api/auth/#updateBillingProfile), [`deleteBillingProfile`](/api/auth/#deleteBillingProfile), [`defaultBillingProfile`](/api/auth/#defaultBillingProfile), [`startTopup`](/api/credits/#startTopup)
- `credits:read`: [`getBalance`](/api/credits/#getBalance), [`getCharges`](/api/credits/#getCharges), [`listLedger`](/api/credits/#listLedger), [`getPromotionalBalance`](/api/credits/#getPromotionalBalance), [`statement`](/api/credits/#statement)
- `dns:read`: [`listDnsEvents`](/api/dns/#listDnsEvents), [`listDnsZones`](/api/dns/#listDnsZones), [`getDnsZone`](/api/dns/#getDnsZone), [`getDnsZoneDnssec`](/api/dns/#getDnsZoneDnssec), [`exportDnsZone`](/api/dns/#exportDnsZone), [`getDnsMigrationAdvice`](/api/dns/#getDnsMigrationAdvice), [`previewDnsResync`](/api/dns/#previewDnsResync), [`previewDnsSeed`](/api/dns/#previewDnsSeed), [`listDnsSnapshots`](/api/dns/#listDnsSnapshots), [`getDnsSnapshot`](/api/dns/#getDnsSnapshot)
- `dns:write`: [`createDnsZone`](/api/dns/#createDnsZone), [`deleteDnsZone`](/api/dns/#deleteDnsZone), [`checkDnsZoneNow`](/api/dns/#checkDnsZoneNow), [`importDnsZone`](/api/dns/#importDnsZone), [`upsertDnsRecords`](/api/dns/#upsertDnsRecords), [`deleteDnsRecord`](/api/dns/#deleteDnsRecord), [`resyncDnsZone`](/api/dns/#resyncDnsZone), [`applyDnsResync`](/api/dns/#applyDnsResync), [`seedDnsZone`](/api/dns/#seedDnsZone), [`takeDnsSnapshot`](/api/dns/#takeDnsSnapshot)
- `domains:read`: [`listDomains`](/api/domains/#listDomains), [`domainAvailability`](/api/domains/#domainAvailability), [`getDomain`](/api/domains/#getDomain), [`getDomainTrade`](/api/domains/#getDomainTrade)
- `domains:write`: [`registerDomain`](/api/domains/#registerDomain), [`setDomainAutoRenew`](/api/domains/#setDomainAutoRenew), [`enableDomainHosting`](/api/domains/#enableDomainHosting), [`setDomainNameservers`](/api/domains/#setDomainNameservers), [`updateDomainRegistrant`](/api/domains/#updateDomainRegistrant), [`adoptDomainRegistrantEmail`](/api/domains/#adoptDomainRegistrantEmail), [`renewDomain`](/api/domains/#renewDomain), [`setDomainSensitive`](/api/domains/#setDomainSensitive), [`tradeDomain`](/api/domains/#tradeDomain), [`transferDomain`](/api/domains/#transferDomain), [`requestDomainTransferOut`](/api/domains/#requestDomainTransferOut), [`cancelDomainTransferOut`](/api/domains/#cancelDomainTransferOut)
- `grants:read`: [`listDomainGrants`](/api/domains/#listDomainGrants), [`listGrants`](/api/grants/#listGrants)
- `grants:write`: [`createDomainGrant`](/api/domains/#createDomainGrant), [`changeDomainGrant`](/api/domains/#changeDomainGrant), [`revokeDomainGrant`](/api/domains/#revokeDomainGrant), [`acceptGrant`](/api/grants/#acceptGrant), [`declineGrant`](/api/grants/#declineGrant), [`leaveGrant`](/api/grants/#leaveGrant)
- `ipfs:read`: [`getIpfsAccountUnpaid`](/api/ipfs/#getIpfsAccountUnpaid), [`inspectIpfsCid`](/api/ipfs/#inspectIpfsCid), [`listIpfsContent`](/api/ipfs/#listIpfsContent), [`getIpfsContent`](/api/ipfs/#getIpfsContent), [`listIpfsDomains`](/api/ipfs/#listIpfsDomains), [`getIpfsDomain`](/api/ipfs/#getIpfsDomain), [`listIpfsDomainPins`](/api/ipfs/#listIpfsDomainPins), [`listIpfsGrants`](/api/ipfs/#listIpfsGrants), [`listIpfsNames`](/api/ipfs/#listIpfsNames), [`getIpfsName`](/api/ipfs/#getIpfsName), [`listPathMaps`](/api/ipfs/#listPathMaps), [`listPins`](/api/ipfs/#listPins), [`getPin`](/api/ipfs/#getPin), [`getIpfsLocationNotice`](/api/ipfs/#getIpfsLocationNotice), [`listIpfsUploads`](/api/ipfs/#listIpfsUploads), [`getUpload`](/api/ipfs/#getUpload), [`getIpfsUsage`](/api/ipfs/#getIpfsUsage)
- `ipfs:write`: [`deleteIpfsContent`](/api/ipfs/#deleteIpfsContent), [`setIpfsContentCopies`](/api/ipfs/#setIpfsContentCopies), [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`detachIpfsDomain`](/api/ipfs/#detachIpfsDomain), [`updateIpfsDomainPins`](/api/ipfs/#updateIpfsDomainPins), [`retargetIpfsDomain`](/api/ipfs/#retargetIpfsDomain), [`createIpfsGrant`](/api/ipfs/#createIpfsGrant), [`revokeIpfsGrant`](/api/ipfs/#revokeIpfsGrant), [`createIpfsName`](/api/ipfs/#createIpfsName), [`retireIpfsName`](/api/ipfs/#retireIpfsName), [`setIpfsNameTarget`](/api/ipfs/#setIpfsNameTarget), [`createPathMap`](/api/ipfs/#createPathMap), [`deletePathMap`](/api/ipfs/#deletePathMap), [`setPathMapDesired`](/api/ipfs/#setPathMapDesired), [`createPin`](/api/ipfs/#createPin), [`deletePin`](/api/ipfs/#deletePin), [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage), [`createUpload`](/api/ipfs/#createUpload), [`abortUpload`](/api/ipfs/#abortUpload), [`completeUpload`](/api/ipfs/#completeUpload)
- `legal:read`: [`legalStatus`](/api/auth/#legalStatus), [`legalAcknowledgements`](/api/legal/#legalAcknowledgements)
- `legal:write`: [`legalAccept`](/api/auth/#legalAccept)
- `names:read`: [`listFreeNames`](/api/names/#listFreeNames), [`listFreeNameBases`](/api/names/#listFreeNameBases), [`checkFreeName`](/api/names/#checkFreeName), [`getFreeName`](/api/names/#getFreeName)
- `names:write`: [`claimFreeName`](/api/names/#claimFreeName), [`releaseFreeName`](/api/names/#releaseFreeName)
- `notifications:read`: [`getCreditWarning`](/api/credits/#getCreditWarning), [`listNotifications`](/api/notifications/#listNotifications), [`getNotificationPreferences`](/api/notifications/#getNotificationPreferences)
- `notifications:write`: [`setCreditWarning`](/api/credits/#setCreditWarning), [`setNotificationPreferences`](/api/notifications/#setNotificationPreferences), [`markNotificationsRead`](/api/notifications/#markNotificationsRead)
- `oauth:read`: [`listOAuthGrants`](/api/oauth/#listOAuthGrants)
- `oauth:write`: [`revokeOAuthGrant`](/api/oauth/#revokeOAuthGrant)
- `p2p:read`: [`listP2pApps`](/api/p2p/#listP2pApps), [`getP2pApp`](/api/p2p/#getP2pApp), [`listP2pAppDomains`](/api/p2p/#listP2pAppDomains)
- `p2p:write`: [`createP2pApp`](/api/p2p/#createP2pApp), [`updateP2pApp`](/api/p2p/#updateP2pApp), [`deleteP2pApp`](/api/p2p/#deleteP2pApp), [`attachP2pAppDomain`](/api/p2p/#attachP2pAppDomain), [`detachP2pAppDomain`](/api/p2p/#detachP2pAppDomain), [`verifyP2pAppDomainDns`](/api/p2p/#verifyP2pAppDomainDns), [`mintP2pMailboxCredentials`](/api/p2p/#mintP2pMailboxCredentials), [`mintP2pTurnCredentials`](/api/p2p/#mintP2pTurnCredentials)
- `profile:read`: [`oauthUserinfo`](/api/oauth/#oauthUserinfo)
- `referrals:read`: [`getReferralPromotion`](/api/promotions/#getReferralPromotion), [`getReferrals`](/api/referrals/#getReferrals), [`getGift`](/api/referrals/#getGift)
- `referrals:write`: [`claimGift`](/api/referrals/#claimGift), [`createGift`](/api/referrals/#createGift), [`regenerateGift`](/api/referrals/#regenerateGift), [`revokeGift`](/api/referrals/#revokeGift)
- `security:read`: [`securityStatus`](/api/auth/#securityStatus)
- `security:write`: [`disableSecondFactor`](/api/auth/#disableSecondFactor), [`enrollStart`](/api/auth/#enrollStart), [`enrollVerify`](/api/auth/#enrollVerify)
- `stats:read`: [`getIpfsStatsDetail`](/api/ipfs/#getIpfsStatsDetail), [`exportIpfsStats`](/api/ipfs/#exportIpfsStats), [`getIpfsStatsPaths`](/api/ipfs/#getIpfsStatsPaths), [`getIpfsStatsSettings`](/api/ipfs/#getIpfsStatsSettings), [`listIpfsStatsSubjects`](/api/ipfs/#listIpfsStatsSubjects), [`getIpfsStatsSummary`](/api/ipfs/#getIpfsStatsSummary), [`getIpfsStatsToday`](/api/ipfs/#getIpfsStatsToday)
- `stats:write`: [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail), [`disableIpfsDomainStatsDetail`](/api/ipfs/#disableIpfsDomainStatsDetail)
- `support:read`: [`listTickets`](/api/support/#listTickets), [`readTicket`](/api/support/#readTicket)
- `support:write`: [`openTicket`](/api/support/#openTicket), [`replyTicket`](/api/support/#replyTicket)
- `tunnels:read`: [`listTunnels`](/api/tunnels/#listTunnels), [`getTunnel`](/api/tunnels/#getTunnel)
- `tunnels:write`: [`createTunnel`](/api/tunnels/#createTunnel), [`updateTunnel`](/api/tunnels/#updateTunnel), [`deleteTunnel`](/api/tunnels/#deleteTunnel), [`verifyTunnelDns`](/api/tunnels/#verifyTunnelDns)
- `vps-secrets:read`: [`revealVpsAppPassword`](/api/vps/#revealVpsAppPassword), [`openVpsConsole`](/api/vps/#openVpsConsole)
- `vps-transfers:read`: [`listVpsTransfers`](/api/vps/#listVpsTransfers)
- `vps-transfers:write`: [`offerVpsInstanceTransfer`](/api/vps/#offerVpsInstanceTransfer), [`cancelVpsInstanceTransfer`](/api/vps/#cancelVpsInstanceTransfer), [`offerVpsSnapshotTransfer`](/api/vps/#offerVpsSnapshotTransfer), [`cancelVpsSnapshotTransfer`](/api/vps/#cancelVpsSnapshotTransfer), [`acceptVpsTransfer`](/api/vps/#acceptVpsTransfer), [`declineVpsTransfer`](/api/vps/#declineVpsTransfer), [`offerVpsVolumeTransfer`](/api/vps/#offerVpsVolumeTransfer), [`cancelVpsVolumeTransfer`](/api/vps/#cancelVpsVolumeTransfer)
- `vps:read`: [`getVpsAction`](/api/vps/#getVpsAction), [`listVpsActivity`](/api/vps/#listVpsActivity), [`listVpsApps`](/api/vps/#listVpsApps), [`listVpsAppDeployments`](/api/vps/#listVpsAppDeployments), [`getVpsAppDeployment`](/api/vps/#getVpsAppDeployment), [`getVpsAvailability`](/api/vps/#getVpsAvailability), [`getVpsCharges`](/api/vps/#getVpsCharges), [`listVpsInstances`](/api/vps/#listVpsInstances), [`getVpsInstance`](/api/vps/#getVpsInstance), [`listVpsInstanceActions`](/api/vps/#listVpsInstanceActions), [`listVpsInstanceHostnames`](/api/vps/#listVpsInstanceHostnames), [`getVpsInstanceMetrics`](/api/vps/#getVpsInstanceMetrics), [`getVpsLimits`](/api/vps/#getVpsLimits), [`listVpsSnapshots`](/api/vps/#listVpsSnapshots), [`listSshKeys`](/api/vps/#listSshKeys), [`getSshKey`](/api/vps/#getSshKey), [`listVpsSystemImages`](/api/vps/#listVpsSystemImages), [`listVpsTiers`](/api/vps/#listVpsTiers), [`listVpsVolumes`](/api/vps/#listVpsVolumes), [`getVpsVolume`](/api/vps/#getVpsVolume)
- `vps:write`: [`deployVpsApp`](/api/vps/#deployVpsApp), [`createVpsInstance`](/api/vps/#createVpsInstance), [`deleteVpsInstance`](/api/vps/#deleteVpsInstance), [`connectVpsInstanceHostname`](/api/vps/#connectVpsInstanceHostname), [`disconnectVpsInstanceHostname`](/api/vps/#disconnectVpsInstanceHostname), [`powerOffVpsInstance`](/api/vps/#powerOffVpsInstance), [`powerOnVpsInstance`](/api/vps/#powerOnVpsInstance), [`setVpsQueueNotify`](/api/vps/#setVpsQueueNotify), [`setVpsInstanceRdns`](/api/vps/#setVpsInstanceRdns), [`rebootVpsInstance`](/api/vps/#rebootVpsInstance), [`rebuildVpsInstance`](/api/vps/#rebuildVpsInstance), [`resetVpsInstance`](/api/vps/#resetVpsInstance), [`resizeVpsInstance`](/api/vps/#resizeVpsInstance), [`shutdownVpsInstance`](/api/vps/#shutdownVpsInstance), [`createVpsSnapshot`](/api/vps/#createVpsSnapshot), [`deleteVpsSnapshot`](/api/vps/#deleteVpsSnapshot), [`createSshKey`](/api/vps/#createSshKey), [`generateSshKey`](/api/vps/#generateSshKey), [`deleteSshKey`](/api/vps/#deleteSshKey), [`createVpsVolume`](/api/vps/#createVpsVolume), [`deleteVpsVolume`](/api/vps/#deleteVpsVolume), [`attachVpsVolume`](/api/vps/#attachVpsVolume), [`detachVpsVolume`](/api/vps/#detachVpsVolume), [`resizeVpsVolume`](/api/vps/#resizeVpsVolume)
- `withdrawals:read`: [`listWithdrawals`](/api/credits/#listWithdrawals)
- `withdrawals:write`: [`withdraw`](/api/credits/#withdraw)
---
# Errors
URL: https://docs.weird.ro/api/errors/
Every refusal is a JSON object (or EDN, when asked for) with an `error`:
```json
{"error": {"code": "insufficient-funds", "message": "…"}}
```
Software matches on `code`, never on `message`, which is for a person. Each operation lists the codes it answers under each status, with what to do; some codes carry more facts (a refused charge carries `balance` and `estimate`; `invalid-params` names the `field`).
- `upstream-unavailable`, `unavailable` and `ledger-unavailable` mean a part of the platform did not answer: try again later.
- `internal` is an unexpected failure: try again, then contact support.
- A body under a content type other than JSON or EDN is refused 415 `unsupported-media-type`.
The `weird` command line turns refusals into [exit codes](/cli/#exit-codes).
## The error object
- `error`, object, **required** — `code` and `message` always; the other properties only with the codes each names. A refused charge also carries the facts of the refusal (for insufficient-funds: `balance`, `estimate`).
- `max_content_bytes`, value — with content-too-large
- `n`, value — with car-invalid
- `message`, string, **required** — the refusal in words, for a person; never matched on
- `accepted_dpa_version`, string — with acknowledgement-outdated
- `grace_until`, value — with account-unpaid
- `lang`, string — with acknowledgement-outdated (one of `ro`, `en`)
- `min`, integer — with invalid-params
- `charged`, value — with not-enough-providers
- `hostname`, string — with hostname-blocked
- `removing`, value — with copy-change-in-progress
- `granted`, array of strings — with insufficient-scope
- `readable`, value — with copy-not-readable
- `managed_by`, value — with managed-record
- `needs_support`, value — with piece-ids-unknown
- `eligible_providers`, value — with not-enough-providers
- `max`, integer — with invalid-params
- `lost`, value — with copy-change-in-progress
- `base`, value — with free-names-not-ready
- `copy_jobs`, value — with copy-change-in-progress
- `provider`, string — with invalid-params
- `received_bytes`, value — with content-too-large
- `expected`, string — with invalid-params
- `name`, value — with managed-record
- `limit`, value — with domain-limit-reached, domain-pin-limit-reached
- `unpaid_since`, value — with account-unpaid
- `copies`, value — with copy-change-in-progress, not-enough-providers
- `placement_regions`, value — with location-notice-outdated, location-notice-required, not-enough-providers
- `field`, string — the failing parameter of an invalid-params refusal, when one is named
- `text`, string — with acknowledgement-outdated
- `text_key`, value — with location-notice-outdated, location-notice-required, location-notice-unavailable
- `domains`, value — with content-in-use
- `until`, string — with name-quarantined
- `copy_no`, value — with copy-change-in-progress, copy-not-readable, piece-ids-unknown
- `kind`, string — with acknowledgement-outdated
- `order`, string — with invalid-params
- `excluded_by_region`, value — with not-enough-providers
- `required`, one of — with insufficient-scope, terms-acceptance-required
- **variant 1**: string — insufficient-scope: the scope the route demands
- **variant 2**: array of objects — terms-acceptance-required: the documents to accept
- `kind`, string, **required**
- `version`, string, **required**
- `state`, value — with session-not-open
- `version`, string — with acknowledgement-outdated, location-notice-outdated, location-notice-required, location-notice-unavailable
- `missing`, value — with parts-missing
- `argument`, string — with invalid-params
- `reason`, string — with account-suspended, car-invalid, content-blocked, hostname-blocked, invalid-params
- `deployment_id`, value — with managed-record
- `blockers`, array of objects — with closing-blocked, second-factor-in-use
- `kind`, string
- `count`, integer
- `message`, string
- `retry_after`, integer — with account-too-new, claim-rate-limited (at least 1)
- `accepted_version`, string — with acknowledgement-outdated, location-notice-outdated
- `served_elsewhere`, value — with content-in-use
- `cid`, string — with car-invalid, content-blocked
- `min_copies`, value — with copies-at-minimum
- `size_bytes`, value — with content-too-large, zip-too-large
- `rrtype`, value — with managed-record
- `retry_at`, string (date-time) — with account-too-new, claim-rate-limited
- `code`, string, **required** — what went wrong, for software to match on (each route lists the codes it answers and what to do about them); `upstream-unavailable`, `unavailable` and `ledger-unavailable` mean a part of the platform did not answer: try again later; `internal` is an unexpected failure: try again, then contact support (one of `access-denied`, `account-deleted`, `account-suspended`, `account-too-new`, `account-unpaid`, `acknowledgement-outdated`, `authorization-pending`, `base-closed`, `base-full`, `body-too-large`, `busy`, `capacity-exhausted`, `capacity-unavailable`, `car-invalid`, `charge-not-set`, `charges-not-published`, `claim-limit`, `claim-rate-limited`, `closing-blocked`, `cnp-required`, `company-identity-incomplete`, `conflict`, `content-blocked`, `content-in-use`, `content-too-large`, `contract-not-for-sale`, `copies-at-minimum`, `copy-change-in-progress`, `copy-not-readable`, `credits-not-on-sale`, `delegate-blocked`, `delete-in-progress`, `domain-limit-reached`, `domain-pin-limit-reached`, `domain-retired`, `dpa-not-published`, `email-taken`, `enrolment-required`, `free-names-not-ready`, `hostname-blocked`, `hostname-taken`, `insufficient-funds`, `insufficient-scope`, `internal`, `invalid-client`, `invalid-code`, `invalid-grant`, `invalid-params`, `invalid-state`, `invalid-token`, `invalid-totp`, `ip-mismatch`, `ledger-unavailable`, `location-notice-outdated`, `location-notice-required`, `location-notice-unavailable`, `malformed-body`, `managed-record`, `missing-charge`, `name-forbidden`, `name-quarantined`, `name-reserved`, `name-suspended`, `name-taken`, `not-available`, `not-enough-providers`, `not-found`, `not-implemented`, `nothing-to-refund`, `origin-refused`, `owner-insufficient-funds`, `owner-profile-incomplete`, `parts-missing`, `payment-disputed`, `payment-required`, `payments-disabled`, `piece-ids-unknown`, `precondition-failed`, `profile-incomplete`, `provider-unavailable`, `quota-exceeded`, `rate-limited`, `second-factor-in-use`, `send-failed`, `session-expired`, `session-not-open`, `session-required`, `slow-down`, `stats-detail-unavailable`, `stats-owner-only`, `step-up-required`, `storage-not-enabled`, `terms-acceptance-required`, `token-revoked`, `too-many-open-orders`, `totp-required`, `tunnel-limit`, `unauthorized`, `unavailable`, `unsupported-media-type`, `upstream-unavailable`, `verification-expired`, `withdrawal-period-over`, `zip-too-large`)
- `contact`, string — with account-suspended, content-blocked, hostname-blocked
- `dpa_version`, string — with acknowledgement-outdated
- `credits`, integer — with invalid-params
- `max_bytes`, value — with zip-too-large
- `path_maps`, value — with content-in-use
## Every code
| Code | Status | Operations that list it |
|---|---|---|
| {#code-access-denied} `access-denied` | 403 | [`adoptDomainRegistrantEmail`](/api/domains/#adoptDomainRegistrantEmail), [`cancelDomainTransferOut`](/api/domains/#cancelDomainTransferOut), [`createDomainGrant`](/api/domains/#createDomainGrant), [`deployVpsApp`](/api/vps/#deployVpsApp), [`deviceComplete`](/api/auth/#deviceComplete), [`devicePoll`](/api/auth/#devicePoll), [`requestDomainTransferOut`](/api/domains/#requestDomainTransferOut), [`setDomainAutoRenew`](/api/domains/#setDomainAutoRenew), [`setDomainNameservers`](/api/domains/#setDomainNameservers), [`setDomainSensitive`](/api/domains/#setDomainSensitive), [`tradeDomain`](/api/domains/#tradeDomain), [`updateDomainRegistrant`](/api/domains/#updateDomainRegistrant) |
| {#code-account-suspended} `account-suspended` | 403 | 111 operations |
| {#code-account-too-new} `account-too-new` | 403 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-account-unpaid} `account-unpaid` | 402 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`createIpfsName`](/api/ipfs/#createIpfsName), [`createPin`](/api/ipfs/#createPin), [`createUpload`](/api/ipfs/#createUpload), [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail), [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage) |
| {#code-acknowledgement-outdated} `acknowledgement-outdated` | 409 | [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail), [`registerDomain`](/api/domains/#registerDomain), [`renewDomain`](/api/domains/#renewDomain), [`startTopup`](/api/credits/#startTopup), [`tradeDomain`](/api/domains/#tradeDomain), [`transferDomain`](/api/domains/#transferDomain) |
| {#code-authorization-pending} `authorization-pending` | 400 | [`deviceComplete`](/api/auth/#deviceComplete), [`devicePoll`](/api/auth/#devicePoll) |
| {#code-base-closed} `base-closed` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-base-full} `base-full` | 409 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-busy} `busy` | 409 | [`attachVpsVolume`](/api/vps/#attachVpsVolume), [`createVpsSnapshot`](/api/vps/#createVpsSnapshot), [`detachVpsVolume`](/api/vps/#detachVpsVolume), [`openVpsConsole`](/api/vps/#openVpsConsole), [`powerOffVpsInstance`](/api/vps/#powerOffVpsInstance), [`powerOnVpsInstance`](/api/vps/#powerOnVpsInstance), [`rebootVpsInstance`](/api/vps/#rebootVpsInstance), [`rebuildVpsInstance`](/api/vps/#rebuildVpsInstance), [`resetVpsInstance`](/api/vps/#resetVpsInstance), [`resizeVpsInstance`](/api/vps/#resizeVpsInstance), [`resizeVpsVolume`](/api/vps/#resizeVpsVolume), [`shutdownVpsInstance`](/api/vps/#shutdownVpsInstance) |
| {#code-capacity-exhausted} `capacity-exhausted` | 503 | [`createVpsInstance`](/api/vps/#createVpsInstance) |
| {#code-capacity-unavailable} `capacity-unavailable` | 503 | [`attachP2pAppDomain`](/api/p2p/#attachP2pAppDomain), [`createP2pApp`](/api/p2p/#createP2pApp), [`createTunnel`](/api/tunnels/#createTunnel), [`mintP2pMailboxCredentials`](/api/p2p/#mintP2pMailboxCredentials), [`mintP2pTurnCredentials`](/api/p2p/#mintP2pTurnCredentials) |
| {#code-car-invalid} `car-invalid` | 422 | [`completeUpload`](/api/ipfs/#completeUpload) |
| {#code-charge-not-set} `charge-not-set` | 503 | [`createP2pApp`](/api/p2p/#createP2pApp), [`createTunnel`](/api/tunnels/#createTunnel), [`createVpsInstance`](/api/vps/#createVpsInstance) |
| {#code-charges-not-published} `charges-not-published` | 503 | 21 operations |
| {#code-claim-limit} `claim-limit` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-claim-rate-limited} `claim-rate-limited` | 429 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-closing-blocked} `closing-blocked` | 409 | [`requestAccountClosing`](/api/auth/#requestAccountClosing) |
| {#code-cnp-required} `cnp-required` | 403 | [`registerDomain`](/api/domains/#registerDomain), [`tradeDomain`](/api/domains/#tradeDomain) |
| {#code-company-identity-incomplete} `company-identity-incomplete` | 503 | [`createGift`](/api/referrals/#createGift), [`publicCompany`](/api/public/#publicCompany), [`publicCompanyField`](/api/public/#publicCompanyField), [`startTopup`](/api/credits/#startTopup) |
| {#code-conflict} `conflict` | 409 | 66 operations |
| {#code-content-blocked} `content-blocked` | 451 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`completeUpload`](/api/ipfs/#completeUpload), [`createIpfsName`](/api/ipfs/#createIpfsName), [`createPathMap`](/api/ipfs/#createPathMap), [`createPin`](/api/ipfs/#createPin), [`createUpload`](/api/ipfs/#createUpload), [`retargetIpfsDomain`](/api/ipfs/#retargetIpfsDomain), [`setIpfsNameTarget`](/api/ipfs/#setIpfsNameTarget), [`setPathMapDesired`](/api/ipfs/#setPathMapDesired), [`updateIpfsDomainPins`](/api/ipfs/#updateIpfsDomainPins) |
| {#code-content-in-use} `content-in-use` | 409 | [`deleteIpfsContent`](/api/ipfs/#deleteIpfsContent) |
| {#code-content-too-large} `content-too-large` | 413 | [`completeUpload`](/api/ipfs/#completeUpload), [`createUpload`](/api/ipfs/#createUpload) |
| {#code-copies-at-minimum} `copies-at-minimum` | 409 | [`setIpfsContentCopies`](/api/ipfs/#setIpfsContentCopies) |
| {#code-copy-change-in-progress} `copy-change-in-progress` | 409 | [`setIpfsContentCopies`](/api/ipfs/#setIpfsContentCopies) |
| {#code-copy-not-readable} `copy-not-readable` | 409 | [`setIpfsContentCopies`](/api/ipfs/#setIpfsContentCopies) |
| {#code-credits-not-on-sale} `credits-not-on-sale` | 503 | [`createGift`](/api/referrals/#createGift), [`startTopup`](/api/credits/#startTopup) |
| {#code-delegate-blocked} `delegate-blocked` | 403 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`connectVpsInstanceHostname`](/api/vps/#connectVpsInstanceHostname), [`setVpsInstanceRdns`](/api/vps/#setVpsInstanceRdns), [`upsertDnsRecords`](/api/dns/#upsertDnsRecords) |
| {#code-delete-in-progress} `delete-in-progress` | 409 | [`deleteIpfsContent`](/api/ipfs/#deleteIpfsContent) |
| {#code-domain-limit-reached} `domain-limit-reached` | 409 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`createIpfsName`](/api/ipfs/#createIpfsName) |
| {#code-domain-pin-limit-reached} `domain-pin-limit-reached` | 409 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`updateIpfsDomainPins`](/api/ipfs/#updateIpfsDomainPins) |
| {#code-domain-retired} `domain-retired` | 409 | [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail), [`updateIpfsDomainPins`](/api/ipfs/#updateIpfsDomainPins) |
| {#code-dpa-not-published} `dpa-not-published` | 409 | [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail) |
| {#code-email-taken} `email-taken` | 409 | [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`signupComplete`](/api/auth/#signupComplete), [`verifyEmailChange`](/api/auth/#verifyEmailChange) |
| {#code-enrolment-required} `enrolment-required` | 403 | 86 operations |
| {#code-free-names-not-ready} `free-names-not-ready` | 503 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-hostname-blocked} `hostname-blocked` | 451 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`attachP2pAppDomain`](/api/p2p/#attachP2pAppDomain), [`connectVpsInstanceHostname`](/api/vps/#connectVpsInstanceHostname), [`createDnsZone`](/api/dns/#createDnsZone), [`createIpfsName`](/api/ipfs/#createIpfsName), [`createP2pApp`](/api/p2p/#createP2pApp), [`createPathMap`](/api/ipfs/#createPathMap), [`createTunnel`](/api/tunnels/#createTunnel), [`deployVpsApp`](/api/vps/#deployVpsApp), [`enableDomainHosting`](/api/domains/#enableDomainHosting), [`updateTunnel`](/api/tunnels/#updateTunnel) |
| {#code-hostname-taken} `hostname-taken` | 409 | [`createTunnel`](/api/tunnels/#createTunnel) |
| {#code-insufficient-funds} `insufficient-funds` | 402 | 30 operations |
| {#code-insufficient-scope} `insufficient-scope` | 403 | 238 operations |
| {#code-invalid-client} `invalid-client` | 401 | [`oauthToken`](/api/oauth/#oauthToken) |
| {#code-invalid-code} `invalid-code` | 422 | [`contactVerifyConfirm`](/api/contact/#contactVerifyConfirm), [`deviceApprove`](/api/auth/#deviceApprove), [`deviceComplete`](/api/auth/#deviceComplete), [`deviceDeny`](/api/auth/#deviceDeny), [`deviceLookup`](/api/auth/#deviceLookup), [`enrollVerify`](/api/auth/#enrollVerify), [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`loginVerify`](/api/auth/#loginVerify), [`phoneVerifyCheck`](/api/auth/#phoneVerifyCheck), [`signupComplete`](/api/auth/#signupComplete), [`verifyEmailChange`](/api/auth/#verifyEmailChange) |
| {#code-invalid-grant} `invalid-grant` | 400 | [`oauthToken`](/api/oauth/#oauthToken) |
| {#code-invalid-params} `invalid-params` | 400 | 116 operations |
| {#code-invalid-state} `invalid-state` | 409 | 22 operations |
| {#code-invalid-token} `invalid-token` | 401 | [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`loginVerify`](/api/auth/#loginVerify), [`refresh`](/api/auth/#refresh), [`signupCancel`](/api/auth/#signupCancel), [`signupComplete`](/api/auth/#signupComplete), [`verifyEmailChange`](/api/auth/#verifyEmailChange) |
| {#code-invalid-totp} `invalid-totp` | 422 | 89 operations |
| {#code-ip-mismatch} `ip-mismatch` | 403 | [`contactVerifyConfirm`](/api/contact/#contactVerifyConfirm) |
| {#code-ledger-unavailable} `ledger-unavailable` | 503 | 25 operations |
| {#code-location-notice-outdated} `location-notice-outdated` | 409 | [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage) |
| {#code-location-notice-required} `location-notice-required` | 409 | [`createUpload`](/api/ipfs/#createUpload), [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage) |
| {#code-location-notice-unavailable} `location-notice-unavailable` | 503 | [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage) |
| {#code-managed-record} `managed-record` | 409 | [`deleteDnsRecord`](/api/dns/#deleteDnsRecord), [`upsertDnsRecords`](/api/dns/#upsertDnsRecords) |
| {#code-name-forbidden} `name-forbidden` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-name-quarantined} `name-quarantined` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-name-reserved} `name-reserved` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-name-suspended} `name-suspended` | 409 | [`attachIpfsDomain`](/api/ipfs/#attachIpfsDomain), [`releaseFreeName`](/api/names/#releaseFreeName) |
| {#code-name-taken} `name-taken` | 409 | [`claimFreeName`](/api/names/#claimFreeName) |
| {#code-not-available} `not-available` | 403 | [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`signupComplete`](/api/auth/#signupComplete), [`startTopup`](/api/credits/#startTopup), [`verifyEmailChange`](/api/auth/#verifyEmailChange) |
| {#code-not-enough-providers} `not-enough-providers` | 409, 503 | [`createUpload`](/api/ipfs/#createUpload), [`enableIpfsStorage`](/api/ipfs/#enableIpfsStorage), [`setIpfsContentCopies`](/api/ipfs/#setIpfsContentCopies) |
| {#code-not-found} `not-found` | 404 | 164 operations |
| {#code-not-implemented} `not-implemented` | 501 | [`getVpsInstanceMetrics`](/api/vps/#getVpsInstanceMetrics), [`openVpsConsole`](/api/vps/#openVpsConsole), [`shutdownVpsInstance`](/api/vps/#shutdownVpsInstance) |
| {#code-nothing-to-refund} `nothing-to-refund` | 409 | [`withdraw`](/api/credits/#withdraw) |
| {#code-origin-refused} `origin-refused` | 403 | [`loginVerify`](/api/auth/#loginVerify), [`logout`](/api/auth/#logout), [`logoutAll`](/api/auth/#logoutAll), [`refresh`](/api/auth/#refresh), [`signupComplete`](/api/auth/#signupComplete) |
| {#code-parts-missing} `parts-missing` | 409 | [`completeUpload`](/api/ipfs/#completeUpload) |
| {#code-payment-disputed} `payment-disputed` | 409 | [`withdraw`](/api/credits/#withdraw) |
| {#code-payment-required} `payment-required` | 402 | [`powerOnVpsInstance`](/api/vps/#powerOnVpsInstance) |
| {#code-payments-disabled} `payments-disabled` | 503 | [`createGift`](/api/referrals/#createGift), [`startTopup`](/api/credits/#startTopup) |
| {#code-piece-ids-unknown} `piece-ids-unknown` | 409 | [`deleteIpfsContent`](/api/ipfs/#deleteIpfsContent) |
| {#code-precondition-failed} `precondition-failed` | 412 | [`updateBillingProfile`](/api/auth/#updateBillingProfile), [`updateProfile`](/api/auth/#updateProfile) |
| {#code-profile-incomplete} `profile-incomplete` | 403 | 150 operations |
| {#code-provider-unavailable} `provider-unavailable` | 502 | [`createGift`](/api/referrals/#createGift), [`getInvoicePdf`](/api/invoices/#getInvoicePdf), [`startTopup`](/api/credits/#startTopup) |
| {#code-quota-exceeded} `quota-exceeded` | 409 | [`createSshKey`](/api/vps/#createSshKey), [`createVpsInstance`](/api/vps/#createVpsInstance), [`createVpsSnapshot`](/api/vps/#createVpsSnapshot), [`createVpsVolume`](/api/vps/#createVpsVolume), [`deployVpsApp`](/api/vps/#deployVpsApp), [`generateSshKey`](/api/vps/#generateSshKey) |
| {#code-rate-limited} `rate-limited` | 429 | 269 operations |
| {#code-second-factor-in-use} `second-factor-in-use` | 409 | [`disableSecondFactor`](/api/auth/#disableSecondFactor) |
| {#code-send-failed} `send-failed` | 502 | [`contactVerifyStart`](/api/contact/#contactVerifyStart) |
| {#code-session-expired} `session-expired` | 401 | [`contactVerifyConfirm`](/api/contact/#contactVerifyConfirm), [`deviceComplete`](/api/auth/#deviceComplete), [`devicePoll`](/api/auth/#devicePoll), [`enrollVerify`](/api/auth/#enrollVerify), [`linkEmailConfirm`](/api/auth/#linkEmailConfirm), [`loginVerify`](/api/auth/#loginVerify), [`signupCancel`](/api/auth/#signupCancel), [`signupComplete`](/api/auth/#signupComplete), [`verifyEmailChange`](/api/auth/#verifyEmailChange) |
| {#code-session-not-open} `session-not-open` | 409 | [`abortUpload`](/api/ipfs/#abortUpload), [`completeUpload`](/api/ipfs/#completeUpload) |
| {#code-session-required} `session-required` | 403 | [`enrollStart`](/api/auth/#enrollStart) |
| {#code-slow-down} `slow-down` | 429 | [`devicePoll`](/api/auth/#devicePoll) |
| {#code-stats-detail-unavailable} `stats-detail-unavailable` | 409 | [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail) |
| {#code-stats-owner-only} `stats-owner-only` | 403 | [`disableIpfsDomainStatsDetail`](/api/ipfs/#disableIpfsDomainStatsDetail), [`enableIpfsDomainStatsDetail`](/api/ipfs/#enableIpfsDomainStatsDetail) |
| {#code-step-up-required} `step-up-required` | 403 | 85 operations |
| {#code-storage-not-enabled} `storage-not-enabled` | 409 | [`createUpload`](/api/ipfs/#createUpload) |
| {#code-terms-acceptance-required} `terms-acceptance-required` | 403 | 237 operations |
| {#code-token-revoked} `token-revoked` | 401 | [`refresh`](/api/auth/#refresh) |
| {#code-too-many-open-orders} `too-many-open-orders` | 429 | [`startTopup`](/api/credits/#startTopup) |
| {#code-tunnel-limit} `tunnel-limit` | 409 | [`createTunnel`](/api/tunnels/#createTunnel) |
| {#code-unauthorized} `unauthorized` | 401 | 247 operations |
| {#code-unavailable} `unavailable` | 409, 503 | 189 operations |
| {#code-unsupported-media-type} `unsupported-media-type` | 415 | [`importDnsZone`](/api/dns/#importDnsZone) |
| {#code-upstream-unavailable} `upstream-unavailable` | 502 | 170 operations |
| {#code-verification-expired} `verification-expired` | 401 | [`contactSubmit`](/api/contact/#contactSubmit) |
| {#code-withdrawal-period-over} `withdrawal-period-over` | 409 | [`withdraw`](/api/credits/#withdraw) |
| {#code-zip-too-large} `zip-too-large` | 400 | [`createUpload`](/api/ipfs/#createUpload) |
---
# Idempotency
URL: https://docs.weird.ro/api/idempotency/
When an answer is lost (a dropped connection, a timeout), retrying must not create or charge something twice. Every operation that spends credits says how a retry is made safe, in `x-weird-idempotency`:
- `header`: send the `Idempotency-Key` header, 1 to 255 printable ASCII characters naming this operation. Repeating the request with the same key, on the same route and within 24 hours, answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. A malformed key, or one used for a different request, is refused 400 `invalid-params`.
- `body`: a field of the body (named in `field`, required or not) does the same.
- `natural`: a repeat is refused or changes nothing, for the reason given.
- `none`: a repeat makes a second one; `bills` says whether it costs.
Make the key once per intended action and reuse it on every retry of that action. The `weird` command line does this for you, and `--idempotency-key` lets a script choose the key of a charged create.
| Operation | Retry safety |
|---|---|
| [`POST /abuse/reports`](/api/abuse/#submitAbuseReport) | a repeat makes a second one (it costs nothing): a repeat files a second report with its own reference (nothing is charged); keep the first reference rather than sending again |
| [`POST /auth/account/export`](/api/auth/#requestDataExport) | a repeat is refused or changes nothing: one copy a day: a repeat within a day answers the copy already asked for (200), or 429 `rate-limited` once it is gone |
| [`POST /credits/withdrawals`](/api/credits/#withdraw) | a repeat is refused or changes nothing: a top-up is withdrawn from once: a repeat answers the withdrawal already made (200) and refunds nothing twice |
| [`GET /dns/events`](/api/dns/#listDnsEvents) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /dns/zones`](/api/dns/#listDnsZones) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /dns/zones`](/api/dns/#createDnsZone) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /dns/zones/{origin}`](/api/dns/#getDnsZone) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`DELETE /dns/zones/{origin}`](/api/dns/#deleteDnsZone) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /dns/zones/{origin}/dnssec`](/api/dns/#getDnsZoneDnssec) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /dns/zones/{origin}/export`](/api/dns/#exportDnsZone) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`PUT /dns/zones/{origin}/import`](/api/dns/#importDnsZone) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /dns/zones/{origin}/migration`](/api/dns/#getDnsMigrationAdvice) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /dns/zones/{origin}/records`](/api/dns/#upsertDnsRecords) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`DELETE /dns/zones/{origin}/records/{name}`](/api/dns/#deleteDnsRecord) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /dns/zones/{origin}/resync`](/api/dns/#resyncDnsZone) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /dns/zones/{origin}/resync`](/api/dns/#previewDnsResync) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /dns/zones/{origin}/resync/apply`](/api/dns/#applyDnsResync) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /dns/zones/{origin}/seed`](/api/dns/#seedDnsZone) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /dns/zones/{origin}/snapshots`](/api/dns/#takeDnsSnapshot) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /dns/zones/{origin}/snapshots`](/api/dns/#listDnsSnapshots) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /dns/zones/{origin}/snapshots/{id}`](/api/dns/#getDnsSnapshot) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /domains`](/api/domains/#listDomains) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /domains`](/api/domains/#registerDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /domains/availability`](/api/domains/#domainAvailability) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /domains/{domain}`](/api/domains/#getDomain) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /domains/{domain}/grants`](/api/domains/#listDomainGrants) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /domains/{domain}/hosting`](/api/domains/#enableDomainHosting) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /domains/{domain}/renew`](/api/domains/#renewDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /domains/{domain}/trade`](/api/domains/#getDomainTrade) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /domains/{domain}/trade`](/api/domains/#tradeDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /domains/{domain}/transfer`](/api/domains/#transferDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /ipfs/cid/{cid}`](/api/ipfs/#inspectIpfsCid) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/content`](/api/ipfs/#listIpfsContent) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/content/{cid}`](/api/ipfs/#getIpfsContent) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/content/{cid}/copies`](/api/ipfs/#setIpfsContentCopies) | a repeat is refused or changes nothing: the same copy count as now changes nothing (`state` `unchanged`, or `raising`/`lowering` while the first change is under way) |
| [`GET /ipfs/domains`](/api/ipfs/#listIpfsDomains) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/domains`](/api/ipfs/#attachIpfsDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`DELETE /ipfs/domains/{id}`](/api/ipfs/#detachIpfsDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /ipfs/domains/{id}`](/api/ipfs/#getIpfsDomain) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/domains/{id}/pins`](/api/ipfs/#listIpfsDomainPins) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/domains/{id}/pins`](/api/ipfs/#updateIpfsDomainPins) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/domains/{id}/retarget`](/api/ipfs/#retargetIpfsDomain) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`POST /ipfs/domains/{id}/stats/detail`](/api/ipfs/#enableIpfsDomainStatsDetail) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /ipfs/grants`](/api/ipfs/#listIpfsGrants) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/grants`](/api/ipfs/#createIpfsGrant) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/names`](/api/ipfs/#listIpfsNames) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/names`](/api/ipfs/#createIpfsName) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/names/{id}`](/api/ipfs/#getIpfsName) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`PUT /ipfs/names/{id}/target`](/api/ipfs/#setIpfsNameTarget) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/path-maps`](/api/ipfs/#listPathMaps) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/path-maps`](/api/ipfs/#createPathMap) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/path-maps/{id}/desired`](/api/ipfs/#setPathMapDesired) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/pins`](/api/ipfs/#listPins) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/pins`](/api/ipfs/#createPin) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/pins/{requestid}`](/api/ipfs/#getPin) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/detail`](/api/ipfs/#getIpfsStatsDetail) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/export`](/api/ipfs/#exportIpfsStats) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/paths`](/api/ipfs/#getIpfsStatsPaths) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/settings`](/api/ipfs/#getIpfsStatsSettings) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/subjects`](/api/ipfs/#listIpfsStatsSubjects) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/summary`](/api/ipfs/#getIpfsStatsSummary) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/stats/today`](/api/ipfs/#getIpfsStatsToday) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/storage/enable`](/api/ipfs/#enableIpfsStorage) | a repeat is refused or changes nothing: storage is enabled once per account: a repeat answers the same state with `charged` false and charges nothing |
| [`GET /ipfs/storage/location-notice`](/api/ipfs/#getIpfsLocationNotice) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /ipfs/uploads`](/api/ipfs/#createUpload) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /ipfs/uploads`](/api/ipfs/#listIpfsUploads) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/uploads/{id}`](/api/ipfs/#getUpload) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /ipfs/usage`](/api/ipfs/#getIpfsUsage) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /names`](/api/names/#listFreeNames) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /names`](/api/names/#claimFreeName) | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
| [`GET /names/bases`](/api/names/#listFreeNameBases) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /names/check`](/api/names/#checkFreeName) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /names/{id}`](/api/names/#getFreeName) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /p2p/apps`](/api/p2p/#createP2pApp) | a repeat is refused or changes nothing: an app name is unique: a repeat is refused 409 `conflict` (the name is taken) |
| [`GET /p2p/apps`](/api/p2p/#listP2pApps) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /p2p/apps/{id}`](/api/p2p/#getP2pApp) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /p2p/apps/{id}/domains`](/api/p2p/#listP2pAppDomains) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /tunnels`](/api/tunnels/#createTunnel) | a repeat is refused or changes nothing: a hostname has at most one live tunnel: a repeat is refused 409 `hostname-taken` |
| [`GET /tunnels`](/api/tunnels/#listTunnels) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /tunnels/{id}`](/api/tunnels/#getTunnel) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/actions/{id}`](/api/vps/#getVpsAction) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/activity`](/api/vps/#listVpsActivity) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/apps`](/api/vps/#listVpsApps) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/apps/deployments`](/api/vps/#listVpsAppDeployments) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /vps/apps/deployments`](/api/vps/#deployVpsApp) | the body field `idempotency_key` (required) makes a repeat safe |
| [`GET /vps/apps/deployments/{id}`](/api/vps/#getVpsAppDeployment) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/availability`](/api/vps/#getVpsAvailability) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/charges`](/api/vps/#getVpsCharges) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/instances`](/api/vps/#listVpsInstances) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /vps/instances`](/api/vps/#createVpsInstance) | the body field `idempotency_key` (required) makes a repeat safe |
| [`GET /vps/instances/{id}`](/api/vps/#getVpsInstance) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/instances/{id}/actions`](/api/vps/#listVpsInstanceActions) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/instances/{id}/domains`](/api/vps/#listVpsInstanceHostnames) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/instances/{id}/metrics`](/api/vps/#getVpsInstanceMetrics) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /vps/instances/{id}/resize`](/api/vps/#resizeVpsInstance) | a repeat is refused or changes nothing: a repeat is refused: 409 `busy` while the first resize runs, then 400 `invalid-params` (field tier_id: the instance is of this tier already) |
| [`POST /vps/instances/{id}/snapshots`](/api/vps/#createVpsSnapshot) | the body field `idempotency_key` (required) makes a repeat safe |
| [`GET /vps/limits`](/api/vps/#getVpsLimits) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/snapshots`](/api/vps/#listVpsSnapshots) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/ssh-keys`](/api/vps/#listSshKeys) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/ssh-keys/{id}`](/api/vps/#getSshKey) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/system-images`](/api/vps/#listVpsSystemImages) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/tiers`](/api/vps/#listVpsTiers) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/transfers`](/api/vps/#listVpsTransfers) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`GET /vps/volumes`](/api/vps/#listVpsVolumes) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /vps/volumes`](/api/vps/#createVpsVolume) | the body field `idempotency_key` (required) makes a repeat safe |
| [`GET /vps/volumes/{id}`](/api/vps/#getVpsVolume) | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
| [`POST /vps/volumes/{id}/resize`](/api/vps/#resizeVpsVolume) | a repeat is refused or changes nothing: a repeat is refused: 409 `busy` while the first growth runs, then 400 `invalid-params` (field size_gb: a volume only grows) |
---
# Rate limits
URL: https://docs.weird.ro/api/rate-limits/
An operation called too often answers 429 with the code `rate-limited`: wait and retry. The document lists 429 for almost every operation; it does not state general numbers. Some operations state their own limits, quoted below. Wrong authenticator codes are limited too: too many make the step-up answer 429 for a while.
The `weird` command line exits with code 8 on a 429 (see [exit codes](/cli/#exit-codes)).
269 of the 272 operations list a 429 answer. What the document says of particular limits:
- [`POST /auth/account/email/start`](/api/auth/#startEmailChange): Limited per account: past the limit 429 `rate-limited`, wait and retry.
- [`POST /auth/account/export`](/api/auth/#requestDataExport): One copy a day: asking again within a day answers that copy (200), or 429 `rate-limited` when it is gone;
- [`POST /auth/emails`](/api/auth/#linkEmailStart): One code per address per 10 minutes and a few starts per account per hour (past either, 429 `rate-limited`);
- [`POST /auth/profile/phone/verify/start`](/api/auth/#phoneVerifyStart): At most one code per minute and 5 per day: past that, 429 `rate-limited`.
- [`POST /auth/signup/start`](/api/auth/#signupStart): One client network starts a limited number of sign-ups an hour: past it the answer is 429 `rate-limited`;
- [`POST /contact/verify-email/start`](/api/contact/#contactVerifyStart): Starts are limited per client and per address (429 `rate-limited`).
- [`GET /credits/balance`](/api/credits/#getBalance): The account's credits: `balances` per credit type, their `total`, and `spend` over the last `window_days` (the total, the average per day and `runway_days`, how long the credits last at that pace;
- [`GET /credits/statement`](/api/credits/#statement): The account's credit history as a statement, newest first: the charges grouped per day, contract and resource (`charge-group`), every other entry (top-ups, refunds, grants) as it is (`entry`).
- [`GET /credits/warning`](/api/credits/#getCreditWarning): `status` is what the last check saw: `level` (`none`, `low`: the first warning was sent, `critical`: the second was sent), `balance`, `burn_per_hour` (what the account is projected to be charged per hour), `estimate` (`complete`, or `partial` when a product did not answer and its charges of the last 3 hours stood in for it), `breakdown` (one entry per product: `product`, `per_hour`, `basis` and, when projected, `resources`: servers by tier, volumes and snapshots by GB, stored content by MB times copies, active DNS zones by their records, tunnels and p2p apps, each at the credit charges in effect, whatever is on hold, suspended or not billed left out;
- [`POST /credits/withdrawals`](/api/credits/#withdraw): 422 `invalid-totp` for a wrong or used code, and too many wrong codes are 429 `rate-limited` for a while).
- [`POST /ipfs/domains/{id}/stats/detail`](/api/ipfs/#enableIpfsDomainStatsDetail): the `per_host_hour` credit charge of `ipfs.stats-detailed-hourly` times the account's sites with detailed statistics on in that hour (each site once per hour it is on for any part of) is billed every hour while what it creates exists;
- [`GET /ipfs/stats/detail`](/api/ipfs/#getIpfsStatsDetail): Visitors are counted per day with a key that changes every day and differs per site, so they cannot be followed from day to day or across sites: `visitors_sum` is the sum of daily visitors, not a count of unique people, and there is no monthly unique figure.
- [`GET /ipfs/stats/detail`](/api/ipfs/#getIpfsStatsDetail): `format` `csv` answers one line per day.
- [`GET /ipfs/stats/export`](/api/ipfs/#exportIpfsStats): The statistics of one subject over a range as a file: `level` `summary` (default: one row per day of the summary) or `detail` (one row per day of the detailed statistics), `format` `csv` (default;
- [`GET /ipfs/stats/summary`](/api/ipfs/#getIpfsStatsSummary): `format` `csv` answers a CSV file (one line per day, hours as `h00`..`h23`).
- [`POST /names`](/api/names/#claimFreeName): Refused 409 `base-closed`, `name-reserved`, `name-forbidden`, `name-taken`, `name-quarantined` (with `until`), `claim-limit` (the most names one account holds), `base-full` (this base has no room for new names right now: try another base, or later), 403 `account-too-new` (with `retry_after`, the seconds to wait, and `retry_at`, the instant), 429 `claim-rate-limited` (with `retry_after`, the seconds to wait, and `retry_at`, the instant).
- [`GET /public/charges`](/api/public/#publicCharges): Limited per client address (past the limit, 429).
- [`GET /public/company`](/api/public/#publicCompany): Limited per client address (past the limit, 429).
- [`GET /public/company/{field}`](/api/public/#publicCompanyField): Uncharged, cacheable and limited as `GET /public/company`.
- [`GET /public/domains/availability`](/api/public/#publicDomainAvailability): Limited per client address (by the minute and by the hour) and for every visitor together, the registry's protection;
- [`POST /referrals/claim`](/api/referrals/#claimGift): Attempts are limited per account and per link: past the limit, 429 `rate-limited`.
- [`GET /vps/instances/{id}`](/api/vps/#getVpsInstance): The state (`pending`, `creating`, `running`, `off`, `deleting`, `deleted`, `failed`), the addresses once running, the credit charge per hour and `billing_hold` (`grace`, `powered-off` or `refund-pending` while hours are unpaid).
- [`GET /vps/tiers`](/api/vps/#listVpsTiers): The tiers on sale: the size, the credit charge per hour (credits, a decimal string), and the locations and images a create may name.
---
# JSON and EDN
URL: https://docs.weird.ro/api/conventions/
- **JSON.** Bodies and answers are JSON objects with snake_case keys, sent and answered as `application/json`.
- **EDN.** A body may be sent as `application/edn`: a map with kebab-case keyword keys. It is read as data, never evaluated. An answer is EDN when the `Accept` header prefers `application/edn`, every refusal included.
- **Anything else** is refused 415 `unsupported-media-type`.
- **Amounts** (credits, credit charges) are decimal strings, such as `"0.000123"`: read them as exact decimals, never as floating-point numbers.
- **Refusals** are `{"error": {"code", "message"}}`: see [errors](/api/errors/).
In this reference, a path is written as the document has it: `/domains/{domain}` means the domain's name in its place. The examples are `curl` commands; `$WEIRD_API_KEY` stands for an API key and `$WEIRD_ACCESS_TOKEN` for a session's access token.
## Credit charges
One thing has a price: a credit (`credit_price` of `GET /public/charges` and `GET /credits/topup`: `net`, `vat` and `total`, VAT included). Everything else is a credit charge, in credits.
Credit charges are listed by [`GET /credits/charges`](/api/credits/#getCharges): contract → rate → decimal credits, with the change that is scheduled, if any. An operation's charges (`x-weird-charged`) name a contract and a rate of that list, with:
- `billed`: `before` (taken from the credits before the operation runs), `after` (charged after a successful answer; a refused or failed request is not charged; these are added up and booked hourly), `once`, `hourly` (while what it creates exists) or `usage` (per use);
- `times`: what multiplies the rate.
So the exact credit charge can be shown before confirming. A charge the credits do not cover is refused 402 `insufficient-funds`.
---
# Accounts, sign-in and keys
URL: https://docs.weird.ro/api/auth/
| Operation | Method and path |
|---|---|
| [The account's closing request](#getAccountClosing) | `GET /auth/account/close` |
| [Ask for the account to be closed](#requestAccountClosing) | `POST /auth/account/close` |
| [Cancel the pending account closing](#cancelAccountClosing) | `POST /auth/account/close/cancel` |
| [Start changing the account's email address](#startEmailChange) | `POST /auth/account/email/start` |
| [Finish changing the account's email address](#verifyEmailChange) | `POST /auth/account/email/verify` |
| [Ask for a copy of the data kept about the account](#requestDataExport) | `POST /auth/account/export` |
| [The state of the latest copy of the account's data](#getDataExport) | `GET /auth/account/export` |
| [Download the copy of the account's data](#downloadDataExport) | `GET /auth/account/export/download` |
| [The restrictions placed on the account after a review](#getAccountRestrictions) | `GET /auth/account/restrictions` |
| [Create an API key](#createApiKey) | `POST /auth/api-keys` |
| [The account's API keys](#listApiKeys) | `GET /auth/api-keys` |
| [Revoke an API key](#revokeApiKey) | `POST /auth/api-keys/{id}/revoke` |
| [The account's billing profiles](#listBillingProfiles) | `GET /auth/billing-profiles` |
| [Create a billing profile](#createBillingProfile) | `POST /auth/billing-profiles` |
| [Update a billing profile](#updateBillingProfile) | `PUT /auth/billing-profiles/{id}` |
| [Delete a billing profile](#deleteBillingProfile) | `DELETE /auth/billing-profiles/{id}` |
| [Make a billing profile the default](#defaultBillingProfile) | `POST /auth/billing-profiles/{id}/default` |
| [Approve a pending device login](#deviceApprove) | `POST /auth/device/approve` |
| [Complete a device login](#deviceComplete) | `POST /auth/device/complete` |
| [Deny a pending device login](#deviceDeny) | `POST /auth/device/deny` |
| [Look up a pending device login by its user code](#deviceLookup) | `POST /auth/device/lookup` |
| [Poll a device login](#devicePoll) | `POST /auth/device/poll` |
| [Start a device login](#deviceStart) | `POST /auth/device/start` |
| [The addresses the account may put on a registrant contact](#listEmails) | `GET /auth/emails` |
| [Start linking an additional email address](#linkEmailStart) | `POST /auth/emails` |
| [Confirm a linked email address with its code](#linkEmailConfirm) | `POST /auth/emails/confirm` |
| [Remove a linked email address](#unlinkEmail) | `DELETE /auth/emails/{email}` |
| [Set the account's language](#setLanguage) | `PUT /auth/language` |
| [What the caller has to accept](#legalStatus) | `GET /auth/legal` |
| [Accept the current terms of service and privacy notice](#legalAccept) | `POST /auth/legal/accept` |
| [Start a login](#loginStart) | `POST /auth/login/start` |
| [Verify a login](#loginVerify) | `POST /auth/login/verify` |
| [Revoke the current session](#logout) | `POST /auth/logout` |
| [Revoke every session of the account](#logoutAll) | `POST /auth/logout-all` |
| [Revoke every other session of the account](#logoutOthers) | `POST /auth/logout-others` |
| [The caller's account](#me) | `GET /auth/me` |
| [The personal profile and the completeness flags](#getProfile) | `GET /auth/profile` |
| [Save the personal profile](#updateProfile) | `PUT /auth/profile` |
| [Check the phone verification code](#phoneVerifyCheck) | `POST /auth/profile/phone/verify/check` |
| [Send the phone verification code](#phoneVerifyStart) | `POST /auth/profile/phone/verify/start` |
| [Rotate a refresh token](#refresh) | `POST /auth/refresh` |
| [The account's second factor and the session's step-up](#securityStatus) | `GET /auth/security` |
| [Remove the account's second factor](#disableSecondFactor) | `POST /auth/security/disable` |
| [Start the authenticator enrolment](#enrollStart) | `POST /auth/security/enroll/start` |
| [Verify the enrolment with the first code](#enrollVerify) | `POST /auth/security/enroll/verify` |
| [The account's sessions](#listSessions) | `GET /auth/sessions` |
| [Revoke one session of the account](#revokeSession) | `POST /auth/sessions/{id}/revoke` |
| [Cancel a signup in flight](#signupCancel) | `POST /auth/signup/cancel` |
| [Complete a signup from the magic link](#signupComplete) | `POST /auth/signup/complete` |
| [Start a signup](#signupStart) | `POST /auth/signup/start` |
| [Step the session up with the second factor](#stepUp) | `POST /auth/step-up` |
## The account's closing request {#getAccountClosing}
`GET /auth/account/close` · operation `getAccountClosing`
Reads where a request to close the account stands: `state` `none` (nothing asked), `pending` (with `execute_after`, until when `POST /auth/account/close/cancel` can still cancel it), `cancelled` or `closed`; `blockers` names what must be settled before the account can be closed (the kinds `POST /auth/account/close` lists; `closing` once the closing itself has begun; `refunds-awaiting-approval` while the refund of unused purchased credit is being reviewed by our team, with `pay_by`, the latest day it is paid, `refunds-in-progress` and `refund-awaiting-bank-details` while it is being made at the end of the grace period: the account closes once it is paid). `settlement` says what closing now would settle: `refund_credits` and `refund_amount` (RON, VAT included) of unused purchased credit refunded, `refunds` per top-up, and `forfeited_credits` (promotional credit, credit carried over or received as a gift, which is not refunded); null when the credits cannot be read. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`AccountClosingResult`): the result
- `closing`, object, **required**
- `state`, string, **required** (one of `none`, `pending`, `cancelled`, `closed`)
- `requested_at`, string or null, **required**
- `execute_after`, string or null, **required** — until when a pending request can be cancelled; the account is closed after it
- `blockers`, array of objects, **required**
- `kind`, string, **required** — what must be settled first: registered-domains, domain-operations-pending, open-orders, uninvoiced-orders, charges-in-flight, refunds-owed, open-money-events, open-gifts, abuse-review, debt, credits-remaining (credit that is not refunded, until forfeit_credits), refunds-awaiting-approval (the refund is being reviewed by our team: paid by `pay_by` at the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has begun
- `count`, integer
- `message`, string — what to do, for the domain kinds
- `pay_by`, string or null — refunds-awaiting-approval: the latest day the refund is paid
- `settlement`, one of
- **variant 1**: object or null
- `currency`, string, **required** — the currency of `refund_amount` and of each refund's `amount` (must be `"RON"`)
- `refund_credits`, string, **required** — a decimal amount as text
- `refund_amount`, string, **required** — RON, VAT included
- `forfeited_credits`, string, **required** — a decimal amount as text
- `refunds`, array of objects, **required**
- `order_ref`, string, **required**
- `credits`, string, **required** — a decimal amount as text
- `amount`, string, **required** — a decimal amount as text
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope` | insufficient-scope (an API key without the route's scope: required, granted) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/account/close' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account close status`](/cli/account/#weird-account-close-status), [`weird account close`](/cli/account/#weird-account-close)):
```terminal
$ weird account close status
$ weird account close
```
MCP: [`weird_account_closing`](/mcp/account/#weird_account_closing).
## Ask for the account to be closed {#requestAccountClosing}
`POST /auth/account/close` · operation `requestAccountClosing`
Asks for the account to be closed. Refused 409 `closing-blocked` while the account still holds something that costs, earns or owes; `blockers` lists each `kind` with its `count` (and a `message` for the domain kinds) to settle first: `registered-domains` (active registrations: transfer them out or let them lapse), `domain-operations-pending` (a registration or transfer still under way: wait), `open-orders`, `uninvoiced-orders`, `charges-in-flight`, `refunds-owed`, `open-money-events` (wait for them to finish, or contact support), `open-gifts` (take them back or wait for them to be claimed), `abuse-review` (the account is restricted while a report about it is reviewed: it can be closed once that is settled), `debt` (a negative balance: top up; not a blocker while a published increase of credit charges is in its notice period: you may leave before it applies, and the debt stays owed) and `credits-remaining` (promotional credit, credit carried over from the previous platform or received as a gift is not refunded: send `forfeit_credits` true to accept that it ends with the account; `GET /auth/account/close` shows how much under `settlement.forfeited_credits`). Purchased credit is never a blocker: what is unused at the end of the grace period is refunded, with nothing deducted, to the payments of the most recent top-ups (`settlement` shows the estimate now; credit used meanwhile is not refunded), and what cannot go back that way is refunded by bank transfer (you are asked for an IBAN in a support ticket, and the account closes once that refund is paid). Otherwise the request is `pending` until `execute_after` (a grace period, 14 days), a notice is emailed, and it can be cancelled until then. After the grace period what the account holds in every product (servers, tunnels, apps, stored content, DNS zones, support tickets) is deleted and access given to or by it ends; once that has begun the request can no longer be cancelled (`blockers` shows `closing`). The account is then closed: its sessions, API keys, personal profile, second factor and notices are deleted. Records the law requires us to keep (invoices, orders, the billing profiles they name, the credit history and the email addresses tied to them, kept sealed) are retained. Read it with `GET /auth/account/close`; cancel it with `POST /auth/account/close/cancel` until `execute_after`. Cannot be undone once the grace period is over. You will be asked for the 6-digit code of your authenticator (`totp_code`, or an unused `backup_code`) in this request itself, from a session and an API key alike: a recent step-up is not enough. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Strong authentication | the body itself must carry `totp_code` or `backup_code`, from a session and an API key alike — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`AccountClosingRequest`):
- `forfeit_credits`, boolean — accept that the credit that is not refunded (promotional, carried over, received as a gift) ends with the account; unused purchased credit is refunded (default `false`)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 202** (`AccountClosingResult`): the result
- `closing`, object, **required**
- `state`, string, **required** (one of `none`, `pending`, `cancelled`, `closed`)
- `requested_at`, string or null, **required**
- `execute_after`, string or null, **required** — until when a pending request can be cancelled; the account is closed after it
- `blockers`, array of objects, **required**
- `kind`, string, **required** — what must be settled first: registered-domains, domain-operations-pending, open-orders, uninvoiced-orders, charges-in-flight, refunds-owed, open-money-events, open-gifts, abuse-review, debt, credits-remaining (credit that is not refunded, until forfeit_credits), refunds-awaiting-approval (the refund is being reviewed by our team: paid by `pay_by` at the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has begun
- `count`, integer
- `message`, string — what to do, for the domain kinds
- `pay_by`, string or null — refunds-awaiting-approval: the latest day the refund is paid
- `settlement`, one of
- **variant 1**: object or null
- `currency`, string, **required** — the currency of `refund_amount` and of each refund's `amount` (must be `"RON"`)
- `refund_credits`, string, **required** — a decimal amount as text
- `refund_amount`, string, **required** — RON, VAT included
- `forfeited_credits`, string, **required** — a decimal amount as text
- `refunds`, array of objects, **required**
- `order_ref`, string, **required**
- `credits`, string, **required** — a decimal amount as text
- `amount`, string, **required** — a decimal amount as text
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field forfeit_credits) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more) |
| 404 | `not-found` | not-found |
| 409 | `closing-blocked` | closing-blocked (with blockers: settle each, then ask again) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (part of the platform did not answer: nothing was decided, try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/account/close' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird account close`](/cli/account/#weird-account-close)):
```terminal
$ weird account close
```
MCP: [`weird_account_close`](/mcp/account/#weird_account_close).
## Cancel the pending account closing {#cancelAccountClosing}
`POST /auth/account/close/cancel` · operation `cancelAccountClosing`
Cancels the request `POST /auth/account/close` made, while it is `pending` (until `execute_after`): the account stays open as it was, and closing it later needs a new request. Answers the request with `state` `cancelled`. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Answer 200** (`AccountClosingResult`): the result
- `closing`, object, **required**
- `state`, string, **required** (one of `none`, `pending`, `cancelled`, `closed`)
- `requested_at`, string or null, **required**
- `execute_after`, string or null, **required** — until when a pending request can be cancelled; the account is closed after it
- `blockers`, array of objects, **required**
- `kind`, string, **required** — what must be settled first: registered-domains, domain-operations-pending, open-orders, uninvoiced-orders, charges-in-flight, refunds-owed, open-money-events, open-gifts, abuse-review, debt, credits-remaining (credit that is not refunded, until forfeit_credits), refunds-awaiting-approval (the refund is being reviewed by our team: paid by `pay_by` at the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has begun
- `count`, integer
- `message`, string — what to do, for the domain kinds
- `pay_by`, string or null — refunds-awaiting-approval: the latest day the refund is paid
- `settlement`, one of
- **variant 1**: object or null
- `currency`, string, **required** — the currency of `refund_amount` and of each refund's `amount` (must be `"RON"`)
- `refund_credits`, string, **required** — a decimal amount as text
- `refund_amount`, string, **required** — RON, VAT included
- `forfeited_credits`, string, **required** — a decimal amount as text
- `refunds`, array of objects, **required**
- `order_ref`, string, **required**
- `credits`, string, **required** — a decimal amount as text
- `amount`, string, **required** — a decimal amount as text
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope` | insufficient-scope (an API key without the route's scope: required, granted) |
| 404 | `not-found` | not-found (no closing is pending: nothing to cancel) |
| 409 | `conflict` | conflict (the closing has begun: it can no longer be cancelled) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/account/close/cancel' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account close cancel`](/cli/account/#weird-account-close-cancel)):
```terminal
$ weird account close cancel
```
MCP: [`weird_account_close_cancel`](/mcp/account/#weird_account_close_cancel).
## Start changing the account's email address {#startEmailChange}
`POST /auth/account/email/start` · operation `startEmailChange`
Emails a six-digit code to the NEW address; the answer's `token` and that code finish the change (`POST /auth/account/email/verify`). The answer is the same when the address already belongs to an account. Limited per account: past the limit 429 `rate-limited`, wait and retry. Nothing changes until the verify: an unfinished change simply expires. You will be asked for the 6-digit code of your authenticator (`totp_code`, or an unused `backup_code`) in this request itself, from a session and an API key alike: a recent step-up is not enough. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Strong authentication | the body itself must carry `totp_code` or `backup_code`, from a session and an API key alike — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`EmailChangeStart`):
- `email`, string, **required** — the new address
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`EmailChangeStarted`): the result
- `token`, string (password), **required** (**a secret: shown once, never logged**)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field email: blank, malformed, or the account's own address) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (email cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/account/email/start' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":""}'
```
With the CLI ([`weird emails primary`](/cli/emails/#weird-emails-primary)):
```terminal
$ weird emails primary
```
MCP: [`weird_login_email_change`](/mcp/account/#weird_login_email_change).
## Finish changing the account's email address {#verifyEmailChange}
`POST /auth/account/email/verify` · operation `verifyEmailChange`
The `token` of the start and the `code` mailed to the new address (a few wrong codes end the change: start again). The account and its personal profile take the new address, the OLD address is emailed a notice, and every session and OAuth grant of the account ends: log in again with the new address. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`EmailChangeVerify`):
- `token`, string (password), **required** (**a secret: shown once, never logged**)
- `code`, string, **required** — the code mailed to the new address
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`EmailChanged`): the result
- `ok`, boolean, **required**
- `email`, string, **required**
- `sessions_revoked`, integer, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `invalid-token`, `session-expired`, `unauthorized` | unauthorized, invalid-token or session-expired (start the change again) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `not-available`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); not-available (we cannot accept this request for these details: write to the abuse contact named in the answer); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `email-taken` | email-taken (the address got an account meanwhile) |
| 422 | `invalid-code`, `invalid-totp` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow); invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/account/email/verify' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"","code":""}'
```
With the CLI ([`weird emails primary`](/cli/emails/#weird-emails-primary)):
```terminal
$ weird emails primary
```
MCP: [`weird_login_email_change`](/mcp/account/#weird_login_email_change).
## Ask for a copy of the data kept about the account {#requestDataExport}
`POST /auth/account/export` · operation `requestDataExport`
Starts preparing one JSON document with everything the platform keeps about the account: the account and its linked addresses, the personal profile (the personal numeric code only as whether one is held and when it was last changed and used), billing profiles, sessions, API keys (never the keys themselves), backup codes left, accepted terms, email choices and notifications, support conversations, payments, top-ups and invoice references, the credit statement, gifts and referrals, access shared on domains, domains, an inventory of every resource with the fields the API shows, and the restrictions decided on the account after a review (never who reported it). Each section says what it holds and why it is kept; the document ends with what is kept elsewhere and how to get it. Answers 202 with the copy `preparing`; it is usually ready within minutes (`GET /auth/account/export`), then kept for a day for `GET /auth/account/export/download`. One copy a day: asking again within a day answers that copy (200), or 429 `rate-limited` when it is gone; a copy whose preparation failed can be asked for again at once. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:export`](/api/keys-and-permissions/#account-export) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
| Retry safety | a repeat is refused or changes nothing: one copy a day: a repeat within a day answers the copy already asked for (200), or 429 `rate-limited` once it is gone |
**Request body** (`DataExportRequest`), optional:
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`DataExportResult`): the copy asked for in the last day
- `export`, one of, **required**
- **variant 1**: object
- `id`, string, **required**
- `state`, string, **required** (one of `preparing`, `ready`, `failed`)
- `requested_at`, string, **required**
- `ready_at`, string or null, **required**
- `expires_at`, string or null, **required** — when a ready copy is removed
- `size_bytes`, integer or null, **required**
- `sha256`, string or null, **required** — the SHA-256 of the document's JSON text, hex
- `next_request_at`, string, **required** — when a new copy can be asked for
- **variant 2**: null
**Answer 202** (`DataExportResult`): the result
- `export`, one of, **required**
- **variant 1**: object
- `id`, string, **required**
- `state`, string, **required** (one of `preparing`, `ready`, `failed`)
- `requested_at`, string, **required**
- `ready_at`, string or null, **required**
- `expires_at`, string or null, **required** — when a ready copy is removed
- `size_bytes`, integer or null, **required**
- `sha256`, string or null, **required** — the SHA-256 of the document's JSON text, hex
- `next_request_at`, string, **required** — when a new copy can be asked for
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited (one copy a day) |
| 503 | `unavailable` | unavailable (the copy cannot be kept safely now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/account/export' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird account export request`](/cli/account/#weird-account-export-request)):
```terminal
$ weird account export request
```
MCP: [`weird_data_export_request`](/mcp/data-export/#weird_data_export_request).
## The state of the latest copy of the account's data {#getDataExport}
`GET /auth/account/export` · operation `getDataExport`
`export` is the latest copy asked for: `state` (`preparing`, `ready` or `failed`), `requested_at`, `ready_at`, `expires_at` (when a ready copy is removed), `size_bytes` and `sha256` of the document, and `next_request_at` (when a new copy can be asked for); null when no copy is kept. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:export`](/api/keys-and-permissions/#account-export) |
| Charged | no |
**Answer 200** (`DataExportResult`): the result
- `export`, one of, **required**
- **variant 1**: object
- `id`, string, **required**
- `state`, string, **required** (one of `preparing`, `ready`, `failed`)
- `requested_at`, string, **required**
- `ready_at`, string or null, **required**
- `expires_at`, string or null, **required** — when a ready copy is removed
- `size_bytes`, integer or null, **required**
- `sha256`, string or null, **required** — the SHA-256 of the document's JSON text, hex
- `next_request_at`, string, **required** — when a new copy can be asked for
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/account/export' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account export status`](/cli/account/#weird-account-export-status), [`weird account export download`](/cli/account/#weird-account-export-download)):
```terminal
$ weird account export status
$ weird account export download
```
MCP: [`weird_data_export`](/mcp/data-export/#weird_data_export), [`weird_data_export_save`](/mcp/data-export/#weird_data_export_save).
## Download the copy of the account's data {#downloadDataExport}
`GET /auth/account/export/download` · operation `downloadDataExport`
The prepared document, as an attachment (`Cache-Control: private, no-store`): `format`, `version`, `generated_at`, `account_id`, `about`, `sections` (each `id`, `title`, `description`, `purpose`, `status` (`complete`, or `partial` when a part could not be read and says so) and `data`), `kept_elsewhere` (what is not in the file and how to get it) and `not_in_this_file` (what is left out and why). It can be downloaded again until it expires. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:export`](/api/keys-and-permissions/#account-export) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Answer 200** (`DataExportDocument`): the result
- `format`, string, **required** (must be `"weird-data-export"`)
- `version`, integer, **required**
- `generated_at`, string, **required**
- `account_id`, string, **required**
- `about`, string, **required**
- `sections`, array of objects, **required**
- `id`, string, **required** (one of `account`, `profile`, `billing_profiles`, `security`, `legal`, `notifications`, `support`, `payments`, `credits`, `referrals`, `domain_access`, `domains`, `resources`, `restrictions`, `data_exports`)
- `title`, string, **required**
- `description`, string, **required** — what the section holds
- `purpose`, string, **required** — why it is kept
- `status`, string, **required** — partial: a part could not be read now; that part says so (one of `complete`, `partial`)
- `data`, object, **required**
- `kept_elsewhere`, array of objects, **required**
- `what`, string, **required**
- `where`, string, **required**
- `how_to_get`, string, **required**
- `not_in_this_file`, array of objects, **required**
- `what`, string, **required**
- `why`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no copy is kept: ask for one with `POST /auth/account/export`) |
| 409 | `invalid-state` | invalid-state (the copy is still being prepared, or its preparation failed) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/account/export/download' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account export download`](/cli/account/#weird-account-export-download)):
```terminal
$ weird account export download
```
MCP: [`weird_data_export_save`](/mcp/data-export/#weird_data_export_save).
## The restrictions placed on the account after a review {#getAccountRestrictions}
`GET /auth/account/restrictions` · operation `getAccountRestrictions`
`restriction`: while the account is restricted after a report about it, `{state: "suspended", reason: "abuse-review", since, contact}` (it can still be signed in to and read, open and answer support tickets, ask for a copy of its data and read the legal documents; nothing can be created, changed or removed, every such call is refused 403 `account-suspended`); null otherwise. `decisions`: every decision taken on the account or on a content or hostname it held, newest first: `id`, `action` (`suspend`, `resume`, `block`, `lift`, `revoke-access`), `restriction`, `target` (`kind`, `value`), `ground` with its words (`ground_text`), the facts you were told (`statement`), the `reference` to quote, `decided_at`, `notified_at`, and `contested_at` with `contest_ticket_id` once contested. `how_to_contest` says how: open a support ticket with `abuse_decision_id` (`POST /support/tickets`), or write to `contact`. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`AccountRestrictions`): the result
- `restriction`, one of, **required**
- **variant 1**: object
- `state`, string, **required** (must be `"suspended"`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `since`, string, **required**
- `contact`, string, **required** — the address to write to about it
- **variant 2**: null
- `decisions`, array of objects, **required**
- `notified_at`, string or null
- `statement_of_reasons`, object or null — the statement of reasons of a restriction (DSA art. 17): measure, scope, duration, until, stage, basis, automated_decision, legal_provision, terms_clause (its title in each language) and terms_clause_id, order_reference, order_confidential, contest_until (the day until which you may contest it), lang (the language it was sent in)
- `restriction`, string or null — `account-suspended`, `content-blocked` or `hostname-blocked`; null for an act that lifts or ends access
- `id`, string, **required**
- `contested_at`, string or null
- `ground`, string or null
- `action`, string, **required** (one of `suspend`, `resume`, `block`, `lift`, `revoke-access`, `delete-resource`, `release-name`)
- `statement`, string or null
- `reference`, string, **required** — quote it when you write about the decision
- `target`, one of
- **variant 1**: object
- `kind`, string (one of `content`, `hostname`)
- `value`, string
- **variant 2**: null
- `ground_text`, string or null
- `decided_at`, string, **required**
- `contest_ticket_id`, string or null
- `contact`, string, **required**
- `how_to_contest`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/account/restrictions' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account restrictions`](/cli/account/#weird-account-restrictions)):
```terminal
$ weird account restrictions
```
MCP: [`weird_account_restrictions`](/mcp/account/#weird_account_restrictions).
## Create an API key {#createApiKey}
`POST /auth/api-keys` · operation `createApiKey`
`name` (1..100 characters) and `scopes`: a non-empty list of the scopes the key may use (each operation names the one it needs in `x-weird-scope`; `x-weird-scopes` at the top of this document lists every scope with what it allows and whether it is sensitive: show the sensitive ones as such before creating the key). A wildcard (`*`, `*:read`, `vps:*`) covers the product scopes only: every account, money, access, support and secret scope must be named in full. An API key holding `api-keys:write` may create keys only with scopes it holds itself, named in full, and may revoke only itself and the keys it created. At most 20 active keys per account: revoke one (`POST /auth/api-keys/{id}/revoke`) to make room. The key's `token` is shown once: keep it secret. A key cannot be changed; revoke it and create another. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`api-keys:write`](/api/keys-and-permissions/#api-keys-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`CreateApiKey`):
- `name`, string, **required** (length 1 to 100)
- `scopes`, array of strings, **required** (1 to any items)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 201** (`ApiKeyCreated`): the result
- `api_key`, object, **required**
- `revoked_at`, string or null
- `id`, string, **required**
- `key_prefix`, string, **required**
- `name`, string, **required**
- `revoked_reason`, string or null
- `scopes`, array of strings, **required**
- `status`, string, **required** (one of `active`, `revoked`)
- `created_at`, string, **required**
- `last_used_at`, string or null
- `token`, string (password), **required** — `weird_...`, shown once (**a secret: shown once, never logged**)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (name or scopes; also 20 active keys already: revoke one) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key asking for a scope it does not hold, or a wildcard: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `conflict` | conflict (another key of the account is being created: retry) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/api-keys' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"","scopes":[""]}'
```
With the CLI ([`weird keys create`](/cli/keys/#weird-keys-create), [`weird mcp setup`](/cli/mcp/#weird-mcp-setup)):
```terminal
$ weird keys create
$ weird mcp setup
```
## The account's API keys {#listApiKeys}
`GET /auth/api-keys` · operation `listApiKeys`
Every API key the account has had, newest first, revoked ones included (`status`, `revoked_at`); never a key's token, which is shown once at creation. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`api-keys:read`](/api/keys-and-permissions/#api-keys-read) |
| Charged | no |
**Answer 200** (`ApiKeyList`): the result
- `api_keys`, array of objects, **required**
- `revoked_at`, string or null
- `id`, string, **required**
- `key_prefix`, string, **required**
- `name`, string, **required**
- `revoked_reason`, string or null
- `scopes`, array of strings, **required**
- `status`, string, **required** (one of `active`, `revoked`)
- `created_at`, string, **required**
- `last_used_at`, string or null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/api-keys' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird keys list`](/cli/keys/#weird-keys-list), [`weird mcp setup`](/cli/mcp/#weird-mcp-setup)):
```terminal
$ weird keys list
$ weird mcp setup
```
MCP: [`weird_api_keys`](/mcp/keys/#weird_api_keys).
## Revoke an API key {#revokeApiKey}
`POST /auth/api-keys/{id}/revoke` · operation `revokeApiKey`
Revokes the key `id` (as `GET /auth/api-keys` lists it): it stops working at once, for good; a revoked key cannot be restored, create a new one (`POST /auth/api-keys`) instead. An API key may revoke only itself and the keys it created. An unknown, already revoked or another account's key is 404. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`api-keys:write`](/api/keys-and-permissions/#api-keys-write) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/api-keys/{id}/revoke' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird keys revoke`](/cli/keys/#weird-keys-revoke), [`weird mcp setup`](/cli/mcp/#weird-mcp-setup)):
```terminal
$ weird keys revoke
$ weird mcp setup
```
MCP: [`weird_api_key_revoke`](/mcp/keys/#weird_api_key_revoke).
## The account's billing profiles {#listBillingProfiles}
`GET /auth/billing-profiles` · operation `listBillingProfiles`
The account's billing profiles (who invoices are made out to), the default first, then the newest. Each carries an `etag` for `If-Match` on its update. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Answer 200** (`BillingProfileList`): the result
- `profiles`, array of objects, **required**
- `trade_registry_number`, string or null
- `city`, string
- `postal_code`, string
- `id`, string, **required**
- `country_code`, string — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string
- `invoice_email`, string or null
- `address1`, string
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `etag`, string — the profile's version, for `If-Match` on its update
- `kind`, string, **required** (one of `individual`, `company`)
- `default`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (a profile cannot be read now: try again later, then contact support) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/billing-profiles' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird billing`](/cli/billing/), [`weird billing update`](/cli/billing/#weird-billing-update)):
```terminal
$ weird billing
$ weird billing update
```
MCP: [`weird_billing_profiles`](/mcp/billing/#weird_billing_profiles).
## Create a billing profile {#createBillingProfile}
`POST /auth/billing-profiles` · operation `createBillingProfile`
An individual or a company (a company needs a fiscal code; a `cnp` field is refused for both kinds); at most 20 live profiles; the first live profile is the default. Remove it with `DELETE /auth/billing-profiles/{id}`. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:write`](/api/keys-and-permissions/#billing-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`BillingProfileInput`):
- `trade_registry_number`, string or null
- `city`, string, **required**
- `postal_code`, string, **required**
- `country_code`, string, **required** — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string, **required**
- `invoice_email`, string or null
- `address1`, string, **required**
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `kind`, string, **required** (one of `individual`, `company`)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
- `default`, boolean
**Answer 201** (`BillingProfileResult`): the result
- `profile`, object, **required**
- `trade_registry_number`, string or null
- `city`, string
- `postal_code`, string
- `id`, string, **required**
- `country_code`, string — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string
- `invoice_email`, string or null
- `address1`, string
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `etag`, string — the profile's version, for `If-Match` on its update
- `kind`, string, **required** (one of `individual`, `company`)
- `default`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (also 20 active profiles already: delete one) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/billing-profiles' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"individual","name":"","address1":"","city":"","state_province":"","postal_code":"","country_code":""}'
```
With the CLI ([`weird billing add`](/cli/billing/#weird-billing-add)):
```terminal
$ weird billing add
```
MCP: [`weird_billing_profile_save`](/mcp/billing/#weird_billing_profile_save).
## Update a billing profile {#updateBillingProfile}
`PUT /auth/billing-profiles/{id}` · operation `updateBillingProfile`
The same fields; the default flag is untouched. Optimistic concurrency: send the profile's `etag` (in every billing profile answered, and the `ETag` header) as `If-Match` and a profile saved in between is refused 412 instead of overwritten (no header: last write wins). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:write`](/api/keys-and-permissions/#billing-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
| `If-Match` | header | string | no | the `etag` of the billing profile as it was read |
**Request body** (`BillingProfileInput`):
- `trade_registry_number`, string or null
- `city`, string, **required**
- `postal_code`, string, **required**
- `country_code`, string, **required** — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string, **required**
- `invoice_email`, string or null
- `address1`, string, **required**
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `kind`, string, **required** (one of `individual`, `company`)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
- `default`, boolean
**Answer 200** (`BillingProfileResult`): the result
- `profile`, object, **required**
- `trade_registry_number`, string or null
- `city`, string
- `postal_code`, string
- `id`, string, **required**
- `country_code`, string — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string
- `invoice_email`, string or null
- `address1`, string
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `etag`, string — the profile's version, for `If-Match` on its update
- `kind`, string, **required** (one of `individual`, `company`)
- `default`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a field is wrong: `field` names it) |
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 412 | `precondition-failed` | precondition-failed (the profile changed since its etag was read) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/auth/billing-profiles/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"kind":"individual","name":"","address1":"","city":"","state_province":"","postal_code":"","country_code":""}'
```
With the CLI ([`weird billing update`](/cli/billing/#weird-billing-update)):
```terminal
$ weird billing update
```
MCP: [`weird_billing_profile_save`](/mcp/billing/#weird_billing_profile_save).
## Delete a billing profile {#deleteBillingProfile}
`DELETE /auth/billing-profiles/{id}` · operation `deleteBillingProfile`
The profile is removed from the list (invoices that name it keep it); when it was the default, the newest remaining profile becomes the default. A profile a top-up still needs for its invoice (an open top-up, or one paid and not invoiced yet) is refused 409: retry once the invoice exists. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:write`](/api/keys-and-permissions/#billing-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (a top-up still needs the profile for its invoice) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X DELETE 'https://api.weird.ro/auth/billing-profiles/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird billing delete`](/cli/billing/#weird-billing-delete)):
```terminal
$ weird billing delete
```
MCP: [`weird_billing_profile_delete`](/mcp/billing/#weird_billing_profile_delete).
## Make a billing profile the default {#defaultBillingProfile}
`POST /auth/billing-profiles/{id}/default` · operation `defaultBillingProfile`
Makes the profile `id` (as `GET /auth/billing-profiles` lists it) the one new invoices are made out to; the previous default stays as a plain profile. Undo it by making another profile the default. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:write`](/api/keys-and-permissions/#billing-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`BillingProfileResult`): the result
- `profile`, object, **required**
- `trade_registry_number`, string or null
- `city`, string
- `postal_code`, string
- `id`, string, **required**
- `country_code`, string — two-letter ISO 3166-1
- `address2`, string or null
- `name`, string, **required** (length 2 to 150)
- `state_province`, string
- `invoice_email`, string or null
- `address1`, string
- `fiscal_code`, string or null — a company's fiscal code, `(RO)?\d{2,10}` (required for a company). An individual may give a tax code here and is invoiced by name and address without one: in Romania a personal numeric code (CNP, 13 digits) or a fiscal code, elsewhere 2 to 30 letters, digits, spaces, dots, slashes or hyphens. An individual's is read back masked (all but its last 4 characters); sending the masked value back keeps the stored one
- `vat_payer`, boolean
- `etag`, string — the profile's version, for `If-Match` on its update
- `kind`, string, **required** (one of `individual`, `company`)
- `default`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/billing-profiles/{id}/default' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird billing default`](/cli/billing/#weird-billing-default)):
```terminal
$ weird billing default
```
MCP: [`weird_billing_profile_default`](/mcp/billing/#weird_billing_profile_default).
## Approve a pending device login {#deviceApprove}
`POST /auth/device/approve` · operation `deviceApprove`
Answers the confirmation code, shown once. The terminal is signed in once it completes the login with that code; end its session with `POST /auth/sessions/{id}/revoke` to undo it. This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`DeviceDecision`):
- `user_code`, string, **required**
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`DeviceApproval`): the result
- `ok`, boolean, **required**
- `confirmation_code`, string, **required** — XXX-XXX, shown once
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `step-up-required`, `terms-acceptance-required` | enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-code`, `invalid-totp` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow); invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/approve' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":""}'
```
With the CLI ([`weird device approve`](/cli/device/#weird-device-approve)):
```terminal
$ weird device approve
```
## Complete a device login {#deviceComplete}
`POST /auth/device/complete` · operation `deviceComplete`
The `device_code` and the confirmation code the approver was shown (case and dashes ignored; a few wrong codes end the flow). Answers the auth pair. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Request body** (`DeviceComplete`):
- `device_code`, string, **required**
- `confirmation_code`, string, **required**
**Answer 200** (`AuthPair`): the result
- `access_token`, string (password), **required** — the access token, valid 7 days (15 minutes for a page's cookie session) (**a secret: shown once, never logged**)
- `expires_in`, integer, **required** — seconds until the access token expires, from when it was issued: refresh before then
- `refresh_token`, string (password) — the refresh token, valid 30 days, usable once; absent for a page's cookie session (it is in the cookie) (**a secret: shown once, never logged**)
- `user`, object, **required**
- `lang`, string — the account's language (`PUT /auth/language`): its notifications and the texts shown when a request names none; on `GET /auth/me` (one of `ro`, `en`)
- `id`, string, **required**
- `email`, string, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `display_name`, string
- `personal_info_complete`, boolean, **required**
- `created_at`, string, **required**
- `profile_complete`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `authorization-pending` | authorization-pending (not approved yet: poll again after `interval` seconds) |
| 401 | `session-expired` | session-expired |
| 403 | `access-denied` | access-denied (the person denied it: start again) |
| 422 | `invalid-code` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/complete' \
-H "Content-Type: application/json" \
-d '{"device_code":"","confirmation_code":""}'
```
With the CLI ([`weird login`](/cli/login/)):
```terminal
$ weird login
```
## Deny a pending device login {#deviceDeny}
`POST /auth/device/deny` · operation `deviceDeny`
Refuses the device login whose `user_code` the person typed (`POST /auth/device/lookup` shows what asked): the terminal polling it is answered 403 `access-denied` and must start again. Cannot be undone. A wrong, expired or used code is 422 `invalid-code`. This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`DeviceDecision`):
- `user_code`, string, **required**
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `step-up-required`, `terms-acceptance-required` | enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-code`, `invalid-totp` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow); invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/deny' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":""}'
```
With the CLI ([`weird device deny`](/cli/device/#weird-device-deny)):
```terminal
$ weird device deny
```
## Look up a pending device login by its user code {#deviceLookup}
`POST /auth/device/lookup` · operation `deviceLookup`
Shows what is asking to sign in with the `user_code` a terminal displays (`POST /auth/device/start` made it): the client address, the user agent, when it started and how many seconds are left, so the person can approve it (`POST /auth/device/approve`) or deny it (`POST /auth/device/deny`). A wrong, expired or used code is 422 `invalid-code`, the same for each. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Charged | no |
**Request body** (`UserCodeBody`):
- `user_code`, string, **required**
**Answer 200** (`DevicePending`): the result
- `ip`, string, **required**
- `user_agent`, string or null, **required**
- `created_at`, string, **required**
- `expires_in`, integer, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `terms-acceptance-required` | terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-code` | invalid-code (uniform: wrong, expired, consumed) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/lookup' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":""}'
```
With the CLI ([`weird device approve`](/cli/device/#weird-device-approve), [`weird device deny`](/cli/device/#weird-device-deny)):
```terminal
$ weird device approve
$ weird device deny
```
## Poll a device login {#devicePoll}
`POST /auth/device/poll` · operation `devicePoll`
Answers `{"approved": true}` once the person approved; then finish with `POST /auth/device/complete`. Until then 400 `authorization-pending` (poll again after `interval` seconds); polling faster is answered 429 `slow-down`. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Request body** (`DevicePoll`):
- `device_code`, string, **required**
**Answer 200** (`DeviceApproved`): the result
- `approved`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `authorization-pending` | authorization-pending (not approved yet: poll again after `interval` seconds) |
| 401 | `session-expired` | session-expired |
| 403 | `access-denied` | access-denied (terminal) |
| 429 | `rate-limited`, `slow-down` | slow-down or rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/poll' \
-H "Content-Type: application/json" \
-d '{"device_code":""}'
```
With the CLI ([`weird login`](/cli/login/)):
```terminal
$ weird login
```
## Start a device login {#deviceStart}
`POST /auth/device/start` · operation `deviceStart`
No body. Show the person the `user_code` and the `verification_uri`, where they type it while signed in; poll `POST /auth/device/poll` with the `device_code` every `interval` seconds. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Answer 200** (`DeviceStarted`): the result
- `device_code`, string, **required**
- `user_code`, string, **required** — XXXX-XXXX
- `verification_uri`, string, **required**
- `expires_in`, integer, **required**
- `interval`, integer, **required** — seconds between polls
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/device/start'
```
With the CLI ([`weird login`](/cli/login/)):
```terminal
$ weird login
```
## The addresses the account may put on a registrant contact {#listEmails}
`GET /auth/emails` · operation `listEmails`
`account_email` (the login address) and `linked`: the additional addresses the account proved control of (`source` `verified`: by a code here; `migrated`: on the previous platform), oldest first. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`LinkedEmails`): the result
- `account_email`, string, **required**
- `linked`, array of objects, **required**
- `email`, string, **required**
- `verified_at`, string, **required**
- `source`, string, **required** (one of `verified`, `migrated`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/emails' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird emails`](/cli/emails/)):
```terminal
$ weird emails
```
MCP: [`weird_emails`](/mcp/account/#weird_emails).
## Start linking an additional email address {#linkEmailStart}
`POST /auth/emails` · operation `linkEmailStart`
Emails a six-digit code to the address; answers the flow `token` for `POST /auth/emails/confirm`. The answer is the same when the address belongs to another account. One code per address per 10 minutes and a few starts per account per hour (past either, 429 `rate-limited`); at most 10 linked addresses. Nothing is linked until the confirm; an unconfirmed code simply expires. A linked address is removed with `DELETE /auth/emails/{email}`. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Request body** (`EmailBody`):
- `email`, string (email), **required**
**Answer 200** (`LinkEmailStarted`): the result
- `token`, string (password), **required** (**a secret: shown once, never logged**)
- `email`, string, **required** — the normalized address
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field email; reason already-linked for an address the account already controls) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `conflict` | conflict (10 linked addresses already: remove one) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (email cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/emails' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":""}'
```
With the CLI ([`weird emails add`](/cli/emails/#weird-emails-add)):
```terminal
$ weird emails add
```
MCP: [`weird_email_link_start`](/mcp/account/#weird_email_link_start).
## Confirm a linked email address with its code {#linkEmailConfirm}
`POST /auth/emails/confirm` · operation `linkEmailConfirm`
`token` and the `code` mailed to the address (a few wrong codes end the flow; confirm from the same network the start came from). The address becomes a verified linked address of the account: it may stand on the registrant contact of the account's domains. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Request body** (`LinkEmailConfirm`):
- `token`, string (password), **required** (**a secret: shown once, never logged**)
- `code`, string, **required** — the code emailed to the address
**Answer 200** (`LinkEmailConfirmed`): the result
- `linked`, boolean, **required**
- `email`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `invalid-token`, `session-expired`, `unauthorized` | unauthorized, invalid-token or session-expired |
| 403 | `account-suspended`, `insufficient-scope`, `not-available`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); not-available (we cannot accept this request for these details: write to the abuse contact named in the answer); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `email-taken` | email-taken (another account took the address meanwhile) |
| 422 | `invalid-code` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/emails/confirm' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"","code":""}'
```
With the CLI ([`weird emails verify`](/cli/emails/#weird-emails-verify), [`weird emails add`](/cli/emails/#weird-emails-add)):
```terminal
$ weird emails verify
$ weird emails add
```
MCP: [`weird_email_link_confirm`](/mcp/account/#weird_email_link_confirm).
## Remove a linked email address {#unlinkEmail}
`DELETE /auth/emails/{email}` · operation `unlinkEmail`
The address (URL-encoded) stops being usable on a registrant contact; contacts that already carry it are not changed. The login address is not a linked address. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `email` | path | string | yes | |
**Answer 200** (`LinkEmailRemoved`): the result
- `removed`, boolean, **required**
- `email`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field email) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no such linked address of the caller) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X DELETE 'https://api.weird.ro/auth/emails/{email}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird emails remove`](/cli/emails/#weird-emails-remove)):
```terminal
$ weird emails remove
```
MCP: [`weird_email_unlink`](/mcp/account/#weird_email_unlink).
## Set the account's language {#setLanguage}
`PUT /auth/language` · operation `setLanguage`
`lang`: `ro` (the default of every account) or `en`. The language of every notification and email the account is sent from now on, and of the texts shown to it (the acknowledgements, the legal documents) when a request names none (`lang` field or query parameter first, then `Accept-Language`, then this). Open before the terms are accepted and while the account is restricted. `GET /auth/me` reads it (`user.lang`). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Request body** (`SetLanguage`):
- `lang`, string, **required** (one of `ro`, `en`)
**Answer 200** (`Language`): the result
- `lang`, string, **required** (one of `ro`, `en`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field lang) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/auth/language' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"lang":"ro"}'
```
With the CLI ([`weird account language`](/cli/account/#weird-account-language)):
```terminal
$ weird account language [ro|en]
```
MCP: [`weird_account_language`](/mcp/account/#weird_account_language).
## What the caller has to accept {#legalStatus}
`GET /auth/legal` · operation `legalStatus`
`required`: the current versions the account has not accepted (`kind`, `version`; empty when nothing is due), `accepted`: every acceptance recorded (`kind`, `version`, `lang`: the language of the text accepted, `accepted_at`), `current`: the current documents of the sign-in gate, `upcoming`: every version published to take effect later (read it ahead and accept it ahead with `POST /auth/legal/accept`), `dpa`: the data processing agreement (`version` in force, whether you `accepted` it, whether it is `required` at sign-in, the `upcoming` version and whether you accepted it ahead, `upcoming_accepted`). The documents are in the request's language (`lang`, else Accept-Language, else the account's language, else Romanian). Usable before acceptance. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`legal:read`](/api/keys-and-permissions/#legal-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `lang` | query | string | no | the language of the texts answered: `ro` or `en` (any other value is refused 400 invalid-params, field lang); without it, the Accept-Language header, else the signed-in account's language, else Romanian (one of `ro`, `en`) |
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
**Answer 200** (`LegalStatus`): the result
- `required`, array of objects, **required**
- `kind`, string
- `version`, string
- `accepted`, array of objects, **required**
- `kind`, string
- `version`, string
- `lang`, string or null
- `accepted_at`, string
- `current`, array of objects, **required**
- `lang`, string — the language of this text (one of `ro`, `en`)
- `url`, string or null
- `published_at`, string, **required**
- `body`, string — the text, on a read of one document
- `languages`, array of strings — the languages this version is published in
- `kind`, string, **required** (one of `terms`, `privacy`, `dpa`)
- `title`, string, **required**
- `effective_at`, string — when this version takes effect (its publication unless published ahead)
- `version`, string, **required**
- `upcoming`, array of objects
- `lang`, string — the language of this text (one of `ro`, `en`)
- `url`, string or null
- `published_at`, string, **required**
- `body`, string — the text, on a read of one document
- `languages`, array of strings — the languages this version is published in
- `kind`, string, **required** (one of `terms`, `privacy`, `dpa`)
- `title`, string, **required**
- `effective_at`, string — when this version takes effect (its publication unless published ahead)
- `version`, string, **required**
- `dpa`, object — the data processing agreement: `version` in force, whether you `accepted` it, whether it is `required` at sign-in, the `upcoming` version and whether you accepted it ahead (`upcoming_accepted`)
- `version`, string or null
- `accepted`, boolean
- `required`, boolean
- `upcoming`, string or null
- `upcoming_accepted`, boolean
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope` | insufficient-scope (an API key without the route's scope: required, granted) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/legal' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird legal`](/cli/legal/), [`weird legal accept`](/cli/legal/#weird-legal-accept), [`weird legal accept-dpa`](/cli/legal/#weird-legal-accept-dpa)):
```terminal
$ weird legal
$ weird legal accept
$ weird legal accept-dpa [version]
```
MCP: [`weird_legal_status`](/mcp/legal/#weird_legal_status).
## Accept the current terms of service and privacy notice {#legalAccept}
`POST /auth/legal/accept` · operation `legalAccept`
`terms_version` and `privacy_version`: the current version of each kind that has one (as shown to the person). The acceptance is recorded with its time, the client address, the user agent and the language of the texts shown (`lang`, else Accept-Language, else the account's language, else Romanian); accepting again changes nothing. A version that is not the current one is refused 409: a new version was published since it was shown, read it and accept that one. Until the account has accepted the current versions, every signed-in route except this one, `GET /auth/legal`, signing out, the step-up and the account closing routes answers 403 `terms-acceptance-required` with `required` (the documents to accept): at the first sign-in, and again after each new version. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`legal:write`](/api/keys-and-permissions/#legal-write) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
**Request body** (`LegalAccept`):
- `terms_version`, string
- `privacy_version`, string
- `dpa_version`, string — the data processing agreement's version: required while it is in the terms gate; otherwise optional, the version in force or the upcoming one (accepting it switches back on detailed statistics paused for want of it)
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
**Answer 200** (`LegalStatus`): the result
- `required`, array of objects, **required**
- `kind`, string
- `version`, string
- `accepted`, array of objects, **required**
- `kind`, string
- `version`, string
- `lang`, string or null
- `accepted_at`, string
- `current`, array of objects, **required**
- `lang`, string — the language of this text (one of `ro`, `en`)
- `url`, string or null
- `published_at`, string, **required**
- `body`, string — the text, on a read of one document
- `languages`, array of strings — the languages this version is published in
- `kind`, string, **required** (one of `terms`, `privacy`, `dpa`)
- `title`, string, **required**
- `effective_at`, string — when this version takes effect (its publication unless published ahead)
- `version`, string, **required**
- `upcoming`, array of objects
- `lang`, string — the language of this text (one of `ro`, `en`)
- `url`, string or null
- `published_at`, string, **required**
- `body`, string — the text, on a read of one document
- `languages`, array of strings — the languages this version is published in
- `kind`, string, **required** (one of `terms`, `privacy`, `dpa`)
- `title`, string, **required**
- `effective_at`, string — when this version takes effect (its publication unless published ahead)
- `version`, string, **required**
- `dpa`, object — the data processing agreement: `version` in force, whether you `accepted` it, whether it is `required` at sign-in, the `upcoming` version and whether you accepted it ahead (`upcoming_accepted`)
- `version`, string or null
- `accepted`, boolean
- `required`, boolean
- `upcoming`, string or null
- `upcoming_accepted`, boolean
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field terms_version or privacy_version) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope` | insufficient-scope (an API key without the route's scope: required, granted) |
| 409 | `conflict` | conflict (not the current version) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/legal/accept' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird legal accept`](/cli/legal/#weird-legal-accept), [`weird legal accept-dpa`](/cli/legal/#weird-legal-accept-dpa), [`weird terms`](/cli/terms/)):
```terminal
$ weird legal accept
$ weird legal accept-dpa [version]
$ weird terms
```
## Start a login {#loginStart}
`POST /auth/login/start` · operation `loginStart`
Emails a sign-in code (eight characters, shown XXXX-XXXX) to the address when it has an account; the answer is the same either way. Answers the flow `token` that `POST /auth/login/verify` takes with the code. Codes are capped per address and client network, per client network, and per address for the networks it has never signed in from (never for one it has): past a cap the answer is the same and no code is sent. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Request body** (`EmailBody`):
- `email`, string (email), **required**
**Answer 200** (`LoginStarted`): the result
- `token`, string (password), **required** — the login flow token, valid 15 minutes (**a secret: shown once, never logged**)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a field is wrong: `field` names it) |
| 429 | `rate-limited` | rate-limited (wait and retry) |
| 503 | `unavailable` | unavailable (email cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/login/start' \
-H "Content-Type: application/json" \
-d '{"email":""}'
```
With the CLI ([`weird login`](/cli/login/)):
```terminal
$ weird login
```
## Verify a login {#loginVerify}
`POST /auth/login/verify` · operation `loginVerify`
The flow `token`, the emailed `code` (as mailed, XXXX-XXXX: any case, the dash optional), and for an account with an authenticator its current code (`totp_code`; an unused backup code is accepted there or as `backup_code`). An account without an authenticator logs in with the emailed code alone. Answers the auth pair. From a page (the customer application in a browser): send the header `X-Weird-Session: cookie` from the application's origin; the answer then holds `access_token` (kept in the page's memory, valid 15 minutes) and `user`, no `refresh_token`: the refresh token is set as the cookie `__Secure-weird_refresh` (HttpOnly, Secure, SameSite=Strict, Path=/auth, valid 30 days), which the page never reads; refresh with `POST /auth/refresh` and the same header. From any other origin that header is refused 403 `origin-refused`. Without the header the answer is as described above. An account with an authenticator answers 422 `invalid-totp` when the second factor is missing or wrong; the emailed code stays usable for the retry with the same `token` (up to the limit of wrong second factors, then the login must start again), so a page may ask for the authenticator code only after that answer. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Weird-Session` | header | string | no | `cookie` from a page of the customer application (its own origin only, else 403 `origin-refused`): the refresh token travels in the HttpOnly cookie `__Secure-weird_refresh` (Secure, SameSite=Strict, Path=/auth, 30 days), never in a body or an answer; the access token of such a session lives 15 minutes. Absent: the token pair travels in the bodies. |
**Request body** (`LoginVerify`):
- `token`, string (password), **required** (**a secret: shown once, never logged**)
- `code`, string, **required** — the emailed six-digit code
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`AuthPair`): the result
- `access_token`, string (password), **required** — the access token, valid 7 days (15 minutes for a page's cookie session) (**a secret: shown once, never logged**)
- `expires_in`, integer, **required** — seconds until the access token expires, from when it was issued: refresh before then
- `refresh_token`, string (password) — the refresh token, valid 30 days, usable once; absent for a page's cookie session (it is in the cookie) (**a secret: shown once, never logged**)
- `user`, object, **required**
- `lang`, string — the account's language (`PUT /auth/language`): its notifications and the texts shown when a request names none; on `GET /auth/me` (one of `ro`, `en`)
- `id`, string, **required**
- `email`, string, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `display_name`, string
- `personal_info_complete`, boolean, **required**
- `created_at`, string, **required**
- `profile_complete`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `invalid-token`, `session-expired` | invalid-token or session-expired (start the login again) |
| 403 | `origin-refused` | origin-refused (the cookie session asked for from another origin) |
| 422 | `invalid-code`, `invalid-totp` | invalid-code (the emailed code) or invalid-totp (the second factor) |
| 429 | `rate-limited` | rate-limited (too many wrong codes from your network this hour: only that network is refused; finish from another network, or later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/login/verify' \
-H "Content-Type: application/json" \
-d '{"token":"","code":""}'
```
With the CLI ([`weird login`](/cli/login/)):
```terminal
$ weird login
```
## Revoke the current session {#logout}
`POST /auth/logout` · operation `logout`
Ends the session the access token belongs to: its access and refresh tokens stop working at once. Cannot be undone: log in again. Other sessions and API keys are untouched. From a page, with the header `X-Weird-Session: cookie` from the application's origin, the answer also clears the refresh cookie; that header from any other origin is answered 403 `origin-refused` (the session is ended all the same). This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Weird-Session` | header | string | no | `cookie` from a page of the customer application (its own origin only, else 403 `origin-refused`): the refresh token travels in the HttpOnly cookie `__Secure-weird_refresh` (Secure, SameSite=Strict, Path=/auth, 30 days), never in a body or an answer; the access token of such a session lives 15 minutes. Absent: the token pair travels in the bodies. |
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `origin-refused` | origin-refused |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/logout' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"
```
With the CLI ([`weird logout`](/cli/logout/)):
```terminal
$ weird logout
```
## Revoke every session of the account {#logoutAll}
`POST /auth/logout-all` · operation `logoutAll`
Every session, the current one included, and every OAuth grant the account gave (`grants_revoked`): a third party's tokens do not outlive it. From a page, with the header `X-Weird-Session: cookie` from the application's origin, the answer also clears the refresh cookie; that header from any other origin is answered 403 `origin-refused` (the sessions are ended all the same). This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Weird-Session` | header | string | no | `cookie` from a page of the customer application (its own origin only, else 403 `origin-refused`): the refresh token travels in the HttpOnly cookie `__Secure-weird_refresh` (Secure, SameSite=Strict, Path=/auth, 30 days), never in a body or an answer; the access token of such a session lives 15 minutes. Absent: the token pair travels in the bodies. |
**Answer 200** (`Revoked`): the result
- `ok`, boolean, **required**
- `revoked`, integer, **required** — the sessions revoked
- `grants_revoked`, integer — the OAuth grants revoked (logout-all only)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `origin-refused` | origin-refused |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/logout-all' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"
```
With the CLI ([`weird logout`](/cli/logout/), [`weird sessions revoke`](/cli/sessions/#weird-sessions-revoke)):
```terminal
$ weird logout
$ weird sessions revoke []
```
## Revoke every other session of the account {#logoutOthers}
`POST /auth/logout-others` · operation `logoutOthers`
Ends every session of the account except the caller's own (`revoked` counts them): their tokens stop working at once. Cannot be undone; API keys are untouched (revoke them with `POST /auth/api-keys/{id}/revoke`). This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Charged | no |
**Answer 200** (`Revoked`): the result
- `ok`, boolean, **required**
- `revoked`, integer, **required** — the sessions revoked
- `grants_revoked`, integer — the OAuth grants revoked (logout-all only)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/logout-others' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"
```
With the CLI ([`weird sessions revoke`](/cli/sessions/#weird-sessions-revoke)):
```terminal
$ weird sessions revoke []
```
## The caller's account {#me}
`GET /auth/me` · operation `me`
The account the credential belongs to: `id`, `email`, `display_name`, `created_at` and the completeness flags (`profile_complete` and what makes it up: complete it with `PUT /auth/profile`, the phone verification and `POST /auth/billing-profiles` before using the products that need it). Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`UserResult`): the result
- `user`, object, **required**
- `lang`, string — the account's language (`PUT /auth/language`): its notifications and the texts shown when a request names none; on `GET /auth/me` (one of `ro`, `en`)
- `id`, string, **required**
- `email`, string, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `display_name`, string
- `personal_info_complete`, boolean, **required**
- `created_at`, string, **required**
- `profile_complete`, boolean, **required**
- `restriction`, one of — only on `GET /auth/me`: the account's restriction after a review, null when none
- **variant 1**: object
- `state`, string, **required** (must be `"suspended"`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `since`, string, **required**
- `contact`, string, **required** — the address to write to about it
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/me' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird account`](/cli/account/), [`weird whoami`](/cli/whoami/), [`weird account language`](/cli/account/#weird-account-language)):
```terminal
$ weird account
$ weird whoami
$ weird account language [ro|en]
```
MCP: [`weird_account`](/mcp/account/#weird_account), [`weird_account_language`](/mcp/account/#weird_account_language).
## The personal profile and the completeness flags {#getProfile}
`GET /auth/profile` · operation `getProfile`
The identification number (`cnp_fiscal_code`) is masked: every character but the last four reads `*`. The `ETag` header names the profile's version, for `If-Match` on the save. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`ProfileView`): the result
- `profile`, one of, **required**
- **variant 1**: object
- `city`, string
- `postal_code`, string
- `cnp_fiscal_code`, string — masked: every character but the last four is `*`
- `email`, string
- `country_code`, string
- `phone_verified`, boolean
- `address2`, string or null
- `name`, string
- `state_province`, string
- `updated_at`, string
- `address1`, string
- `phone`, string
- **variant 2**: null
- `completeness`, object, **required**
- `personal_info_complete`, boolean, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `profile_complete`, boolean, **required**
- `phone_required`, boolean — a verified phone is needed for this account's profile to be complete
- `phone_exempt`, boolean
- `missing`, array of strings
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (the profile cannot be read now: try again later, then contact support) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/profile' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird profile`](/cli/profile/), [`weird profile set`](/cli/profile/#weird-profile-set), [`weird domains register`](/cli/domains/#weird-domains-register)):
```terminal
$ weird profile
$ weird profile set
$ weird domains register
```
MCP: [`weird_account`](/mcp/account/#weird_account), [`weird_profile_update`](/mcp/account/#weird_profile_update).
## Save the personal profile {#updateProfile}
`PUT /auth/profile` · operation `updateProfile`
Every field validated (name 2..100, the identification number, the address, a two-letter country, an E.164 phone); a changed phone clears its verification. The answer masks the identification number like the read; one left out, or sent back masked as it was read, keeps the stored value. Optimistic concurrency: send the `ETag` of the read as `If-Match` and a profile saved in between is refused 412 instead of overwritten (no header: last write wins). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `If-Match` | header | string | no | the `ETag` of the profile as it was read (`*`: any existing profile) |
**Request body** (`PersonalProfileInput`):
- `city`, string, **required**
- `postal_code`, string, **required**
- `cnp_fiscal_code`, string — optional: the personal numeric code (CNP), needed only to register a .ro domain as a person in Romania; left out (or sent back masked as read) the stored value is kept (length 4 to 40)
- `country_code`, string, **required** — two-letter ISO 3166-1
- `address2`, string (length 0 to 200)
- `name`, string, **required** (length 2 to 100)
- `state_province`, string, **required**
- `address1`, string, **required** (length 1 to 200)
- `phone`, string, **required** — E.164 after normalization
**Answer 200** (`ProfileResult`): the result
- `profile`, object, **required**
- `city`, string
- `postal_code`, string
- `cnp_fiscal_code`, string — masked: every character but the last four is `*`
- `email`, string
- `country_code`, string
- `phone_verified`, boolean
- `address2`, string or null
- `name`, string
- `state_province`, string
- `updated_at`, string
- `address1`, string
- `phone`, string
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (the first failing rule) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 412 | `precondition-failed` | precondition-failed (the profile changed since the ETag was read) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/auth/profile' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"","address1":"","city":"","state_province":"","postal_code":"","country_code":"","phone":""}'
```
With the CLI ([`weird profile set`](/cli/profile/#weird-profile-set)):
```terminal
$ weird profile set
```
MCP: [`weird_profile_update`](/mcp/account/#weird_profile_update).
## Check the phone verification code {#phoneVerifyCheck}
`POST /auth/profile/phone/verify/check` · operation `phoneVerifyCheck`
The six-digit `code` the text message to the profile's phone carried (`POST /auth/profile/phone/verify/start` sent it): the phone becomes verified. A wrong code is 422 `invalid-code` (a few wrong codes end the verification: start again); a changed phone needs verifying again. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Request body** (`CodeBody`):
- `code`, string, **required**
**Answer 200** (`PhoneVerified`): the result
- `ok`, boolean, **required**
- `phone_verified_at`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a field is wrong: `field` names it) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 422 | `invalid-code` | invalid-code (a wrong code: check it and retry; a few wrong codes end the flow) |
| 429 | `rate-limited` | rate-limited (too many checks: wait and retry) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/profile/phone/verify/check' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"code":""}'
```
With the CLI ([`weird profile phone confirm`](/cli/profile/#weird-profile-phone-confirm), [`weird profile phone start`](/cli/profile/#weird-profile-phone-start)):
```terminal
$ weird profile phone confirm
$ weird profile phone start
```
MCP: [`weird_phone_verification`](/mcp/account/#weird_phone_verification).
## Send the phone verification code {#phoneVerifyStart}
`POST /auth/profile/phone/verify/start` · operation `phoneVerifyStart`
No body. Sends a code by SMS to the profile's phone; check it with `POST /auth/profile/phone/verify/check`. At most one code per minute and 5 per day: past that, 429 `rate-limited`. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Answer 200** (`PhoneVerificationStarted`): the result
- `ok`, boolean, **required**
- `phone`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (no profile yet, already verified, or the number cannot receive a code: correct it) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (codes cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/profile/phone/verify/start' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird profile phone start`](/cli/profile/#weird-profile-phone-start)):
```terminal
$ weird profile phone start
```
MCP: [`weird_phone_verification`](/mcp/account/#weird_phone_verification).
## Rotate a refresh token {#refresh}
`POST /auth/refresh` · operation `refresh`
Answers a new auth pair for the same session; the refresh token sent can be used only once. Keep the new refresh token: sending a refresh token that was already used ends the whole session (every token of it stops working) and the caller must log in again. From a page: send the header `X-Weird-Session: cookie` (and no body, or `{}`) from the application's origin: the refresh token is read from the cookie `__Secure-weird_refresh` (never from the body), the answer holds `access_token` and `user` and sets the cookie again (rotated); a missing, spent or revoked cookie is 401 and the answer clears it. The request must come from the application's origin (its `Origin`, else its `Referer`): any other is 403 `origin-refused`. A session signed in from a page refreshes only through its cookie, and a session of the command line only through the body. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Weird-Session` | header | string | no | `cookie` from a page of the customer application (its own origin only, else 403 `origin-refused`): the refresh token travels in the HttpOnly cookie `__Secure-weird_refresh` (Secure, SameSite=Strict, Path=/auth, 30 days), never in a body or an answer; the access token of such a session lives 15 minutes. Absent: the token pair travels in the bodies. |
**Request body** (`Refresh`), optional:
- `refresh_token`, string (password) — required unless the header X-Weird-Session: cookie asks for the page's cookie (**a secret: shown once, never logged**)
**Answer 200** (`AuthPair`): the result
- `access_token`, string (password), **required** — the access token, valid 7 days (15 minutes for a page's cookie session) (**a secret: shown once, never logged**)
- `expires_in`, integer, **required** — seconds until the access token expires, from when it was issued: refresh before then
- `refresh_token`, string (password) — the refresh token, valid 30 days, usable once; absent for a page's cookie session (it is in the cookie) (**a secret: shown once, never logged**)
- `user`, object, **required**
- `lang`, string — the account's language (`PUT /auth/language`): its notifications and the texts shown when a request names none; on `GET /auth/me` (one of `ro`, `en`)
- `id`, string, **required**
- `email`, string, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `display_name`, string
- `personal_info_complete`, boolean, **required**
- `created_at`, string, **required**
- `profile_complete`, boolean, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `invalid-token`, `token-revoked` | invalid-token or token-revoked (log in again) |
| 403 | `origin-refused` | origin-refused |
| 404 | `not-found` | not-found (the account no longer exists) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/refresh' \
-H "Content-Type: application/json" \
-d '{}'
```
## The account's second factor and the session's step-up {#securityStatus}
`GET /auth/security` · operation `securityStatus`
`second_factor_enrolled`: whether the account has an authenticator (without one, the routes that need a second factor answer 403 `enrolment-required`); `step_up_expires_at`: until when this session is stepped up (null: step up first). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`security:read`](/api/keys-and-permissions/#security-read) |
| Charged | no |
**Answer 200** (`SecurityStatus`): the result
- `second_factor_enrolled`, boolean, **required**
- `step_up_expires_at`, string or null, **required** — ISO 8601, null when the session must step up first
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/security' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird security status`](/cli/security/#weird-security-status), [`weird status`](/cli/status/)):
```terminal
$ weird security status
$ weird status
```
MCP: [`weird_security_status`](/mcp/security/#weird_security_status).
## Remove the account's second factor {#disableSecondFactor}
`POST /auth/security/disable` · operation `disableSecondFactor`
Removes the authenticator and every backup code. Needs a current authenticator code (`totp_code`) or an unused backup code (`backup_code`) IN THIS REQUEST: a session that is only stepped up is answered 403 `step-up-required`. Refused 409 `second-factor-in-use` while something rests on it (`blockers`: `sensitive-domains`, domains the account marked sensitive; `domain-grants`, access the account gave others on its domains): lift those first. The account is notified. Every route that needs a second factor then answers 403 `enrolment-required` until an authenticator is enrolled again. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`security:write`](/api/keys-and-permissions/#security-write) |
| Strong authentication | the body itself must carry `totp_code` or `backup_code`, from a session and an API key alike — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Request body** (`DisableSecondFactor`):
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`SecondFactorDisabled`): the result
- `ok`, boolean, **required**
- `second_factor_enrolled`, boolean, **required** (must be `false`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); step-up-required (no code in this request); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict`, `second-factor-in-use` | conflict (no second factor) or second-factor-in-use (with `blockers`) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/security/disable' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird security disable`](/cli/security/#weird-security-disable)):
```terminal
$ weird security disable
```
MCP: [`weird_second_factor_remove`](/mcp/security/#weird_second_factor_remove).
## Start the authenticator enrolment {#enrollStart}
`POST /auth/security/enroll/start` · operation `enrollStart`
Answers a new authenticator secret and its otpauth URI to add to an authenticator app; the account's current authenticator keeps working until the verify. An account that already has an authenticator must send its current code in the body (`totp_code` or `backup_code`). An account without one (its first authenticator) is sent a sign-in code (XXXX-XXXX) to its email address (`email_code_required` true), which the verify asks for: whoever holds only a session cannot put their own authenticator on the account. The first authenticator is enrolled from a signed-in session only, never with an API key. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`security:write`](/api/keys-and-permissions/#security-write) |
| Charged | no |
**Request body** (`StepUp`):
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`EnrolmentStarted`): the result
- `totp`, object, **required**
- `secret`, string (password), **required** — base32, 160 bits (**a secret: shown once, never logged**)
- `uri`, string, **required** — the otpauth URI
- `issuer`, string, **required**
- `email_code_required`, boolean — true for a first enrolment: a six-digit code was emailed to the account's address and the verify needs it as `email_code`
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `session-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); session-required (a first enrolment with an API key: sign in instead); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 422 | `invalid-totp` | invalid-totp (an enrolled account without a fresh code) |
| 429 | `rate-limited` | rate-limited (for a first enrolment also: too many codes emailed to the address from your network this hour) |
| 503 | `unavailable` | unavailable (email cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/security/enroll/start' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird security enroll`](/cli/security/#weird-security-enroll)):
```terminal
$ weird security enroll
```
## Verify the enrolment with the first code {#enrollVerify}
`POST /auth/security/enroll/verify` · operation `enrollVerify`
The first code the authenticator app shows for the new secret, and for a first enrolment the code emailed to the account's address (`email_code`, as mailed, XXXX-XXXX: any case, the dash optional; a few wrong codes end the enrolment: start again). The authenticator becomes the account's second factor, and the account's backup codes are replaced by the eight answered: shown once, keep them safe. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`security:write`](/api/keys-and-permissions/#security-write) |
| Charged | no |
**Request body** (`EnrolmentVerify`):
- `totp_code`, string (password), **required** — the first code the authenticator app shows for the new secret (**a secret: shown once, never logged**)
- `email_code`, string — a first enrolment (`email_code_required` true at the start): the six-digit code emailed to the account's address
**Answer 200** (`BackupCodes`): the result
- `backup_codes`, array of strings, **required** (8 to 8 items; **a secret: shown once, never logged**)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `session-expired`, `unauthorized` | unauthorized or session-expired (no enrolment in flight) |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 422 | `invalid-code`, `invalid-totp` | invalid-code (the emailed code: missing or wrong) or invalid-totp (a wrong or used authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/security/enroll/verify' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"totp_code":""}'
```
With the CLI ([`weird security enroll`](/cli/security/#weird-security-enroll)):
```terminal
$ weird security enroll
```
## The account's sessions {#listSessions}
`GET /auth/sessions` · operation `listSessions`
Newest first: the active sessions and the recently ended ones (the caller's own session always). `client` says whether a session is a page's (`browser`) or a program's holding its tokens (`token`). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:read`](/api/keys-and-permissions/#account-read) |
| Charged | no |
**Answer 200** (`SessionList`): the result
- `sessions`, array of objects, **required**
- `revoked_at`, string or null
- `id`, string, **required**
- `revoked_reason`, string or null
- `status`, string, **required** (one of `active`, `expired`, `revoked`)
- `ip`, string or null
- `current`, boolean, **required**
- `created_at`, string, **required**
- `last_used_at`, string or null
- `client`, string — `browser`: a page signed in with the refresh cookie; `token`: the command line or another program holding its tokens (one of `browser`, `token`)
- `user_agent`, string or null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/auth/sessions' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird sessions`](/cli/sessions/)):
```terminal
$ weird sessions
```
MCP: [`weird_sessions`](/mcp/account/#weird_sessions).
## Revoke one session of the account {#revokeSession}
`POST /auth/sessions/{id}/revoke` · operation `revokeSession`
Ends the session `id` (as `GET /auth/sessions` lists it): its tokens stop working at once. Cannot be undone: that device logs in again. Not the caller's, already ended or a malformed id is 404. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`account:write`](/api/keys-and-permissions/#account-write) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (not the caller's, already revoked, malformed id) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/sessions/{id}/revoke' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird sessions revoke`](/cli/sessions/#weird-sessions-revoke)):
```terminal
$ weird sessions revoke []
```
MCP: [`weird_session_revoke`](/mcp/account/#weird_session_revoke).
## Cancel a signup in flight {#signupCancel}
`POST /auth/signup/cancel` · operation `signupCancel`
Frees the resend lock of the signup the flow `token` names (`POST /auth/signup/start` answered it), so a new start for the address sends a fresh link at once. The link already emailed keeps working until it expires: the start's token is what any requester holds, so it cannot end a link in someone else's inbox (a link only ever creates the account of the address it was sent to). An unknown or expired token is 401. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Request body** (`FlowTokenBody`):
- `token`, string (password), **required** — the flow token (**a secret: shown once, never logged**)
**Answer 200** (`Ok`): the result
- `ok`, boolean, **required** (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `invalid-token`, `session-expired` | invalid-token or session-expired |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/signup/cancel' \
-H "Content-Type: application/json" \
-d '{"token":""}'
```
With the CLI ([`weird signup`](/cli/signup/)):
```terminal
$ weird signup
```
## Complete a signup from the magic link {#signupComplete}
`POST /auth/signup/complete` · operation `signupComplete`
The flow `token` and the `secret` from the emailed link, and an optional display name (2..100 characters). A wrong secret is refused 422 and never ends the link. Any live link of the address completes its signup once: the first used creates the account, the others then answer 409. Creates the account (without an authenticator: enrol one with `/auth/security/enroll/*`) and answers the auth pair with `return_to`: the page the start named (go there), or null (go to the application's home). From a page (the customer application in a browser): send the header `X-Weird-Session: cookie` from the application's origin; the answer then holds `access_token` (kept in the page's memory, valid 15 minutes) and `user`, no `refresh_token`: the refresh token is set as the cookie `__Secure-weird_refresh` (HttpOnly, Secure, SameSite=Strict, Path=/auth, valid 30 days), which the page never reads; refresh with `POST /auth/refresh` and the same header. From any other origin that header is refused 403 `origin-refused`. Without the header the answer is as described above. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `X-Weird-Session` | header | string | no | `cookie` from a page of the customer application (its own origin only, else 403 `origin-refused`): the refresh token travels in the HttpOnly cookie `__Secure-weird_refresh` (Secure, SameSite=Strict, Path=/auth, 30 days), never in a body or an answer; the access token of such a session lives 15 minutes. Absent: the token pair travels in the bodies. |
**Request body** (`SignupComplete`):
- `token`, string (password), **required** (**a secret: shown once, never logged**)
- `secret`, string (password), **required** — the secret from the emailed link: 43 base64url characters (**a secret: shown once, never logged**)
- `name`, string — the display name, optional (length 2 to 100)
**Answer 200** (`SignupCompleted`): the result
- `access_token`, string (password), **required** — the access token, valid 7 days (15 minutes for a page's cookie session) (**a secret: shown once, never logged**)
- `expires_in`, integer, **required** — seconds until the access token expires, from when it was issued: refresh before then
- `refresh_token`, string (password) — the refresh token, valid 30 days, usable once; absent for a page's cookie session (it is in the cookie) (**a secret: shown once, never logged**)
- `user`, object, **required**
- `lang`, string — the account's language (`PUT /auth/language`): its notifications and the texts shown when a request names none; on `GET /auth/me` (one of `ro`, `en`)
- `id`, string, **required**
- `email`, string, **required**
- `phone_verified`, boolean, **required**
- `billing_profile_present`, boolean, **required**
- `display_name`, string
- `personal_info_complete`, boolean, **required**
- `created_at`, string, **required**
- `profile_complete`, boolean, **required**
- `return_to`, string or null, **required** — the page the start named in `return_to` (go there now), or null: the start named none (go to the application's home)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (the name) |
| 401 | `invalid-token`, `session-expired` | invalid-token or session-expired (the link expired or was used: start again) |
| 403 | `not-available`, `origin-refused` | origin-refused (the cookie session asked for from another origin) or not-available (we cannot accept this request for these details: write to the abuse contact named in the answer) |
| 409 | `email-taken` | email-taken (the address has an account: log in instead) |
| 422 | `invalid-code` | invalid-code (a wrong secret) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/signup/complete' \
-H "Content-Type: application/json" \
-d '{"token":"","secret":""}'
```
With the CLI ([`weird signup`](/cli/signup/)):
```terminal
$ weird signup
```
## Start a signup {#signupStart}
`POST /auth/signup/start` · operation `signupStart`
Emails a sign-up link to the address. The answer is the same whether or not the address already has an account (an existing account is emailed a notice instead of a link). Answers the flow `token` that `POST /auth/signup/complete` takes with the link's secret. Starting again for the same address shortly after, from the same client, answers the same token. `delivery` says whether an email left now (`sent`) or not (`recent`): one address receives at most a few sign-up emails an hour, and past that nothing more is sent, but every link sent lives at least an hour, so the most recent one in the inbox (spam folder included) still works. One client network starts a limited number of sign-ups an hour: past it the answer is 429 `rate-limited`; wait and retry. An optional `return_to` names the page of the customer application to come back to after the link is used (a gift's claim page, say): it is kept with the sign-up, never put in the email, and answered by `POST /auth/signup/complete`; a malformed one is refused 400 `invalid-params` whether or not the address has an account. Starting again from the same client within the minute that answers the same token replaces that sign-up's `return_to` with the new one (the latest wins, none included); any other start has its own link and its own `return_to`. This call is not charged.
| | |
|---|---|
| Credential | none: anyone may call it (`x-weird-auth: public`) |
| Charged | no |
**Request body** (`SignupStart`):
- `email`, string (email), **required**
- `return_to`, string or null — optional: the page of the customer application to come back to once the emailed link is used (the gift claim page `/claim-gift?token=...`, or the page a signed-out visitor was sent to sign in from), answered by `POST /auth/signup/complete` and never put in the email. A path of the application's own origin with an optional query: one leading `/` (never `//`), then unreserved characters (`A-Z a-z 0-9 - . _ ~`), `/` and percent escapes (`%XX`) in the path, the same plus `=`, `&` and `+` in the query; no scheme, host, backslash, fragment, empty or dot segment, whitespace or control character; at most 512 characters. Anything else is refused 400 `invalid-params`. (length 0 to 512)
**Answer 200** (`SignupStarted`): the result
- `token`, string (password), **required** — the signup flow token, valid as long as the emailed link (at least an hour) (**a secret: shown once, never logged**)
- `delivery`, string, **required** — `sent`: an email leaves for the address now; `recent`: nothing new was sent, because the address already received the hourly maximum of sign-up emails (or this client asked again within a minute): the most recent one is still valid, look for it in the inbox, spam folder included. The same for an address with and without an account. (one of `sent`, `recent`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (blank or malformed email, or a malformed return_to) |
| 429 | `rate-limited` | rate-limited (too many sign-ups from this client network: wait) |
| 503 | `unavailable` | unavailable (email cannot be sent now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/signup/start' \
-H "Content-Type: application/json" \
-d '{"email":""}'
```
With the CLI ([`weird signup`](/cli/signup/)):
```terminal
$ weird signup
```
## Step the session up with the second factor {#stepUp}
`POST /auth/step-up` · operation `stepUp`
A current authenticator code (`totp_code`) or an unused backup code (`backup_code`) proves the account's second factor for this session: for the next 15 minutes (`step_up_expires_at`) the routes that need a second factor (the paid and the irreversible ones) accept the session without a code in each request. This call is not charged.
| | |
|---|---|
| Credential | a session access token (a signed-in person, not an API key) (`x-weird-auth: session`) |
| Charged | no |
**Request body** (`StepUp`):
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`SteppedUp`): the result
- `ok`, boolean, **required**
- `step_up_expires_at`, string, **required** — ISO 8601: until when the session passes the strong-authentication gate
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required` | enrolment-required (the account has no authenticator) |
| 422 | `invalid-totp` | invalid-totp (a missing, wrong or replayed code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/auth/step-up' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird step-up`](/cli/step-up/)):
```terminal
$ weird step-up
```
---
# Credits and credit charges
URL: https://docs.weird.ro/api/credits/
| Operation | Method and path |
|---|---|
| [The caller's balances and spend summary](#getBalance) | `GET /credits/balance` |
| [The credit charges in force, and the next ones when announced](#getCharges) | `GET /credits/charges` |
| [The caller's credit history](#listLedger) | `GET /credits/ledger` |
| [The caller's promotional credit](#getPromotionalBalance) | `GET /credits/promotional` |
| [The caller's statement: charges grouped per day and contract](#statement) | `GET /credits/statement` |
| [The top-up limits, presets and enabled providers](#topupConfig) | `GET /credits/topup` |
| [Start a credit top-up](#startTopup) | `POST /credits/topup` |
| [A top-up order of the caller](#topupStatus) | `GET /credits/topup/{id}` |
| [The caller's orders, newest first](#listTopups) | `GET /credits/topups` |
| [The low-balance warning of the account](#getCreditWarning) | `GET /credits/warning` |
| [Change the low-balance warning of the account](#setCreditWarning) | `PUT /credits/warning` |
| [The withdrawal function: top-ups you may still withdraw from](#listWithdrawals) | `GET /credits/withdrawals` |
| [Withdraw from a top-up](#withdraw) | `POST /credits/withdrawals` |
## The caller's balances and spend summary {#getBalance}
`GET /credits/balance` · operation `getBalance`
The account's credits: `balances` per credit type, their `total`, and `spend` over the last `window_days` (the total, the average per day and `runway_days`, how long the credits last at that pace; null when nothing was spent). Top up with `POST /credits/topup`. Needs a complete profile (403 `profile-incomplete`: see `GET /auth/profile`). Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`credits:read`](/api/keys-and-permissions/#credits-read) |
| Charged | no |
**Answer 200** (`Balance`): the result
- `balances`, array of objects, **required**
- `credit_type`, string, **required**
- `balance`, string, **required** — a decimal amount as text
- `total`, string, **required** — a decimal amount as text
- `spend`, object, **required**
- `window_days`, integer, **required**
- `total`, string, **required** — a decimal amount as text
- `avg_per_day`, string, **required** — a decimal amount as text
- `runway_days`, number or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `ledger-unavailable` | ledger-unavailable (the credit account did not answer: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/balance' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits`](/cli/credits/), [`weird status`](/cli/status/)):
```terminal
$ weird credits
$ weird status
```
MCP: [`weird_status`](/mcp/guide/#weird_status), [`weird_credits_balance`](/mcp/credits/#weird_credits_balance).
## The credit charges in force, and the next ones when announced {#getCharges}
`GET /credits/charges` · operation `getCharges`
The credit charges in force (`version`, `created_at`, `effective_at`, `charges`: contract -\> rate -\> decimal credits); `pending`, the next version with its credit charges, when one is scheduled; and `upcoming`, what that scheduled change does: `version`, `effective_at`, `baseline_version`, `changed_contracts`, `increases` and `decreases` (each rate `contract`, `key`, `sub_key`, `old`, `new`) and `announced` (whether the customers it affects were told). Both are absent when nothing is scheduled. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`credits:read`](/api/keys-and-permissions/#credits-read) |
| Charged | no |
**Answer 200** (`CreditCharges`): the result
- `version`, integer, **required**
- `created_at`, string, **required**
- `effective_at`, string, **required**
- `charges`, object, **required** — contract (such as `dns.manage`, `domains.register`, `recurring.vps-hourly`, `ipfs.reads`) -\> rate -\> credits as a decimal string; an operation's `x-weird-charged` names the contract and the rate it is charged at
- each value: object — rate name (such as `per_request`, `per_year`, `per_hour`, `per_mb_hour`) -\> credits
- `pending`, object
- `version`, integer, **required**
- `effective_at`, string, **required**
- `charges`, object, **required** — contract (such as `dns.manage`, `domains.register`, `recurring.vps-hourly`, `ipfs.reads`) -\> rate -\> credits as a decimal string; an operation's `x-weird-charged` names the contract and the rate it is charged at
- each value: object — rate name (such as `per_request`, `per_year`, `per_hour`, `per_mb_hour`) -\> credits
- `upcoming`, object — the scheduled change against the credit charges in force; absent when nothing is scheduled
- `version`, integer, **required**
- `effective_at`, string, **required**
- `baseline_version`, integer or null
- `changed_contracts`, array of strings, **required**
- `increases`, array of objects, **required**
- `contract`, string, **required**
- `key`, string, **required**
- `sub_key`, string or null
- `old`, string, **required** — a decimal amount as text
- `new`, string, **required** — a decimal amount as text
- `decreases`, array of objects, **required**
- `contract`, string, **required**
- `key`, string, **required**
- `sub_key`, string or null
- `old`, string, **required** — a decimal amount as text
- `new`, string, **required** — a decimal amount as text
- `announced`, boolean, **required** — whether the change's announcement was sent to the customers it affects
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable` | ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges cannot be read now: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/charges' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits charges`](/cli/credits/#weird-credits-charges), [`weird domains check`](/cli/domains/#weird-domains-check), [`weird status`](/cli/status/)):
```terminal
$ weird credits charges
$ weird domains check
$ weird status
```
MCP: [`weird_credits_charges`](/mcp/credits/#weird_credits_charges).
## The caller's credit history {#listLedger}
`GET /credits/ledger` · operation `listLedger`
Every credit entry of the account (purchases, charges, refunds, grants), newest first, cursor paginated. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`credits:read`](/api/keys-and-permissions/#credits-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `cursor` | query | string | no | an integer, the `next_cursor` of a previous page |
| `limit` | query | integer | no | an integer page size |
| `kind` | query | string | no | only entries of that kind |
| `type` | query | string | no | only entries of that credit type |
| `contract` | query | string | no | only charges of that contract |
**Answer 200** (`CreditEntryPage`): the result
- `entries`, array of objects, **required**
- `seq`, integer, **required**
- `credit_type`, string, **required**
- `promotion_kind`, string or null — a promotional grant: what kind of promotion, when known
- `id`, string, **required**
- `expires_at`, string or null — a promotional grant: when what is left of it lapses; null when never
- `promotion`, string — a promotional grant: the id of the promotion it came from (such as `domain-allowance`, the included allowance of a domain)
- `invoice_id`, string or null — purchases
- `kind`, string, **required**
- `amount`, string, **required** — a decimal amount as text
- `reason`, string or null, **required**
- `created_at`, string, **required**
- `balance_after`, string, **required** — a decimal amount as text
- `total_after`, string, **required** — a decimal amount as text
- `next_cursor`, integer or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a non-integer cursor or limit) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `ledger-unavailable` | ledger-unavailable (the credit account did not answer: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/ledger' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits history`](/cli/credits/#weird-credits-history)):
```terminal
$ weird credits history
```
MCP: [`weird_credits_history`](/mcp/credits/#weird_credits_history).
## The caller's promotional credit {#getPromotionalBalance}
`GET /credits/promotional` · operation `getPromotionalBalance`
The account's promotional credit: the balance, what is available, what is lapsing and every promotional grant that still holds credit (referral rewards among them). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`credits:read`](/api/keys-and-permissions/#credits-read) |
| Charged | no |
**Answer 200** (`PromoBalance`): the result
- `user_id`, string
- `credit_type`, string, **required** — `promo`
- `balance`, string, **required** — the promotional balance
- `available`, string, **required** — what can be spent: the balance less what is lapsing
- `lapsing`, string, **required** — past its expiry and about to leave the balance
- `deficit`, string, **required** — a decimal amount as text
- `grants`, array of objects, **required** — every grant that still holds credit, in the order it is spent (soonest expiry first)
- `seq`, integer, **required**
- `promotion`, string or null
- `reference`, string or null
- `amount`, string, **required** — a decimal amount as text
- `remaining`, string, **required** — a decimal amount as text
- `expires_at`, string or null
- `created_at`, string
- `lapsing`, boolean, **required** — past its expiry: about to leave the balance
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `ledger-unavailable` | ledger-unavailable (the credit account did not answer: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/promotional' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits promotional`](/cli/credits/#weird-credits-promotional)):
```terminal
$ weird credits promotional
```
MCP: [`weird_credits_promotional`](/mcp/credits/#weird_credits_promotional).
## The caller's statement: charges grouped per day and contract {#statement}
`GET /credits/statement` · operation `statement`
The account's credit history as a statement, newest first: the charges grouped per day, contract and resource (`charge-group`), every other entry (top-ups, refunds, grants) as it is (`entry`). `days` narrows the window; pass `next_cursor` as `cursor` for the next page. Needs a complete profile (403 `profile-incomplete`). Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`credits:read`](/api/keys-and-permissions/#credits-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `days` | query | integer | no | |
| `cursor` | query | string | no | a `YYYY-MM-DD` day, the `next_cursor` of a previous page |
**Answer 200** (`StatementPage`): the result
- `items`, array of objects, **required**
- `seq`, integer
- `resource`, object
- `type`, string
- `id`, string
- `label`, string or null
- `credit_type`, string
- `id`, string
- `count`, integer
- `invoice_id`, string or null
- `kind`, string
- `type`, string, **required** (one of `charge-group`, `entry`)
- `contract`, string
- `amount`, string — a decimal amount as text
- `reason`, string or null
- `created_at`, string
- `balance_after`, string — a decimal amount as text
- `day`, string
- `total_after`, string — a decimal amount as text
- `last_at`, string
- `next_cursor`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a field is wrong: `field` names it) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `ledger-unavailable` | ledger-unavailable (the credit account did not answer: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/statement' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits statement`](/cli/credits/#weird-credits-statement)):
```terminal
$ weird credits statement
```
MCP: [`weird_credits_statement`](/mcp/credits/#weird_credits_statement).
## The top-up limits, presets and enabled providers {#topupConfig}
`GET /credits/topup` · operation `topupConfig`
What a top-up may be: the `min` and `max` credits, the `presets`, the VAT rate, the currency, `credit_price` (the price of one credit: `net`, `vat`, `total`; null while no price of a credit is set: credits are not on sale and `POST /credits/topup` is refused with `credits-not-on-sale`), the payment `providers` the customer may choose, and the `acknowledgement` a top-up needs (its `version`, `text` and the request `fields` that must be true; the same as `GET /legal/acknowledgements` for kind `topup`, which needs no complete profile); start one with `POST /credits/topup`. Needs a complete profile (403 `profile-incomplete`). Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `lang` | query | string | no | the language of the texts answered: `ro` or `en` (any other value is refused 400 invalid-params, field lang); without it, the Accept-Language header, else the signed-in account's language, else Romanian (one of `ro`, `en`) |
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
**Answer 200** (`TopupConfig`): the result
- `min`, integer, **required**
- `max`, integer, **required**
- `vat_percent`, string, **required** — a decimal amount as text
- `presets`, array of integers, **required**
- `currency`, string, **required** (must be `"RON"`)
- `credit_price`, one of, **required** — null while no price of a credit is set: credits are not on sale (POST /credits/topup is refused 503 credits-not-on-sale)
- **variant 1**: object — the price of one credit, what a customer pays per credit bought, set by weird with the VAT rate in force: the only price; everything else is a credit charge, in credits. A purchase is priced on its whole quantity (the credits at `net`, rounded to the ban, then the VAT on that, rounded to the ban), so its total may differ by a ban from credits x `total`; a purchase keeps the price it was bought at
- `net`, string, **required** — before VAT: the price in force, two to four decimals
- `vat`, string, **required** — the VAT on it, two to four decimals
- `total`, string, **required** — VAT included, two to four decimals: what a visitor is shown first
- `currency`, string, **required** (must be `"RON"`)
- **variant 2**: null
- `providers`, array of objects, **required**
- `id`, string, **required** (one of `stripe`, `revolut`)
- `label`, string, **required**
- `acknowledgement`, object, **required**
- `kind`, string (one of `topup`, `domain-order`, `stats-detail`)
- `version`, string, **required**
- `text`, string, **required**
- `lang`, string — the language of `text`: the request's `lang`, else Accept-Language, else the account's language, else Romanian; one version covers both languages (one of `ro`, `en`)
- `fields`, array of strings, **required** — the request fields that must be true
- `standing`, boolean — true: an acceptance kept for the account, sent again only when `version` changes (detailed statistics); false: sent with every order
- `required`, string — when the fields must be sent, and what already accepted means
- `relies_on`, array of objects — the legal documents this acknowledgement relies on: `kind` (read it with `read`, GET /legal/documents/{kind}) and, in a live answer, its current `version` (null: not published yet, and the operation that asks for this acknowledgement is refused until it is)
- `kind`, string
- `read`, string
- `version`, string or null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/topup' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits topup options`](/cli/credits/#weird-credits-topup-options), [`weird credits topup`](/cli/credits/#weird-credits-topup)):
```terminal
$ weird credits topup options
$ weird credits topup [credits]
```
MCP: [`weird_topup_options`](/mcp/billing/#weird_topup_options).
## Start a credit top-up {#startTopup}
`POST /credits/topup` · operation `startTopup`
A positive whole number of credits (or its string) within the limits and an enabled provider (default the first), and the two fields of the acknowledgement, both required and both `true`: `immediate_start_requested` (you ask us to start providing the services as soon as the payment arrives, within the 14-day withdrawal period) and `withdrawal_terms_acknowledged` (you confirm the text `GET /legal/acknowledgements` returns for kind `topup`, also under `acknowledgement.text` of `GET /credits/topup` and in this operation's `x-weird-acknowledgement`: withdrawing refunds only the unused part of the top-up, and the right is lost for a service fully performed). `acknowledgement_version` may name the version you showed; a stale one is refused 409 `acknowledgement-outdated` with the current `version` and `text`. The text, its version and the time are recorded with the order and mailed in the order confirmation. Answers the quote and the checkout URL: the credits at the price of one credit in force (`credit_price` of `GET /credits/topup`), rounded to the ban, and the VAT on that net; the order records that price and VAT rate, and its invoice and any refund of it use them, whatever the price is later. Refused 503 `credits-not-on-sale` while no price of a credit is set (nothing is ordered). Nothing is charged until the checkout is paid; an unpaid order lapses. Withdraw from a paid top-up within 14 days with `POST /credits/withdrawals`.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:write`](/api/keys-and-permissions/#billing-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Acknowledgement** (kind `topup`, version `2026-11-21`): the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, all `true`, only after the person has read and accepted these words:
> I ask weird to start providing the services immediately, as soon as my payment is received, within the 14-day withdrawal period. I understand that if I withdraw from this top-up I pay for what I used until I told weird I withdraw: only the credits of this top-up I have not used are refunded, at the price I paid including VAT, and that I lose the right of withdrawal for a service once it has been fully performed.
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
**Request body** (`StartTopup`):
- `credits`, one of, **required** — a positive whole number, or its string
- **variant 1**: integer
- **variant 2**: string
- `provider`, string (one of `stripe`, `revolut`)
- `immediate_start_requested`, boolean, **required** — required, true: you ask us to start providing the services as soon as the payment arrives, within the 14-day withdrawal period (must be `true`)
- `withdrawal_terms_acknowledged`, boolean, **required** — required, true: you confirm the acknowledgement text of GET /credits/topup (acknowledgement.text) (must be `true`)
- `acknowledgement_version`, string — optional: the version of the text you showed; a stale one is refused
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`TopupStarted`): the result
- `order_ref`, string, **required**
- `total`, string, **required** — a decimal amount as text
- `credit_price`, string, **required** — the net price of one credit this order is bought at (recorded on it)
- `vat`, string, **required** — a decimal amount as text
- `currency`, string, **required** (must be `"RON"`)
- `net`, string, **required** — the credits at that price, before VAT, rounded to the ban
- `checkout_url`, string, **required**
- `vat_percent`, string, **required** — a decimal amount as text
- `credits`, integer, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (amount, provider; field immediate_start_requested or withdrawal_terms_acknowledged) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `not-available`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or not-available (we cannot accept this request for these details: write to the abuse contact named in the answer); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `acknowledgement-outdated`, `conflict` | acknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (another top-up of the account is being started) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited`, `too-many-open-orders` | rate-limited or too-many-open-orders |
| 502 | `provider-unavailable` | provider-unavailable (the payment provider did not answer: try again) |
| 503 | `company-identity-incomplete`, `credits-not-on-sale`, `payments-disabled` | payments-disabled (payments are switched off now: try again later), credits-not-on-sale (credits are not on sale now: nothing was ordered) or company-identity-incomplete (the company details are not complete: nothing was ordered) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/credits/topup' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"credits":1,"immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'
```
With the CLI ([`weird credits topup`](/cli/credits/#weird-credits-topup)):
```terminal
$ weird credits topup [credits]
```
MCP: [`weird_topup_start`](/mcp/billing/#weird_topup_start).
## A top-up order of the caller {#topupStatus}
`GET /credits/topup/{id}` · operation `topupStatus`
An open order is checked with its payment provider first, so a payment just made shows at once. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`TopupOrder`): the result
- `order_ref`, string, **required**
- `total`, string — a decimal amount as text
- `credit_price`, string or null — the net price of one credit the order was bought at, two to four decimals (recorded on the order; for an older or historical order, its net over its credits): its invoice and any refund use it, never the price in force
- `currency`, string, **required**
- `provider`, string, **required**
- `invoice_id`, string or null
- `state`, string, **required** (one of `created`, `pending`, `completed`, `failed`, `cancelled`)
- `checkout_url`, string or null — open orders only
- `created_at`, string, **required**
- `vat_percent`, string — a decimal amount as text
- `completed_at`, string or null
- `credits`, integer, **required**
- `imported`, boolean — lists only: a historical order of the previous platform (a read-only record)
- `purpose`, string (one of `topup`, `credit-gift`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/topup/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits topup status`](/cli/credits/#weird-credits-topup-status), [`weird credits topup`](/cli/credits/#weird-credits-topup)):
```terminal
$ weird credits topup status
$ weird credits topup [credits]
```
MCP: [`weird_topups`](/mcp/billing/#weird_topups).
## The caller's orders, newest first {#listTopups}
`GET /credits/topups` · operation `listTopups`
One page of the caller's orders paid through a checkout: top-ups and gifts (`purpose` `topup` or `credit-gift`), in every state, each as `GET /credits/topup/{id}` shows it plus `imported` (true for an order of the previous platform: a read-only record). `next_cursor` names the next page (null on the last). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `cursor` | query | string | no | the `next_cursor` of the previous page |
| `limit` | query | integer | no | 1 to 100, default 25 (default `25`; 1 to 100) |
| `purpose` | query | string | no | `topup` or `credit-gift`; default both |
**Answer 200** (`TopupOrderList`): the result
- `orders`, array of objects, **required**
- `order_ref`, string, **required**
- `total`, string — a decimal amount as text
- `credit_price`, string or null — the net price of one credit the order was bought at, two to four decimals (recorded on the order; for an older or historical order, its net over its credits): its invoice and any refund use it, never the price in force
- `currency`, string, **required**
- `provider`, string, **required**
- `invoice_id`, string or null
- `state`, string, **required** (one of `created`, `pending`, `completed`, `failed`, `cancelled`)
- `checkout_url`, string or null — open orders only
- `created_at`, string, **required**
- `vat_percent`, string — a decimal amount as text
- `completed_at`, string or null
- `credits`, integer, **required**
- `imported`, boolean — lists only: a historical order of the previous platform (a read-only record)
- `purpose`, string (one of `topup`, `credit-gift`)
- `next_cursor`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field cursor, limit or purpose) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/topups' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits topups`](/cli/credits/#weird-credits-topups)):
```terminal
$ weird credits topups
```
MCP: [`weird_topups`](/mcp/billing/#weird_topups).
## The low-balance warning of the account {#getCreditWarning}
`GET /credits/warning` · operation `getCreditWarning`
When the account is warned that its credits will run out: `enabled`, `runway_hours` (warned once when the credits left last fewer hours than this at the projected hourly spend; default 72), `min_balance` (also warned once when the balance falls under this amount; null: no amount), `critical_hours` (a second, stronger warning when fewer than this many hours are left: 24). `status` is what the last check saw: `level` (`none`, `low`: the first warning was sent, `critical`: the second was sent), `balance`, `burn_per_hour` (what the account is projected to be charged per hour), `estimate` (`complete`, or `partial` when a product did not answer and its charges of the last 3 hours stood in for it), `breakdown` (one entry per product: `product`, `per_hour`, `basis` and, when projected, `resources`: servers by tier, volumes and snapshots by GB, stored content by MB times copies, active DNS zones by their records, tunnels and p2p apps, each at the credit charges in effect, whatever is on hold, suspended or not billed left out; `usage`, what is billed by use such as traffic and per-request calls, is the average of its charges over the last 3 hours), `hours_left` (null when nothing is billed), `checked_at` and `notified_at`. An account is checked about every hour. A warning is not repeated until the balance has recovered above the threshold. Change it with `PUT /credits/warning`. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`notifications:read`](/api/keys-and-permissions/#notifications-read) |
| Charged | no |
**Answer 200** (`CreditWarningResult`): the result
- `warning`, object, **required**
- `enabled`, boolean, **required** — whether the account is warned
- `runway_hours`, integer, **required** — warned once when the credits left last fewer hours than this at the present hourly rate (24 to 720)
- `min_balance`, string or null, **required** — also warned once when the balance falls under this amount (a decimal string); null: no amount
- `critical_hours`, integer, **required** — the second, stronger warning is sent under this many hours left
- `status`, object, **required** — what the last check saw: before the first check `level` is `none` and every other field null
- `level`, string, **required** — none: no warning in progress; low: the first warning was sent; critical: the second was sent (one of `none`, `low`, `critical`)
- `balance`, string or null, **required** — the balance seen, two decimals; null when it was not needed
- `burn_per_hour`, string or null, **required** — the projected credits per hour: the sum of `breakdown`
- `estimate`, string or null, **required** — partial: a product did not answer and its recent charges stood in for it (one of `complete`, `partial`, `null`)
- `breakdown`, array of objects, **required** — how burn_per_hour is made up, one entry per product
- `product`, string, **required** — vps: servers, volumes and snapshots; storage: stored content; dns: active zones; tunnels; p2p: apps; usage: what is billed by use (traffic, per-request calls) (one of `vps`, `storage`, `dns`, `tunnels`, `p2p`, `usage`)
- `per_hour`, string, **required** — credits per hour
- `basis`, string, **required** — projected: from what the account holds now at the credit charges in effect; recent-average: the charges of the last 3 hours, averaged (always for usage; for a product whose service did not answer) (one of `projected`, `recent-average`)
- `resources`, integer — the billed resources counted, on a projected entry
- `hours_left`, number or null, **required** — the estimated hours the credits last; null when nothing is billed by the hour
- `checked_at`, string or null, **required**
- `notified_at`, string or null, **required** — when the last warning was sent
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/warning' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits warning`](/cli/credits/#weird-credits-warning), [`weird credits warning show`](/cli/credits/#weird-credits-warning-show)):
```terminal
$ weird credits warning
$ weird credits warning show
```
MCP: [`weird_credit_warning`](/mcp/notifications/#weird_credit_warning).
## Change the low-balance warning of the account {#setCreditWarning}
`PUT /credits/warning` · operation `setCreditWarning`
Any of `enabled` (true or false), `runway_hours` (a whole number of hours from 24 to 720) and `min_balance` (a positive amount of at most 1000000 as a decimal string with at most two decimals, or null to remove it); what is left out is kept. The new settings apply at the next check, within minutes: a lower threshold the account is already above ends a warning in progress, a higher one may send one. The warnings are emailed and shown among the notifications; they cannot be turned off in the email choices, only here. Answers the warning as `GET /credits/warning` does. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`notifications:write`](/api/keys-and-permissions/#notifications-write) |
| Charged | no |
**Request body** (`SetCreditWarning`):
- `enabled`, boolean
- `runway_hours`, integer (24 to 720)
- `min_balance`, string or null — a positive amount of at most 1000000, at most two decimals; null removes it
**Answer 200** (`CreditWarningResult`): the result
- `warning`, object, **required**
- `enabled`, boolean, **required** — whether the account is warned
- `runway_hours`, integer, **required** — warned once when the credits left last fewer hours than this at the present hourly rate (24 to 720)
- `min_balance`, string or null, **required** — also warned once when the balance falls under this amount (a decimal string); null: no amount
- `critical_hours`, integer, **required** — the second, stronger warning is sent under this many hours left
- `status`, object, **required** — what the last check saw: before the first check `level` is `none` and every other field null
- `level`, string, **required** — none: no warning in progress; low: the first warning was sent; critical: the second was sent (one of `none`, `low`, `critical`)
- `balance`, string or null, **required** — the balance seen, two decimals; null when it was not needed
- `burn_per_hour`, string or null, **required** — the projected credits per hour: the sum of `breakdown`
- `estimate`, string or null, **required** — partial: a product did not answer and its recent charges stood in for it (one of `complete`, `partial`, `null`)
- `breakdown`, array of objects, **required** — how burn_per_hour is made up, one entry per product
- `product`, string, **required** — vps: servers, volumes and snapshots; storage: stored content; dns: active zones; tunnels; p2p: apps; usage: what is billed by use (traffic, per-request calls) (one of `vps`, `storage`, `dns`, `tunnels`, `p2p`, `usage`)
- `per_hour`, string, **required** — credits per hour
- `basis`, string, **required** — projected: from what the account holds now at the credit charges in effect; recent-average: the charges of the last 3 hours, averaged (always for usage; for a product whose service did not answer) (one of `projected`, `recent-average`)
- `resources`, integer — the billed resources counted, on a projected entry
- `hours_left`, number or null, **required** — the estimated hours the credits last; null when nothing is billed by the hour
- `checked_at`, string or null, **required**
- `notified_at`, string or null, **required** — when the last warning was sent
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field enabled, runway_hours or min_balance) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/credits/warning' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird credits warning set`](/cli/credits/#weird-credits-warning-set)):
```terminal
$ weird credits warning set
```
MCP: [`weird_credit_warning_set`](/mcp/notifications/#weird_credit_warning_set).
## The withdrawal function: top-ups you may still withdraw from {#listWithdrawals}
`GET /credits/withdrawals` · operation `listWithdrawals`
Every top-up still inside its withdrawal period (`withdrawal_until`: 14 days after it was paid, or 12 months more when no acknowledgement was recorded with it, `extended_period` true), newest first, with what withdrawing from it now would refund: `refund_credits` and `refund_amount` (RON, VAT included), to the payment it was made with. The unused part of a top-up is refunded: credit that cannot be refunded (promotional, carried over, received as a gift) is used first, then purchased credit, oldest top-up first (`rule`). `withdrawal_open` false: already withdrawn from, disputed, or nothing to refund. `refunds` lists every refund of the account (withdrawals, the closing refund, goodwill refunds) and where it stands. Withdraw with `POST /credits/withdrawals`. Changes nothing. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`withdrawals:read`](/api/keys-and-permissions/#withdrawals-read) |
| Charged | no |
**Answer 200** (`WithdrawalList`): the result
- `withdrawable`, array of objects, **required**
- `order_ref`, string, **required**
- `total`, string, **required** — a decimal amount as text
- `withdrawal_until`, string or null, **required**
- `extended_period`, boolean — no acknowledgement was recorded with the order: the period is 12 months longer
- `currency`, string, **required**
- `refund_pay_by`, string or null — the latest instant a withdrawal made now would be refunded by (14 days from now); null while `withdrawal_open` is false
- `not_refundable_reason`, string or null
- `paid_at`, string or null, **required**
- `refund_amount`, string, **required** — RON, VAT included
- `withdrawal_id`, string or null
- `provider`, string or null
- `withdrawal_open`, boolean, **required** — you may withdraw from it now
- `kind`, string, **required** (one of `topup`, `gift-returned`)
- `unused_credits`, string, **required** — a decimal amount as text
- `refundable`, boolean, **required** — false: the payment is disputed
- `credits`, string, **required** — a decimal amount as text
- `refund_credits`, string, **required** — a decimal amount as text
- `refunds`, array of objects, **required**
- `order_ref`, string, **required**
- `needs_bank_details`, boolean
- `currency`, string, **required**
- `pay_by`, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
- `id`, string, **required**
- `rejection`, string or null — why the refund was not made, in plain words, when `state` is `rejected`
- `requested_at`, string
- `kind`, string, **required** (one of `withdrawal`, `closing`, `goodwill`)
- `amount`, string, **required** — RON, VAT included
- `state`, string, **required** — `awaiting-approval`: the credit is set aside and the refund is being reviewed by our team; `rejected`: not refunded (see `rejection`), the credit is back in your balance (one of `awaiting-approval`, `removing-credit`, `pending-provider`, `needs-bank-details`, `done`, `void`, `rejected`)
- `ticket_id`, string or null — the support ticket asking for your bank details
- `under_review`, boolean — true while the refund is being reviewed by our team
- `paid_via`, string or null — provider or bank, once paid
- `completed_at`, string or null
- `credits`, string, **required** — a decimal amount as text
- `rule`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (your credits cannot be read right now) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/credits/withdrawals' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird credits withdrawals`](/cli/credits/#weird-credits-withdrawals), [`weird credits withdraw`](/cli/credits/#weird-credits-withdraw)):
```terminal
$ weird credits withdrawals
$ weird credits withdraw
```
MCP: [`weird_withdrawals`](/mcp/withdrawals/#weird_withdrawals).
## Withdraw from a top-up {#withdraw}
`POST /credits/withdrawals` · operation `withdraw`
Withdraws from the contract of the top-up `order_ref` (as `GET /credits/withdrawals` lists it) within its withdrawal period, without giving a reason. The unused credit of that top-up is set aside from your balance at once (you can no longer spend it) and the refund is reviewed by our team; its price, VAT included, is refunded to the payment the top-up was made with by `pay_by` at the latest (14 days from your request); what you used before is not refunded. A payment that can no longer be refunded that way is refunded by bank transfer: we ask for your IBAN in a support ticket. You are emailed a confirmation of receipt naming that date. Answers 202 with the withdrawal (`state` `awaiting-approval` and `under_review` true while it is reviewed, then `removing-credit`, `pending-provider` once the credit is removed and the refund owed, `needs-bank-details`, `done`; `void` when the credit was used before it could be set aside; `rejected`, with `rejection` saying why in plain words, when it is not refunded: the credit is then back in your balance and you are emailed the reason). A repeat for the same top-up answers the withdrawal already made (200): it is never made twice; after a rejected one you may withdraw again within the period. Needs a current authenticator code (`totp_code`) or an unused backup code (`backup_code`) IN THIS REQUEST, from a session and an API key alike: a recent step-up is not enough (403 `step-up-required` without one; 403 `enrolment-required` while the account has no authenticator; 422 `invalid-totp` for a wrong or used code, and too many wrong codes are 429 `rate-limited` for a while). This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`withdrawals:write`](/api/keys-and-permissions/#withdrawals-write) |
| Strong authentication | the body itself must carry `totp_code` or `backup_code`, from a session and an API key alike — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
| Retry safety | a repeat is refused or changes nothing: a top-up is withdrawn from once: a repeat answers the withdrawal already made (200) and refunds nothing twice |
**Request body** (`Withdraw`):
- `order_ref`, string, **required** — the top-up to withdraw from
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`WithdrawalResult`): a withdrawal from this top-up was made already: the same answer, the refund as it stands now (nothing is refunded twice)
- `withdrawal`, object, **required**
- `order_ref`, string, **required**
- `needs_bank_details`, boolean
- `currency`, string, **required**
- `pay_by`, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
- `id`, string, **required**
- `rejection`, string or null — why the refund was not made, in plain words, when `state` is `rejected`
- `requested_at`, string
- `kind`, string, **required** (one of `withdrawal`, `closing`, `goodwill`)
- `amount`, string, **required** — RON, VAT included
- `state`, string, **required** — `awaiting-approval`: the credit is set aside and the refund is being reviewed by our team; `rejected`: not refunded (see `rejection`), the credit is back in your balance (one of `awaiting-approval`, `removing-credit`, `pending-provider`, `needs-bank-details`, `done`, `void`, `rejected`)
- `ticket_id`, string or null — the support ticket asking for your bank details
- `under_review`, boolean — true while the refund is being reviewed by our team
- `paid_via`, string or null — provider or bank, once paid
- `completed_at`, string or null
- `credits`, string, **required** — a decimal amount as text
**Answer 202** (`WithdrawalResult`): the result
- `withdrawal`, object, **required**
- `order_ref`, string, **required**
- `needs_bank_details`, boolean
- `currency`, string, **required**
- `pay_by`, string or null — the latest instant the refund is paid (for a withdrawal, 14 days from the request); null once it is final
- `id`, string, **required**
- `rejection`, string or null — why the refund was not made, in plain words, when `state` is `rejected`
- `requested_at`, string
- `kind`, string, **required** (one of `withdrawal`, `closing`, `goodwill`)
- `amount`, string, **required** — RON, VAT included
- `state`, string, **required** — `awaiting-approval`: the credit is set aside and the refund is being reviewed by our team; `rejected`: not refunded (see `rejection`), the credit is back in your balance (one of `awaiting-approval`, `removing-credit`, `pending-provider`, `needs-bank-details`, `done`, `void`, `rejected`)
- `ticket_id`, string or null — the support ticket asking for your bank details
- `under_review`, boolean — true while the refund is being reviewed by our team
- `paid_via`, string or null — provider or bank, once paid
- `completed_at`, string or null
- `credits`, string, **required** — a decimal amount as text
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field order_ref) |
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); step-up-required (no code in this request) or enrolment-required (no authenticator enrolled); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no such paid top-up of yours) |
| 409 | `conflict`, `nothing-to-refund`, `payment-disputed`, `withdrawal-period-over` | withdrawal-period-over, payment-disputed (the payment is disputed at the payment provider), nothing-to-refund (every credit of it was used) or conflict (another refund of the account is being prepared: retry) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (your credits cannot be read right now: nothing was done) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/credits/withdrawals' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"order_ref":""}'
```
With the CLI ([`weird credits withdraw`](/cli/credits/#weird-credits-withdraw)):
```terminal
$ weird credits withdraw
```
MCP: [`weird_withdraw`](/mcp/withdrawals/#weird_withdraw).
---
# Invoices
URL: https://docs.weird.ro/api/invoices/
| Operation | Method and path |
|---|---|
| [The caller's invoices, newest first](#listInvoices) | `GET /invoices` |
| [One of the caller's invoices](#getInvoice) | `GET /invoices/{id}` |
| [The PDF of one of the caller's invoices](#getInvoicePdf) | `GET /invoices/{id}/pdf` |
## The caller's invoices, newest first {#listInvoices}
`GET /invoices` · operation `listInvoices`
One page of the invoices of the caller's orders (an order has one once its invoice is issued), newest order first. `series`, `number`, `date_emitted`, `date_due` and `paid` may be null until known: `GET /invoices/{id}` completes them. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `cursor` | query | string | no | the `next_cursor` of the previous page |
| `limit` | query | integer | no | 1 to 100, default 25 (default `25`; 1 to 100) |
**Answer 200** (`InvoiceList`): the result
- `invoices`, array of objects, **required**
- `order_ref`, string, **required**
- `total`, string, **required** — a decimal amount as text
- `date_emitted`, string or null
- `paid`, boolean, **required**
- `currency`, string, **required**
- `id`, string, **required**
- `date_due`, string or null
- `number`, string or null
- `series`, string or null
- `imported`, boolean, **required** — an invoice of the previous platform
- `purpose`, string (one of `topup`, `credit-gift`)
- `next_cursor`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field cursor or limit) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/invoices' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird invoices`](/cli/invoices/)):
```terminal
$ weird invoices
```
MCP: [`weird_invoices`](/mcp/billing/#weird_invoices).
## One of the caller's invoices {#getInvoice}
`GET /invoices/{id}` · operation `getInvoice`
The invoice's own facts. An invoice belongs to the account whose order produced it; another account's, or an unknown id, is 404. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`Invoice`): the result
- `order_ref`, string, **required**
- `total`, string, **required** — a decimal amount as text
- `date_emitted`, string or null
- `paid`, boolean, **required**
- `currency`, string, **required**
- `id`, string, **required**
- `date_due`, string or null
- `number`, string or null
- `series`, string or null
- `imported`, boolean, **required** — an invoice of the previous platform
- `purpose`, string (one of `topup`, `credit-gift`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/invoices/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird invoices show`](/cli/invoices/#weird-invoices-show)):
```terminal
$ weird invoices show
```
MCP: [`weird_invoices`](/mcp/billing/#weird_invoices).
## The PDF of one of the caller's invoices {#getInvoicePdf}
`GET /invoices/{id}/pdf` · operation `getInvoicePdf`
The fiscal document itself (`application/pdf`, as an attachment named after the invoice's series and number). The refusals are JSON. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`billing:read`](/api/keys-and-permissions/#billing-read) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `id` | path | string | yes | |
**Answer 200** (`InvoicePdf`): the result — string (binary)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
| 502 | `provider-unavailable` | provider-unavailable (the document cannot be fetched now: try again later) |
| 503 | `unavailable` | unavailable (the document is not available now: try again later, then contact support) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/invoices/{id}/pdf' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird invoices download`](/cli/invoices/#weird-invoices-download)):
```terminal
$ weird invoices download
```
MCP: [`weird_invoice_download`](/mcp/billing/#weird_invoice_download).
---
# Domains
URL: https://docs.weird.ro/api/domains/
| Operation | Method and path |
|---|---|
| [The caller's domains](#listDomains) | `GET /domains` |
| [Register a domain](#registerDomain) | `POST /domains` |
| [Whether a domain can be registered](#domainAvailability) | `GET /domains/availability` |
| [One of the caller's domains, with the registry's record](#getDomain) | `GET /domains/{domain}` |
| [Turn the automatic renewal of a domain on or off](#setDomainAutoRenew) | `PUT /domains/{domain}/auto-renew` |
| [The access the caller gave on one of its registered domains](#listDomainGrants) | `GET /domains/{domain}/grants` |
| [Give another account access under one of the caller's registered domains](#createDomainGrant) | `POST /domains/{domain}/grants` |
| [Change who pays under a grant](#changeDomainGrant) | `PUT /domains/{domain}/grants/{id}` |
| [Revoke a grant](#revokeDomainGrant) | `DELETE /domains/{domain}/grants/{id}` |
| [Enable DNS hosting for a registered domain](#enableDomainHosting) | `POST /domains/{domain}/hosting` |
| [Change the nameservers of a domain at the registry](#setDomainNameservers) | `PUT /domains/{domain}/nameservers` |
| [Correct the contact details of a domain's registrant](#updateDomainRegistrant) | `PUT /domains/{domain}/registrant` |
| [Replace the registrant email of a domain transferred in](#adoptDomainRegistrantEmail) | `POST /domains/{domain}/registrant/adopt-email` |
| [Renew one of the caller's domains](#renewDomain) | `POST /domains/{domain}/renew` |
| [Mark a domain sensitive, or lift the mark](#setDomainSensitive) | `PUT /domains/{domain}/sensitive` |
| [What a change of holder of a domain costs and does](#getDomainTrade) | `GET /domains/{domain}/trade` |
| [Change the holder of a domain to the caller's own profile](#tradeDomain) | `POST /domains/{domain}/trade` |
| [Request the transfer of a domain to this registrar](#transferDomain) | `POST /domains/{domain}/transfer` |
| [Say that a domain is moving to another registrar](#requestDomainTransferOut) | `POST /domains/{domain}/transfer-out` |
| [Withdraw the intent to move a domain away](#cancelDomainTransferOut) | `DELETE /domains/{domain}/transfer-out` |
## The caller's domains {#listDomains}
`GET /domains` · operation `listDomains`
Every domain the caller registered or asked to transfer here, by name, in every state: `pending` (the registration is under way), `active` (registered), `transfer-requested`, `failed` (a registration or transfer that failed after the request was answered; its charge refunded), `transferred-out`; with the DS record last published for it and the operation still under way for it (`pending_operation`). Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:read`](/api/keys-and-permissions/#domains-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.reads per_request after
```
**Answer 200** (`DomainList`): the result
- `domains`, array of objects, **required**
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/domains' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains list`](/cli/domains/#weird-domains-list)):
```terminal
$ weird domains list
```
MCP: [`weird_domains_list`](/mcp/domains/#weird_domains_list).
## Register a domain {#registerDomain}
`POST /domains` · operation `registerDomain`
`domain` and `years` (1..10, default 1). The domain must be available (409 otherwise). The registrant is the caller as a person, from the personal profile: without one the registration is refused 400 (field `profile`); a registrant in Romania (country `RO`) needs a valid 13-digit CNP as the profile's `cnp_fiscal_code`, which the .ro registry requires (403 `cnp-required`, field `cnp_fiscal_code`, until the profile has one). Charged under the contract `domains.register`, the yearly credit charge times `years`, before the registration is ordered (402 `insufficient-funds` when the credits do not cover it, nothing ordered). A registration the registry refuses is refunded in full and the refusal answered. A registration not finished within the request answers state `pending` with its `pending_operation`: read the domain later to see it `active` (or `failed`, refunded); registering it again meanwhile is refused 409. `dnssec` reports the DS publication when the caller hosts the domain's DNS here. With `enable_hosting` true (default false) the caller's DNS zone for the domain is created and filled from its live DNS right after an `active` registration, at no further charge, answered under `hosting` (`state` `enabled`, `deferred` or `failed`; the registration stands either way, and `POST /domains/{domain}/hosting` enables hosting later). The order needs `immediate_start_requested` and `withdrawal_terms_acknowledged`, both true (400 naming the field otherwise, nothing ordered or charged): you confirm, in the words recorded with the order (version 2026-11-21): "I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned." Read the text before the order with `GET /legal/acknowledgements` (kind `domain-order`; it is also this operation's `x-weird-acknowledgement`); `acknowledgement_version` may name the version you showed: a stale one is refused 409 `acknowledgement-outdated` with the current `version` and `text`. The confirmation is emailed to you. Cost (credit charges in `GET /credits/charges`): the `per_year` credit charge of `domains.register` times `years` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.register per_year before years
```
**Acknowledgement** (kind `domain-order`, version `2026-11-21`): the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, all `true`, only after the person has read and accepted these words:
> I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned.
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`RegisterDomain`):
- `domain`, string, **required** — the domain name, such as `example.ro`
- `years`, integer (default `1`; 1 to 10)
- `enable_hosting`, boolean — opt-in: create and seed the caller's DNS zone for the domain once it is registered (default `false`)
- `immediate_start_requested`, boolean, **required** — required, true: you ask us to send the order to the registry at once, within the withdrawal period (must be `true`)
- `withdrawal_terms_acknowledged`, boolean, **required** — required, true: you confirm that once the registry has completed the order it is fully performed and can no longer be withdrawn from (the text is quoted in the operation's description) (must be `true`)
- `acknowledgement_version`, string — optional: the version of the text you showed
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
**Answer 201** (`DomainRegistered`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
- `dnssec`, object, **required**
- `state`, string, **required** (one of `in-sync`, `published`, `withdrawn`, `not-hosted`, `unsigned`, `unavailable`, `not-registered`, `pending`, `failed`)
- `ds`, one of — the DS record published at the registry after the reconciliation
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `message`, string — on `failed`: what failed; on `pending`: the operation still under way
- `hosting`, object — DNS hosting enabled for a registered domain: the caller's zone, the copy of the domain's live DNS, what the zone was seeded with, and the automatic delegation of the domain to the zone's nameserver pair (`delegation`). On a registration `state` says what happened: `enabled`, `deferred` or `failed` (with `message`); the registration stands either way. `deferred`: nothing is set up yet (no `zone`, no `delegation`) because the registration is still pending, or DNS hosting is not available now; once the registration is active, hosting is enabled and the domain delegated without another request: read the domain later (`delegation` on `GET /domains/{domain}`). `POST /domains/{domain}/hosting` answers without `state`.
- `state`, string — on a registration only: `enabled`, `deferred` (set up automatically once the registration is active) or `failed` (one of `enabled`, `deferred`, `failed`)
- `message`, string
- `delegation`, object — The automatic delegation of the domain to the nameserver pair of the zone that hosts it (a system action: nothing is charged; safe to repeat). Present whenever hosting was enabled; absent while hosting is `deferred`.
- `state`, string, **required** — `delegated`: the registry names the zone's pair (`nameservers`); the zone activates once our DNS servers see it. `pending`: ordered, not done yet. `verifying`: being verified with the registry (do not repeat meanwhile). `failed`: the registry refused it or it could not be ordered now (with `message`); the domain stays registered and it is tried again automatically. `not-hosted`: no zone of yours hosts the domain. `unavailable`: the domain is not active, or delegation is not available now. Read the domain later (`delegation`) for the outcome (one of `delegated`, `pending`, `verifying`, `failed`, `not-hosted`, `unavailable`)
- `nameservers`, array of strings — on `delegated`: the nameserver pair now set at the registry
- `message`, string — on `failed`, `verifying` or `unavailable`: what happened
- `zone`, object
- `origin`, string, **required** — the domain, lowercased and dotted
- `records`, array of objects, **required** — the apex NS records naming the pair, then the caller's records
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `suspended_at`, string or null
- `restriction`, object — on a resource held after a review: `suspended` (its account is restricted) or `blocked` (its content or hostname may not be served); the one reason code is `abuse-review`
- `state`, string, **required** (one of `suspended`, `blocked`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `decision_id`, string or null — the decision on your account that put it in place (`GET /auth/account/restrictions` lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
- `contact`, string — the abuse contact address to write to about it
- `unpaid`, one of
- **variant 1**: object — the zone's hosting hours are not paid: it is served until `stops_at`, then no DNS server answers for it (its records and keys are kept) until the account has credits again, which serves it again at once; a zone still unpaid at `deletes_at` is deleted (and the DS of a domain registered here withdrawn)
- `since`, string, **required** — the first hour that could not be charged
- `reminded_at`, string or null — when the account was told the serving would stop
- `stops_at`, string or null — when the serving stops unless the account pays
- `stopped_at`, string or null — when the serving stopped (null while it is still served)
- `deletes_at`, string or null — once the serving stopped: when the zone is deleted unless the account pays first, as the account was told (null while it is still served)
- **variant 2**: null
- `activated_at`, string or null
- `id`, string, **required**
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
- `seed`, one of
- **variant 1**: object
- `snapshot_id`, string
- `at`, string
- `mode`, string (one of `merge`, `replace`)
- `records`, integer — the records taken from the copy
- **variant 2**: null
- `domain`, string, **required**
- `default_ttl`, integer, **required**
- `state`, string, **required** — `pending`: kept, no DNS server answers for it yet (it becomes active once the domain's parent names the zone's pair; a pending zone never activated is deleted after a window and leaves the list); `active`: served and billed; `suspended`: still served and kept, not billed (the delegation was lost, the hours could not be charged, or another account's zone took the domain over), active again when the delegation check passes and, for a zone suspended for unpaid hours, once the current hour is paid (one of `pending`, `active`, `suspended`)
- `created_at`, string, **required**
- `served_at`, string or null — pending zones: since when our DNS servers answer for it before its delegation
- `nameservers`, array of strings, **required** — the zone's own pair: `.a1..` and `.a2..`
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `suspend_reason`, string or null — a suspended zone's reason: delegation-lost, billing-refused or superseded
- `zone_created`, boolean — false when the caller's existing zone was reused
- `snapshot`, one of
- **variant 1**: object
- `authoritative`, boolean, **required**
- `origin`, string, **required**
- `records`, array of objects
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `server`, string or null
- `zone_id`, string or null
- `id`, string, **required**
- `diff`, object or null — re-syncs: {added, removed, changed, against}
- `unusable_reason`, string or null — own-nameservers, no-records or capture-failed
- `errors`, array of objects, **required**
- `query`, string
- `error`, string
- `usable`, boolean, **required** — whether it can seed the zone
- `extra_names`, array of strings
- `domain`, string, **required**
- `addresses`, array of strings, **required** — their IPv4 and IPv6 addresses
- `discovered`, integer
- `axfr`, boolean, **required**
- `source`, string, **required** (one of `customer`, `resync`, `registration`)
- `taken_at`, string, **required**
- `record_count`, integer, **required**
- `nameservers`, array of strings, **required** — the domain's nameservers the copy was read from
- `ds`, array of objects — the DS records the domain's parent publishes
- `key_tag`, integer
- `algorithm`, integer
- `digest_type`, integer
- **variant 2**: null
- `seed`, one of — the seed's result, null when the zone was not seeded
- **variant 1**: object
- **variant 2**: null
- `seed_error`, string or null — why the zone was not seeded (the copy failed or is unusable, the zone is not pending)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain, years or profile; a registry refusal); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `cnp-required`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or cnp-required (field cnp_fiscal_code: a Romanian registrant without a valid CNP); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `acknowledgement-outdated`, `conflict` | acknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (the domain is not available; the caller already holds it); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (domain registration is not available now), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"domain":"","immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'
```
With the CLI ([`weird domains register`](/cli/domains/#weird-domains-register)):
```terminal
$ weird domains register
```
MCP: [`weird_domains_register`](/mcp/domains/#weird_domains_register).
## Whether a domain can be registered {#domainAvailability}
`GET /domains/availability` · operation `domainAvailability`
The registry's verdict on the domain: `available` true only when the registry reports it free, `status` the registry's own word. `allowance`: the included allowance a registration would carry each year (absent when none); for a domain that is not free, `transfer_allowance`: the one a transfer in ordered now would carry (absent when none), to show before `POST /domains/{domain}/transfer`. No complete profile needed. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:read`](/api/keys-and-permissions/#domains-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | query | string | yes | the domain name, such as `example.ro` |
**Answer 200** (`DomainAvailability`): the result
- `domain`, string, **required**
- `available`, boolean, **required**
- `status`, string or null, **required** — the registry's own word, such as `Available`
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `transfer_allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (the registry did not answer: try again later) |
| 503 | `unavailable` | unavailable (domain registration is not available now: try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/domains/availability?domain=' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains transfer in`](/cli/domains/#weird-domains-transfer-in), [`weird domains check`](/cli/domains/#weird-domains-check), [`weird domains register`](/cli/domains/#weird-domains-register)):
```terminal
$ weird domains transfer in
$ weird domains check
$ weird domains register
```
MCP: [`weird_domains_check`](/mcp/domains/#weird_domains_check).
## One of the caller's domains, with the registry's record {#getDomain}
`GET /domains/{domain}` · operation `getDomain`
The domain as listed (an operation still under way is checked first), plus `registry` (the registry's record of an `active` domain; null in any other state) and `dnssec`: this read brings the DS record at the registry in line with the caller's zone of the same domain. An active zone's DS is published when it differs from the one published last (the previous one withdrawn); a published DS is withdrawn once the caller holds no active zone for the domain; `state` says what happened (`in-sync`, `published`, `withdrawn`, `not-hosted`, `unsigned`, `unavailable`, `not-registered`, `pending`, `failed`). For an `active` domain, `renewal_allowance` is the included allowance a renewal ordered now would carry for each year renewed (absent when none): show it before `POST /domains/{domain}/renew`. Neither the read nor the DS publication is charged. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:read`](/api/keys-and-permissions/#domains-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Answer 200** (`DomainDetail`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
- `registry`, one of, **required** — the registry's record of an `active` domain; null in any other state
- **variant 1**: object
- **variant 2**: null
- `dnssec`, object, **required**
- `state`, string, **required** (one of `in-sync`, `published`, `withdrawn`, `not-hosted`, `unsigned`, `unavailable`, `not-registered`, `pending`, `failed`)
- `ds`, one of — the DS record published at the registry after the reconciliation
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `message`, string — on `failed`: what failed; on `pending`: the operation still under way
- `renewal_allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (a domain the caller does not hold; another customer's alike) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/domains/{domain}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains show`](/cli/domains/#weird-domains-show), [`weird domains nameservers`](/cli/domains/#weird-domains-nameservers), [`weird domains renew`](/cli/domains/#weird-domains-renew)):
```terminal
$ weird domains show
$ weird domains nameservers [ns1 ns2 ...]
$ weird domains renew
```
MCP: [`weird_domains_get`](/mcp/domains/#weird_domains_get).
## Turn the automatic renewal of a domain on or off {#setDomainAutoRenew}
`PUT /domains/{domain}/auto-renew` · operation `setDomainAutoRenew`
`enabled`: a boolean. With automatic renewal on (the default for every domain) the domain is renewed for one year from the account's credits 30 days before it expires, at the `domains.renew` credit charge; when the credits do not cover it nothing is renewed, the holder is emailed and it is tried again each day for as long as the registry still holds the domain for the account (past the expiry too, through the registry's grace period, while the registry accepts the renewal); a renewal the registry refuses is refunded and not ordered again for that term: keep the balance topped up. Turning it on is refused 409 while a transfer out is under way. A domain marked sensitive is refused to API keys. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`SetDomainAutoRenew`):
- `enabled`, boolean, **required**
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field enabled) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (the person denied it: start again); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (a transfer out is under way: renewal cannot be turned on until it ends) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/domains/{domain}/auto-renew' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'
```
With the CLI ([`weird domains auto-renew`](/cli/domains/#weird-domains-auto-renew)):
```terminal
$ weird domains auto-renew
```
MCP: [`weird_domains_set_auto_renew`](/mcp/domains/#weird_domains_set_auto_renew).
## The access the caller gave on one of its registered domains {#listDomainGrants}
`GET /domains/{domain}/grants` · operation `listDomainGrants`
Every grant given on the domain, newest first: pending invites, active grants and ended ones (`state`: pending, active, declined, revoked, left, lapsed). A pending or active grant whose domain is no longer the caller's (transferred out, failed) carries `inactive` true. `mirror_state` is `pending` while the last change is still being applied across the products (it completes by itself). Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`grants:read`](/api/keys-and-permissions/#grants-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Answer 200** (`DomainGrantList`): the result
- `grants`, array of objects, **required**
- `invited_email`, string, **required**
- `id`, string, **required**
- `payer`, string, **required** (one of `owner`, `grantee`, `split`)
- `owner_email`, string — on the grantee's listing
- `owner_user_id`, string, **required**
- `ended_at`, string or null
- `scopes`, array of strings, **required**
- `ended_reason`, string or null
- `mirror_state`, string, **required** (one of `synced`, `pending`)
- `domain`, string, **required**
- `accepted_at`, string or null
- `state`, string, **required** (one of `pending`, `active`, `declined`, `revoked`, `left`, `lapsed`)
- `created_at`, string, **required**
- `inactive`, boolean, **required** — pending or active, but the domain no longer holds
- `grantee_user_id`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (not a domain the caller holds) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X GET 'https://api.weird.ro/domains/{domain}/grants' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains share list`](/cli/domains/#weird-domains-share-list)):
```terminal
$ weird domains share list
```
MCP: [`weird_domain_shares`](/mcp/grants/#weird_domain_shares).
## Give another account access under one of the caller's registered domains {#createDomainGrant}
`POST /domains/{domain}/grants` · operation `createDomainGrant`
`email`: an address of the invitee's account (its login address or a verified linked one). `scopes`: a non-empty list of distinct values of `dns` (the records of the domain's hosted zone), `tunnel` (tunnels on hostnames under it), `ipfs` (IPFS gateway domains under it, with the owner's content and pins) and `vps` (servers on hostnames under it, created for the owner); registrar rights and granting access are never delegated. `payer`: who pays for the delegate's work, `owner` (the default), `grantee` or `split` (half each). The invite is `pending` until the invitee accepts it (`POST /grants/{id}/accept`). Needs a current authenticator code IN THIS REQUEST (`totp_code` or `backup_code`): access lets another account act on, and bill, this one. Not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`grants:write`](/api/keys-and-permissions/#grants-write) |
| Strong authentication | the body itself must carry `totp_code` or `backup_code`, from a session and an API key alike — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`CreateDomainGrant`):
- `email`, string, **required** — an address the invitee's account controls
- `scopes`, array of strings, **required** (1 to any items; no duplicates)
- `payer`, string (one of `owner`, `grantee`, `split`; default `"owner"`)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 201** (`DomainGrantResult`): the result
- `grant`, object, **required**
- `invited_email`, string, **required**
- `id`, string, **required**
- `payer`, string, **required** (one of `owner`, `grantee`, `split`)
- `owner_email`, string — on the grantee's listing
- `owner_user_id`, string, **required**
- `ended_at`, string or null
- `scopes`, array of strings, **required**
- `ended_reason`, string or null
- `mirror_state`, string, **required** (one of `synced`, `pending`)
- `domain`, string, **required**
- `accepted_at`, string or null
- `state`, string, **required** (one of `pending`, `active`, `declined`, `revoked`, `left`, `lapsed`)
- `created_at`, string, **required**
- `inactive`, boolean, **required** — pending or active, but the domain no longer holds
- `grantee_user_id`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field email: no account holds the address, or it is the caller's own; scopes; payer) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); access-denied (the person denied it: start again) or step-up-required (no code in this request); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (not a domain the caller holds) |
| 409 | `conflict` | conflict (the account has access already; an invite to that address is pending) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/grants' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"","scopes":["dns"]}'
```
With the CLI ([`weird domains share add`](/cli/domains/#weird-domains-share-add)):
```terminal
$ weird domains share add
```
MCP: [`weird_domain_share_add`](/mcp/grants/#weird_domain_share_add).
## Change who pays under a grant {#changeDomainGrant}
`PUT /domains/{domain}/grants/{id}` · operation `changeDomainGrant`
`payer`: `owner`, `grantee` or `split`, for a pending or active grant; hourly billing follows it from the next hour. Change it back the same way. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`grants:write`](/api/keys-and-permissions/#grants-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `id` | path | string | yes | |
**Request body** (`ChangeDomainGrant`):
- `payer`, string, **required** (one of `owner`, `grantee`, `split`)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`DomainGrantResult`): the result
- `grant`, object, **required**
- `invited_email`, string, **required**
- `id`, string, **required**
- `payer`, string, **required** (one of `owner`, `grantee`, `split`)
- `owner_email`, string — on the grantee's listing
- `owner_user_id`, string, **required**
- `ended_at`, string or null
- `scopes`, array of strings, **required**
- `ended_reason`, string or null
- `mirror_state`, string, **required** (one of `synced`, `pending`)
- `domain`, string, **required**
- `accepted_at`, string or null
- `state`, string, **required** (one of `pending`, `active`, `declined`, `revoked`, `left`, `lapsed`)
- `created_at`, string, **required**
- `inactive`, boolean, **required** — pending or active, but the domain no longer holds
- `grantee_user_id`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field payer) |
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (the grant ended) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/domains/{domain}/grants/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"payer":"owner"}'
```
With the CLI ([`weird domains share payer`](/cli/domains/#weird-domains-share-payer)):
```terminal
$ weird domains share payer
```
MCP: [`weird_domain_share_payer`](/mcp/grants/#weird_domain_share_payer).
## Revoke a grant {#revokeDomainGrant}
`DELETE /domains/{domain}/grants/{id}` · operation `revokeDomainGrant`
A pending or active grant ends at once (`revoked`): the delegate loses access immediately. What the delegate created stays the owner's, and from now the owner pays for it. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`grants:write`](/api/keys-and-permissions/#grants-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `id` | path | string | yes | |
**Answer 200** (`DomainGrantResult`): the result
- `grant`, object, **required**
- `invited_email`, string, **required**
- `id`, string, **required**
- `payer`, string, **required** (one of `owner`, `grantee`, `split`)
- `owner_email`, string — on the grantee's listing
- `owner_user_id`, string, **required**
- `ended_at`, string or null
- `scopes`, array of strings, **required**
- `ended_reason`, string or null
- `mirror_state`, string, **required** (one of `synced`, `pending`)
- `domain`, string, **required**
- `accepted_at`, string or null
- `state`, string, **required** (one of `pending`, `active`, `declined`, `revoked`, `left`, `lapsed`)
- `created_at`, string, **required**
- `inactive`, boolean, **required** — pending or active, but the domain no longer holds
- `grantee_user_id`, string or null, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `enrolment-required`, `insufficient-scope`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the route's scope: required, granted); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (an ended grant included) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
**Example**
```sh
curl -X DELETE 'https://api.weird.ro/domains/{domain}/grants/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains share revoke`](/cli/domains/#weird-domains-share-revoke)):
```terminal
$ weird domains share revoke
```
MCP: [`weird_domain_share_revoke`](/mcp/grants/#weird_domain_share_revoke).
## Enable DNS hosting for a registered domain {#enableDomainHosting}
`POST /domains/{domain}/hosting` · operation `enableDomainHosting`
For a domain the caller registered here and holds `active`: the caller's zone for it is created (an existing one is reused: `zone_created` false), the domain's live DNS is copied from its current nameservers and, when the copy is usable and the zone still pending, the zone is filled from it (records the caller already set win). A copy or fill that fails never undoes the zone: `seed_error` says why, and the copy can be taken again. Pointing the domain at the zone's `nameservers` is the caller's next step. Charged under the contract `dns.manage` like a zone creation; refunded if the new zone is deleted while still pending. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.manage` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails); the `per_entry_hour` credit charge of `recurring.dns-entry-hourly` times `records` is billed every hour while what it creates exists; the `per_answer` credit charge of `dns.traffic-hourly` is billed per use.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.manage per_request before
recurring.dns-entry-hourly per_entry_hour hourly records
dns.traffic-hourly per_answer usage
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Answer 200** (`DomainHosting`): the result
- `state`, string — on a registration only: `enabled`, `deferred` (set up automatically once the registration is active) or `failed` (one of `enabled`, `deferred`, `failed`)
- `message`, string
- `delegation`, object — The automatic delegation of the domain to the nameserver pair of the zone that hosts it (a system action: nothing is charged; safe to repeat). Present whenever hosting was enabled; absent while hosting is `deferred`.
- `state`, string, **required** — `delegated`: the registry names the zone's pair (`nameservers`); the zone activates once our DNS servers see it. `pending`: ordered, not done yet. `verifying`: being verified with the registry (do not repeat meanwhile). `failed`: the registry refused it or it could not be ordered now (with `message`); the domain stays registered and it is tried again automatically. `not-hosted`: no zone of yours hosts the domain. `unavailable`: the domain is not active, or delegation is not available now. Read the domain later (`delegation`) for the outcome (one of `delegated`, `pending`, `verifying`, `failed`, `not-hosted`, `unavailable`)
- `nameservers`, array of strings — on `delegated`: the nameserver pair now set at the registry
- `message`, string — on `failed`, `verifying` or `unavailable`: what happened
- `zone`, object
- `origin`, string, **required** — the domain, lowercased and dotted
- `records`, array of objects, **required** — the apex NS records naming the pair, then the caller's records
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `suspended_at`, string or null
- `restriction`, object — on a resource held after a review: `suspended` (its account is restricted) or `blocked` (its content or hostname may not be served); the one reason code is `abuse-review`
- `state`, string, **required** (one of `suspended`, `blocked`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `decision_id`, string or null — the decision on your account that put it in place (`GET /auth/account/restrictions` lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
- `contact`, string — the abuse contact address to write to about it
- `unpaid`, one of
- **variant 1**: object — the zone's hosting hours are not paid: it is served until `stops_at`, then no DNS server answers for it (its records and keys are kept) until the account has credits again, which serves it again at once; a zone still unpaid at `deletes_at` is deleted (and the DS of a domain registered here withdrawn)
- `since`, string, **required** — the first hour that could not be charged
- `reminded_at`, string or null — when the account was told the serving would stop
- `stops_at`, string or null — when the serving stops unless the account pays
- `stopped_at`, string or null — when the serving stopped (null while it is still served)
- `deletes_at`, string or null — once the serving stopped: when the zone is deleted unless the account pays first, as the account was told (null while it is still served)
- **variant 2**: null
- `activated_at`, string or null
- `id`, string, **required**
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
- `seed`, one of
- **variant 1**: object
- `snapshot_id`, string
- `at`, string
- `mode`, string (one of `merge`, `replace`)
- `records`, integer — the records taken from the copy
- **variant 2**: null
- `domain`, string, **required**
- `default_ttl`, integer, **required**
- `state`, string, **required** — `pending`: kept, no DNS server answers for it yet (it becomes active once the domain's parent names the zone's pair; a pending zone never activated is deleted after a window and leaves the list); `active`: served and billed; `suspended`: still served and kept, not billed (the delegation was lost, the hours could not be charged, or another account's zone took the domain over), active again when the delegation check passes and, for a zone suspended for unpaid hours, once the current hour is paid (one of `pending`, `active`, `suspended`)
- `created_at`, string, **required**
- `served_at`, string or null — pending zones: since when our DNS servers answer for it before its delegation
- `nameservers`, array of strings, **required** — the zone's own pair: `.a1..` and `.a2..`
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `suspend_reason`, string or null — a suspended zone's reason: delegation-lost, billing-refused or superseded
- `zone_created`, boolean — false when the caller's existing zone was reused
- `snapshot`, one of
- **variant 1**: object
- `authoritative`, boolean, **required**
- `origin`, string, **required**
- `records`, array of objects
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `server`, string or null
- `zone_id`, string or null
- `id`, string, **required**
- `diff`, object or null — re-syncs: {added, removed, changed, against}
- `unusable_reason`, string or null — own-nameservers, no-records or capture-failed
- `errors`, array of objects, **required**
- `query`, string
- `error`, string
- `usable`, boolean, **required** — whether it can seed the zone
- `extra_names`, array of strings
- `domain`, string, **required**
- `addresses`, array of strings, **required** — their IPv4 and IPv6 addresses
- `discovered`, integer
- `axfr`, boolean, **required**
- `source`, string, **required** (one of `customer`, `resync`, `registration`)
- `taken_at`, string, **required**
- `record_count`, integer, **required**
- `nameservers`, array of strings, **required** — the domain's nameservers the copy was read from
- `ds`, array of objects — the DS records the domain's parent publishes
- `key_tag`, integer
- `algorithm`, integer
- `digest_type`, integer
- **variant 2**: null
- `seed`, one of — the seed's result, null when the zone was not seeded
- **variant 1**: object
- **variant 2**: null
- `seed_error`, string or null — why the zone was not seeded (the copy failed or is unusable, the zone is not pending)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (not a domain of the caller) |
| 409 | `conflict` | conflict (the domain's registration is not active yet); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 451 | `hostname-blocked` | hostname-blocked (the hostname or content was blocked after a review: `reason` abuse-review; contest it through a support ticket or `contact`) |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (domain registration or DNS hosting is not available now), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/hosting' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"
```
With the CLI ([`weird domains host`](/cli/domains/#weird-domains-host)):
```terminal
$ weird domains host
```
MCP: [`weird_domains_enable_dns_hosting`](/mcp/domains/#weird_domains_enable_dns_hosting).
## Change the nameservers of a domain at the registry {#setDomainNameservers}
`PUT /domains/{domain}/nameservers` · operation `setDomainNameservers`
`nameservers`: 2 to 6 distinct host names (an internationalized name is converted to its `xn--` form). The domain must be the caller's and active, with no operation under way (409 otherwise). Not charged. A refusal by the registry is answered (a `.ro` nameserver must already exist at the registry, created by the registrar of its own domain; nameservers outside `.ro` need nothing); done answers 200 with the new `nameservers`; not finished within the request answers 202 with its `pending_operation` (`state` `verifying`: the outcome is being confirmed; do not repeat the change, read the domain later). A domain marked sensitive is refused to API keys (403 `access-denied`). Set the previous nameservers the same way to undo it.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`SetDomainNameservers`):
- `nameservers`, array of strings, **required** — distinct host names (2 to 6 items)
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Answer 202** (`Domain`): the change is still under way: `pending_operation` names it; read the domain later
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field nameservers; a registry refusal) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (a sensitive domain and an API key); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (not active, or an operation is open) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/domains/{domain}/nameservers' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"nameservers":[""]}'
```
With the CLI ([`weird domains nameservers`](/cli/domains/#weird-domains-nameservers)):
```terminal
$ weird domains nameservers [ns1 ns2 ...]
```
MCP: [`weird_domains_set_nameservers`](/mcp/domains/#weird_domains_set_nameservers).
## Correct the contact details of a domain's registrant {#updateDomainRegistrant}
`PUT /domains/{domain}/registrant` · operation `updateDomainRegistrant`
The whole set of contact details (the registry takes no partial update): `address1`, `city`, `country_code` (two letters), `phone` (an international +CC number) and `email` are required; `address2`, `address3`, `state_province`, `postal_code` and `fax` are optional. `name`, `cnp_fiscal_code`, `registration_number` and `person_type` are refused 400: they identify the holder, and a change of holder is a trade (`POST /domains/{domain}/trade`). `email` must be the account's login address or a verified linked one (`/auth/emails`; 400, field `email`, reason `email-unverified` otherwise): the registry sends the domain's authorization key to that address. The domain must be the caller's and active with no operation under way. Not charged; the expiry does not change. A refusal by the registry is answered; not finished within the request answers 202 with its `pending_operation`. A domain marked sensitive is refused to API keys.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`UpdateDomainRegistrant`):
- `city`, string, **required** (length 0 to 40)
- `fax`, string (length 0 to 20)
- `postal_code`, string (length 0 to 40)
- `email`, string, **required** — the account's own email address (length 0 to 128)
- `country_code`, string, **required** — two letters
- `address2`, string (length 0 to 128)
- `state_province`, string (length 0 to 40)
- `address1`, string, **required** (length 0 to 128)
- `phone`, string, **required** — an international +CC number (length 0 to 20)
- `address3`, string (length 0 to 128)
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Answer 202** (`Domain`): the change is still under way: read the domain later
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (the field named; a registry refusal) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (the person denied it: start again); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (not active, an operation is open, or no registrant contact on record) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/domains/{domain}/registrant' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"address1":"","city":"","country_code":"","phone":"","email":""}'
```
With the CLI ([`weird domains registrant`](/cli/domains/#weird-domains-registrant)):
```terminal
$ weird domains registrant
```
MCP: [`weird_domains_update_registrant`](/mcp/domains/#weird_domains_update_registrant).
## Replace the registrant email of a domain transferred in {#adoptDomainRegistrantEmail}
`POST /domains/{domain}/registrant/adopt-email` · operation `adoptDomainRegistrantEmail`
`email`: the account's login address or a verified linked one. A domain transferred in keeps its previous registrant contact, whose email may be the previous holder's. Allowed ONCE per domain, within 30 days of the transfer's arrival (`transferred_in_at`), and only when the registry lets the contact be read; the contact keeps its other details. Not charged. A refusal gives the one use back; an update not finished within the request answers 202 with its `pending_operation`.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`AdoptDomainRegistrantEmail`):
- `email`, string, **required**
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Answer 202** (`Domain`): the change is still under way: read the domain later
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field email; reason email-unverified; a registry refusal) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (the person denied it: start again); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (not active, an operation open, not transferred in by this account, the window over, already used, or the contact cannot be read) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/registrant/adopt-email' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":""}'
```
With the CLI ([`weird domains adopt-email`](/cli/domains/#weird-domains-adopt-email)):
```terminal
$ weird domains adopt-email
```
MCP: [`weird_domains_adopt_registrant_email`](/mcp/domains/#weird_domains_adopt_registrant_email).
## Renew one of the caller's domains {#renewDomain}
`POST /domains/{domain}/renew` · operation `renewDomain`
`years` (1..10, default 1). The domain must be the caller's and active, with no operation under way, and the registry must accept a renewal now (409 otherwise). Charged under the contract `domains.renew`, the yearly credit charge times `years`, before the renewal is ordered; a refused renewal is refunded in full. One not finished within the request is answered with its `pending_operation`: read the domain later. A renewal cannot be undone: the years bought are not refunded. The order needs `immediate_start_requested` and `withdrawal_terms_acknowledged`, both true (400 naming the field otherwise, nothing ordered or charged): you confirm, in the words recorded with the order (version 2026-11-21): "I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned." Read the text before the order with `GET /legal/acknowledgements` (kind `domain-order`; it is also this operation's `x-weird-acknowledgement`); `acknowledgement_version` may name the version you showed: a stale one is refused 409 `acknowledgement-outdated` with the current `version` and `text`. The confirmation is emailed to you. Cost (credit charges in `GET /credits/charges`): the `per_year` credit charge of `domains.renew` times `years` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.renew per_year before years
```
**Acknowledgement** (kind `domain-order`, version `2026-11-21`): the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, all `true`, only after the person has read and accepted these words:
> I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned.
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`RenewDomain`):
- `years`, integer (default `1`; 1 to 10)
- `immediate_start_requested`, boolean, **required** — required, true: you ask us to send the order to the registry at once, within the withdrawal period (must be `true`)
- `withdrawal_terms_acknowledged`, boolean, **required** — required, true: you confirm that once the registry has completed the order it is fully performed and can no longer be withdrawn from (the text is quoted in the operation's description) (must be `true`)
- `acknowledgement_version`, string — optional: the version of the text you showed
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
**Answer 200** (`DomainRenewed`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
- `renewed_years`, integer, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain, years, immediate_start_requested or withdrawal_terms_acknowledged; a registry refusal); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `acknowledgement-outdated`, `conflict` | acknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (not active; the registry does not accept a renewal now); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/renew' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'
```
With the CLI ([`weird domains renew`](/cli/domains/#weird-domains-renew)):
```terminal
$ weird domains renew
```
MCP: [`weird_domains_renew`](/mcp/domains/#weird_domains_renew).
## Mark a domain sensitive, or lift the mark {#setDomainSensitive}
`PUT /domains/{domain}/sensitive` · operation `setDomainSensitive`
`enabled`: a boolean. A sensitive domain is changed only from a signed-in session with a recent second factor, never with an API key (every change of it answers an API key 403 `access-denied`). Turning the mark ON is open to every caller of the route. Turning it OFF needs a session AND a current authenticator code in this very request (`totp_code` or `backup_code` in the body); a session that is only stepped up is answered 403 `step-up-required`, an API key 403 `access-denied`. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) — only when: lifting the mark (`enabled` false) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Request body** (`SetDomainSensitive`):
- `enabled`, boolean, **required**
- `totp_code`, string (password) — a fresh authenticator code: REQUIRED in the request to lift the mark (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field enabled) |
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing), access-denied (lifting the mark with an API key) or step-up-required (lifting it without a code in the request); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (the domain left or failed) |
| 422 | `invalid-totp` | invalid-totp (a wrong or used authenticator code); invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/domains/{domain}/sensitive' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'
```
With the CLI ([`weird domains protect`](/cli/domains/#weird-domains-protect)):
```terminal
$ weird domains protect
```
MCP: [`weird_domains_protect`](/mcp/domains/#weird_domains_protect).
## What a change of holder of a domain costs and does {#getDomainTrade}
`GET /domains/{domain}/trade` · operation `getDomainTrade`
For a domain the caller holds: `per_year` (a change of holder takes the registration's credit charge, contract `domains.register`, per year), `periods` (for 1 to 10 years: `charge`, the credits it would take, and the expiry a change ordered now would give, today plus the period), `warning` (the time left on the registration is NOT kept: the expiry restarts), `current_expires_at` and `trade` (the caller's last change of holder of the domain; null when none). A domain the caller does not hold is 404. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:read`](/api/keys-and-permissions/#domains-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Answer 200** (`DomainTradeQuote`): the result
- `domain`, string, **required**
- `contract`, string, **required**
- `per_year`, string, **required** — a decimal amount as text
- `periods`, array of objects, **required**
- `years`, integer, **required**
- `charge`, string, **required** — a decimal amount as text
- `expires_at`, string, **required**
- `warning`, string, **required**
- `current_expires_at`, string or null
- `trade`, one of, **required**
- **variant 1**: object
- `id`, string, **required**
- `domain`, string, **required**
- `years`, integer, **required**
- `state`, string, **required** (one of `charged`, `opening`, `awaiting-registry`, `confirming`, `cancelling`, `verifying`, `completed`, `failed`, `cancelled`)
- `error`, string or null
- `deadline_at`, string
- `created_at`, string, **required**
- `updated_at`, string, **required**
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (domain registration is not available now) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/domains/{domain}/trade' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains trade`](/cli/domains/#weird-domains-trade)):
```terminal
$ weird domains trade
```
MCP: [`weird_domains_trade_quote`](/mcp/domains/#weird_domains_trade_quote).
## Change the holder of a domain to the caller's own profile {#tradeDomain}
`POST /domains/{domain}/trade` · operation `tradeDomain`
`auth_key` (the authorization key the CURRENT registrant obtained in the registry's domain administration panel; used once, never stored) and `years` (1..10, default 1). The new registrant is the caller's own personal profile. The expiry RESTARTS on the day the registry completes the change, plus the period: the time left is lost (`GET /domains/{domain}/trade`). The credit charge of the period is taken first under the contract `domains.register`. A refusal by the registry (a wrong key, a status that forbids it, a change already open) is refunded and answered. The change then completes by itself once the registry confirms it; follow it with `GET /domains/{domain}/trade`. Without confirmation within 14 days it is cancelled and refunded. One open change of holder per domain. A domain marked sensitive is refused to API keys. The order needs `immediate_start_requested` and `withdrawal_terms_acknowledged`, both true (400 naming the field otherwise, nothing ordered or charged): you confirm, in the words recorded with the order (version 2026-11-21): "I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned." Read the text before the order with `GET /legal/acknowledgements` (kind `domain-order`; it is also this operation's `x-weird-acknowledgement`); `acknowledgement_version` may name the version you showed: a stale one is refused 409 `acknowledgement-outdated` with the current `version` and `text`. The confirmation is emailed to you. Cost (credit charges in `GET /credits/charges`): the `per_year` credit charge of `domains.register` times `years` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.register per_year before years
```
**Acknowledgement** (kind `domain-order`, version `2026-11-21`): the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, all `true`, only after the person has read and accepted these words:
> I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned.
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`TradeDomain`):
- `auth_key`, string, **required** — the authorization key from the registry's panel; never stored
- `years`, integer (1 to 10)
- `immediate_start_requested`, boolean, **required** — required, true: you ask us to send the change of registrant to the registry at once, within the withdrawal period (must be `true`)
- `withdrawal_terms_acknowledged`, boolean, **required** — required, true: you confirm the domain order acknowledgement (GET /legal/acknowledgements, kind domain-order) (must be `true`)
- `acknowledgement_version`, string — optional: the version of the text you showed
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
- `totp_code`, string (password) — a current authenticator code (the second factor) (**a secret: shown once, never logged**)
- `backup_code`, string (password) — an unused backup code, instead of the authenticator code (**a secret: shown once, never logged**)
**Answer 202** (`DomainTrade`): the result
- `id`, string, **required**
- `domain`, string, **required**
- `years`, integer, **required**
- `state`, string, **required** (one of `charged`, `opening`, `awaiting-registry`, `confirming`, `cancelling`, `verifying`, `completed`, `failed`, `cancelled`)
- `error`, string or null
- `deadline_at`, string
- `created_at`, string, **required**
- `updated_at`, string, **required**
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field auth_key, years, profile, immediate_start_requested or withdrawal_terms_acknowledged; a registry refusal); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `access-denied`, `account-suspended`, `cnp-required`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing), access-denied (the person denied it: start again) or cnp-required (field cnp_fiscal_code); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `acknowledgement-outdated`, `conflict` | acknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (not active, an operation or a trade is open); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/trade' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"auth_key":"","immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'
```
With the CLI ([`weird domains trade`](/cli/domains/#weird-domains-trade)):
```terminal
$ weird domains trade
```
MCP: [`weird_domains_trade_start`](/mcp/domains/#weird_domains_trade_start).
## Request the transfer of a domain to this registrar {#transferDomain}
`POST /domains/{domain}/transfer` · operation `transferDomain`
`auth_key`: the domain's transfer key from its current registrar. A domain that is not registered anywhere is refused 409 with nothing charged (register it instead). Charged under the contract `domains.transfer` before the transfer is requested; a refused request is refunded in full; one not finished within the request is answered with its `pending_operation`. The domain is listed as `transfer-requested` until the transfer completes at the registry. A domain already registered here is refused 409 (one of the caller's that `failed` is not). A transfer cannot be undone once the registry completes it; until then it is listed as `transfer-requested`. The order needs `immediate_start_requested` and `withdrawal_terms_acknowledged`, both true (400 naming the field otherwise, nothing ordered or charged): you confirm, in the words recorded with the order (version 2026-11-21): "I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned." Read the text before the order with `GET /legal/acknowledgements` (kind `domain-order`; it is also this operation's `x-weird-acknowledgement`); `acknowledgement_version` may name the version you showed: a stale one is refused 409 `acknowledgement-outdated` with the current `version` and `text`. The confirmation is emailed to you. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `domains.transfer` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
domains.transfer per_request before
```
**Acknowledgement** (kind `domain-order`, version `2026-11-21`): the order carries `immediate_start_requested` and `withdrawal_terms_acknowledged`, all `true`, only after the person has read and accepted these words:
> I ask weird to send this order to the .ro registry immediately, within the 14-day withdrawal period. I understand that the registration, renewal, transfer or change of registrant is fully performed once the registry has completed it, and that I then lose the right to withdraw from it; if the registry refuses it, my credits are returned.
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
| `Accept-Language` | header | string | no | honoured when the request names no `lang` (body field or query parameter): its first language the platform speaks (`ro`, `en`) by the header's own weights; else the signed-in account's language, else Romanian |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`TransferDomain`):
- `auth_key`, string, **required** — the domain's transfer key from its current registrar
- `immediate_start_requested`, boolean, **required** — required, true: you ask us to send the order to the registry at once, within the withdrawal period (must be `true`)
- `withdrawal_terms_acknowledged`, boolean, **required** — required, true: you confirm that once the registry has completed the order it is fully performed and can no longer be withdrawn from (the text is quoted in the operation's description) (must be `true`)
- `acknowledgement_version`, string — optional: the version of the text you showed
- `lang`, string — optional: the language of the text you showed (recorded with it); else the `lang` query parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one of `ro`, `en`)
**Answer 202** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain, auth_key, immediate_start_requested or withdrawal_terms_acknowledged; a registry refusal); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `acknowledgement-outdated`, `conflict` | acknowledgement-outdated (the acknowledgement text changed: the current version and text are in the answer), or conflict (the domain is already registered here); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/transfer' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"auth_key":"","immediate_start_requested":true,"withdrawal_terms_acknowledged":true}'
```
With the CLI ([`weird domains transfer in`](/cli/domains/#weird-domains-transfer-in)):
```terminal
$ weird domains transfer in
```
MCP: [`weird_domains_transfer_in`](/mcp/domains/#weird_domains_transfer_in).
## Say that a domain is moving to another registrar {#requestDomainTransferOut}
`POST /domains/{domain}/transfer-out` · operation `requestDomainTransferOut`
No body, not charged. The registrant obtains the domain's authorization key in the registry's own domain administration panel and gives it to the new registrar. This call turns the domain's automatic renewal off, withdraws the DS record published for it (`ds`: `none`, `withdrawn`, `pending` or `failed`; a domain that leaves with a DS its new DNS host does not serve stops resolving), records the intent and answers what to do next: `instructions` (`registrant-authorization-key`), `registrant_panel` (the panel's address) and `transfer_prohibited` (true when the registry currently forbids transferring this domain). The domain stays active, manageable and renewable until it has left; afterwards it is listed `transferred-out`, its automatic renewal stays off, its hosted DNS zone is exported and removed and the holder is emailed. 409 when the registry does not list the domain under this registrar.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Answer 200** (`DomainTransferOut`): the result
- `domain`, object, **required**
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
- `transfer_prohibited`, boolean, **required** — the registry currently forbids transferring this domain
- `instructions`, string or null, **required** — the identifier of what the registrant does: registrant-authorization-key (obtain the authorization key in the registry's panel and give it to the gaining registrar)
- `registrant_panel`, string or null, **required** — the address of the registry's domain administration panel
- `ds`, string, **required** — what happened to the DS record this service had published (one of `none`, `withdrawn`, `pending`, `failed`)
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (the person denied it: start again); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (not active, an operation is open, or the registry does not answer for the domain) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/domains/{domain}/transfer-out' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains transfer out`](/cli/domains/#weird-domains-transfer-out)):
```terminal
$ weird domains transfer out
```
MCP: [`weird_domains_transfer_out`](/mcp/domains/#weird_domains_transfer_out).
## Withdraw the intent to move a domain away {#cancelDomainTransferOut}
`DELETE /domains/{domain}/transfer-out` · operation `cancelDomainTransferOut`
Withdraws the recorded intent only: an authorization key the registrant already obtained stays valid at the registry. The automatic renewal stays off until it is turned on again; the DS record is published again on the next read of the domain. This call is not charged.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`domains:write`](/api/keys-and-permissions/#domains-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `domain` | path | string | yes | |
**Answer 200** (`Domain`): the result
- `delegation`, string or null — the automatic delegation to the platform's nameserver pair: pending, verifying, delegated or failed; null when none was asked
- `pending_operation`, one of, **required** — the operation still under way for the domain; null when none. Read the domain later to see its outcome
- **variant 1**: object
- `op`, string, **required** (one of `register`, `renew`, `transfer`, `nameservers`, `registrant`, `adopt-email`)
- `id`, string, **required** — the operation's id
- `state`, string, **required** — `queued`: not sent to the registry yet; `verifying`: sent, its outcome being confirmed (do not repeat the operation meanwhile) (one of `queued`, `verifying`)
- **variant 2**: null
- `expires_at`, string or null — the expiry last read from the registry; null until read
- `updated_at`, string, **required**
- `ds_published_at`, string or null, **required**
- `domain`, string, **required**
- `years`, integer or null, **required** — the period of the registration, null for a transfer
- `sensitive`, boolean — marked sensitive: its mutations are refused to API keys
- `auto_renew`, boolean — the automatic renewal switch
- `state`, string, **required** (one of `pending`, `active`, `transfer-requested`, `failed`, `transferred-out`)
- `allowance`, object — the included allowance an order carries (absent when none): promotional credits granted once a year of the registration, at its start and at each anniversary while the domain is the account's, each grant usable for `expires_after_days` days; spent before purchased credit on any product, never refunded or paid out, revoked unspent if the order is reversed. The credits are given, not sold: what they cover depends on the credit charges (GET /credits/charges).
- `credits_per_year`, string, **required** — the credits granted each year
- `years`, integer — how many yearly grants this order carries (a transfer in: one)
- `expires_after_days`, integer, **required** — how long each grant can be spent
- `promotional`, boolean, **required** — promotional credit: never refunded or paid out (must be `true`)
- `created_at`, string, **required**
- `transfer_out_requested_at`, string or null — when the holder said the domain is moving to another registrar
- `nameservers`, array of strings or null — the nameserver set last stored at the registry through this service; null when never set here
- `ds`, one of, **required** — the DS record last published at the registry
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required**
- `digest_type`, integer, **required**
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `transferred_in_at`, string or null — when a transfer to this registrar arrived; null for a domain registered or adopted here
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `access-denied`, `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or access-denied (the person denied it: start again); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (no transfer out was asked) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X DELETE 'https://api.weird.ro/domains/{domain}/transfer-out' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird domains transfer cancel`](/cli/domains/#weird-domains-transfer-cancel)):
```terminal
$ weird domains transfer cancel
```
MCP: [`weird_domains_transfer_out_cancel`](/mcp/domains/#weird_domains_transfer_out_cancel).
---
# DNS
URL: https://docs.weird.ro/api/dns/
| Operation | Method and path |
|---|---|
| [The state events of the caller's DNS zones](#listDnsEvents) | `GET /dns/events` |
| [The caller's DNS zones](#listDnsZones) | `GET /dns/zones` |
| [Create a DNS zone for a domain](#createDnsZone) | `POST /dns/zones` |
| [One of the caller's DNS zones](#getDnsZone) | `GET /dns/zones/{origin}` |
| [Delete one of the caller's DNS zones](#deleteDnsZone) | `DELETE /dns/zones/{origin}` |
| [Check the zone's delegation now](#checkDnsZoneNow) | `POST /dns/zones/{origin}/check` |
| [The DS record of one of the caller's active DNS zones](#getDnsZoneDnssec) | `GET /dns/zones/{origin}/dnssec` |
| [One of the caller's DNS zones as a zone file](#exportDnsZone) | `GET /dns/zones/{origin}/export` |
| [Replace the records of one of the caller's DNS zones with a zone file](#importDnsZone) | `PUT /dns/zones/{origin}/import` |
| [How to move the domain's DNS here without interruption](#getDnsMigrationAdvice) | `GET /dns/zones/{origin}/migration` |
| [Set one record set of one of the caller's DNS zones](#upsertDnsRecords) | `POST /dns/zones/{origin}/records` |
| [Delete the records at a name of one of the caller's DNS zones](#deleteDnsRecord) | `DELETE /dns/zones/{origin}/records/{name}` |
| [Copy the domain's DNS again and store what changed since the seed](#resyncDnsZone) | `POST /dns/zones/{origin}/resync` |
| [The newest re-sync's diff and how it would apply](#previewDnsResync) | `GET /dns/zones/{origin}/resync` |
| [Apply a re-sync's diff to the pending zone](#applyDnsResync) | `POST /dns/zones/{origin}/resync/apply` |
| [Fill a pending zone from a copy of the domain's DNS, in one write](#seedDnsZone) | `POST /dns/zones/{origin}/seed` |
| [What a seed of a pending zone from a copy would write](#previewDnsSeed) | `POST /dns/zones/{origin}/seed/preview` |
| [Copy the domain's existing DNS from its current nameservers](#takeDnsSnapshot) | `POST /dns/zones/{origin}/snapshots` |
| [The copies of the domain's DNS taken for one of the caller's zones](#listDnsSnapshots) | `GET /dns/zones/{origin}/snapshots` |
| [One copy of the domain's DNS, with its records](#getDnsSnapshot) | `GET /dns/zones/{origin}/snapshots/{id}` |
## The state events of the caller's DNS zones {#listDnsEvents}
`GET /dns/events` · operation `listDnsEvents`
The state changes of the caller's zones, oldest first, one page after the cursor: `activated` ("live with N records" or "live but empty"), `suspended`, `resumed`, `expired` (a pending zone never activated, deleted), `deleted`, `pending-reminder`, `seeded` ("seeded with N records"), `snapshot-changed`, `old-ds-present`; each with a `message` sentence. A page may hold fewer events than `limit`; keep paging with `next`. Page with `after` (the last `id` seen; `next` of the previous page). Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `after` | query | integer | no | the cursor: the last event id seen (default 0, from the start) (default `0`; at least 0) |
| `limit` | query | integer | no | the page size, 1..500 (default 100) (default `100`; 1 to 500) |
**Answer 200** (`DnsEventList`): the result
- `events`, array of objects, **required**
- `id`, integer, **required** — the event's cursor: pass the last one seen as `after`
- `at`, string, **required**
- `origin`, string, **required**
- `domain`, string, **required**
- `zone_id`, string, **required**
- `kind`, string, **required** — activated, suspended, resumed, expired, deleted, pending-reminder, seeded, snapshot-changed or old-ds-present
- `detail`, value — the event's details (a suspension's reason, the records an activation made live, the records a seed copied, ...)
- `message`, string or null — the event as a sentence: live with N records, live but empty, seeded with N records, snapshot changed, old DS present ...
- `next`, integer or null, **required** — the cursor of the next page when this one is full; null at the end
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field after or limit) |
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/events' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns events`](/cli/dns/#weird-dns-events)):
```terminal
$ weird dns events
```
MCP: [`weird_dns_events`](/mcp/dns/#weird_dns_events).
## The caller's DNS zones {#listDnsZones}
`GET /dns/zones` · operation `listDnsZones`
Every zone of the calling account, by origin, in every state, with its own nameserver pair, its records and its last delegation check. A new zone is `pending`: its records are kept, and while no other account claims the domain our DNS servers already answer for it (`serving`), so switching the registrar causes no outage; it becomes `active` (served and billed) once the domain's registrar points at the zone's pair, and `suspended` (still served, not billed) when that delegation is lost or the hours cannot be charged. A pending zone never activated is deleted after a while and leaves the list. Another customer's zone for the same domain is never listed. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Answer 200** (`DnsZoneList`): the result
- `zones`, array of objects, **required**
- `origin`, string, **required** — the domain, lowercased and dotted
- `records`, array of objects, **required** — the apex NS records naming the pair, then the caller's records
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `suspended_at`, string or null
- `restriction`, object — on a resource held after a review: `suspended` (its account is restricted) or `blocked` (its content or hostname may not be served); the one reason code is `abuse-review`
- `state`, string, **required** (one of `suspended`, `blocked`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `decision_id`, string or null — the decision on your account that put it in place (`GET /auth/account/restrictions` lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
- `contact`, string — the abuse contact address to write to about it
- `unpaid`, one of
- **variant 1**: object — the zone's hosting hours are not paid: it is served until `stops_at`, then no DNS server answers for it (its records and keys are kept) until the account has credits again, which serves it again at once; a zone still unpaid at `deletes_at` is deleted (and the DS of a domain registered here withdrawn)
- `since`, string, **required** — the first hour that could not be charged
- `reminded_at`, string or null — when the account was told the serving would stop
- `stops_at`, string or null — when the serving stops unless the account pays
- `stopped_at`, string or null — when the serving stopped (null while it is still served)
- `deletes_at`, string or null — once the serving stopped: when the zone is deleted unless the account pays first, as the account was told (null while it is still served)
- **variant 2**: null
- `activated_at`, string or null
- `id`, string, **required**
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
- `seed`, one of
- **variant 1**: object
- `snapshot_id`, string
- `at`, string
- `mode`, string (one of `merge`, `replace`)
- `records`, integer — the records taken from the copy
- **variant 2**: null
- `domain`, string, **required**
- `default_ttl`, integer, **required**
- `state`, string, **required** — `pending`: kept, no DNS server answers for it yet (it becomes active once the domain's parent names the zone's pair; a pending zone never activated is deleted after a window and leaves the list); `active`: served and billed; `suspended`: still served and kept, not billed (the delegation was lost, the hours could not be charged, or another account's zone took the domain over), active again when the delegation check passes and, for a zone suspended for unpaid hours, once the current hour is paid (one of `pending`, `active`, `suspended`)
- `created_at`, string, **required**
- `served_at`, string or null — pending zones: since when our DNS servers answer for it before its delegation
- `nameservers`, array of strings, **required** — the zone's own pair: `.a1..` and `.a2..`
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `suspend_reason`, string or null — a suspended zone's reason: delegation-lost, billing-refused or superseded
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (DNS hosting did not answer: try again later) |
| 503 | `unavailable` | unavailable (DNS hosting is not available now) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/zones' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns list`](/cli/dns/#weird-dns-list)):
```terminal
$ weird dns list
```
MCP: [`weird_dns_zones_list`](/mcp/dns/#weird_dns_zones_list).
## Create a DNS zone for a domain {#createDnsZone}
`POST /dns/zones` · operation `createDnsZone`
Any account may create a zone for any domain: zones are per domain and account, so another customer holding a zone for the same domain is no obstacle, while creating a second zone of one's own for it is refused 409. An internationalized domain is accepted and answered in its `xn--` form. The zone is created `pending` with its own nameserver pair (`.a1..`, `.a2..`) as its apex NS records: point the domain at that pair at its registrar. Charged under the contract `dns.manage` (one charge per created zone); deleting the zone while it is still pending refunds that charge. Delete it with `DELETE /dns/zones/{origin}` (charged). Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.manage` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails); the `per_entry_hour` credit charge of `recurring.dns-entry-hourly` times `records` is billed every hour while what it creates exists; the `per_answer` credit charge of `dns.traffic-hourly` is billed per use.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:write`](/api/keys-and-permissions/#dns-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.manage per_request before
recurring.dns-entry-hourly per_entry_hour hourly records
dns.traffic-hourly per_answer usage
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`CreateDnsZone`):
- `domain`, string, **required** — the domain of the zone
**Answer 201** (`DnsZone`): the result
- `origin`, string, **required** — the domain, lowercased and dotted
- `records`, array of objects, **required** — the apex NS records naming the pair, then the caller's records
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `suspended_at`, string or null
- `restriction`, object — on a resource held after a review: `suspended` (its account is restricted) or `blocked` (its content or hostname may not be served); the one reason code is `abuse-review`
- `state`, string, **required** (one of `suspended`, `blocked`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `decision_id`, string or null — the decision on your account that put it in place (`GET /auth/account/restrictions` lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
- `contact`, string — the abuse contact address to write to about it
- `unpaid`, one of
- **variant 1**: object — the zone's hosting hours are not paid: it is served until `stops_at`, then no DNS server answers for it (its records and keys are kept) until the account has credits again, which serves it again at once; a zone still unpaid at `deletes_at` is deleted (and the DS of a domain registered here withdrawn)
- `since`, string, **required** — the first hour that could not be charged
- `reminded_at`, string or null — when the account was told the serving would stop
- `stops_at`, string or null — when the serving stops unless the account pays
- `stopped_at`, string or null — when the serving stopped (null while it is still served)
- `deletes_at`, string or null — once the serving stopped: when the zone is deleted unless the account pays first, as the account was told (null while it is still served)
- **variant 2**: null
- `activated_at`, string or null
- `id`, string, **required**
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
- `seed`, one of
- **variant 1**: object
- `snapshot_id`, string
- `at`, string
- `mode`, string (one of `merge`, `replace`)
- `records`, integer — the records taken from the copy
- **variant 2**: null
- `domain`, string, **required**
- `default_ttl`, integer, **required**
- `state`, string, **required** — `pending`: kept, no DNS server answers for it yet (it becomes active once the domain's parent names the zone's pair; a pending zone never activated is deleted after a window and leaves the list); `active`: served and billed; `suspended`: still served and kept, not billed (the delegation was lost, the hours could not be charged, or another account's zone took the domain over), active again when the delegation check passes and, for a zone suspended for unpaid hours, once the current hour is paid (one of `pending`, `active`, `suspended`)
- `created_at`, string, **required**
- `served_at`, string or null — pending zones: since when our DNS servers answer for it before its delegation
- `nameservers`, array of strings, **required** — the zone's own pair: `.a1..` and `.a2..`
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `suspend_reason`, string or null — a suspended zone's reason: delegation-lost, billing-refused or superseded
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field domain; with reason public-suffix, reserved-name or invalid-name for a domain that cannot be hosted; also too many pending zones: activate or delete some); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 409 | `conflict` | conflict (the caller already holds a zone for the domain); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 451 | `hostname-blocked` | hostname-blocked (the hostname or content was blocked after a review: `reason` abuse-review; contest it through a support ticket or `contact`) |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (DNS hosting is not available now), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/dns/zones' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"domain":""}'
```
With the CLI ([`weird dns create`](/cli/dns/#weird-dns-create)):
```terminal
$ weird dns create
```
MCP: [`weird_dns_zone_create`](/mcp/dns/#weird_dns_zone_create).
## One of the caller's DNS zones {#getDnsZone}
`GET /dns/zones/{origin}` · operation `getDnsZone`
The caller's zone of the domain in whatever state (`pending`, `active`, `suspended`). A delegate under a domain grant carrying `dns` reads the owner's zone (`delegated` true, `owner_user_id`) when it holds no zone of that domain itself. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
**Answer 200** (`DnsZone`): the result
- `origin`, string, **required** — the domain, lowercased and dotted
- `records`, array of objects, **required** — the apex NS records naming the pair, then the caller's records
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `suspended_at`, string or null
- `restriction`, object — on a resource held after a review: `suspended` (its account is restricted) or `blocked` (its content or hostname may not be served); the one reason code is `abuse-review`
- `state`, string, **required** (one of `suspended`, `blocked`)
- `reason`, string, **required** (must be `"abuse-review"`)
- `decision_id`, string or null — the decision on your account that put it in place (`GET /auth/account/restrictions` lists it; contest it with a support ticket naming it); null when it cannot be told which of your decisions it is
- `contact`, string — the abuse contact address to write to about it
- `unpaid`, one of
- **variant 1**: object — the zone's hosting hours are not paid: it is served until `stops_at`, then no DNS server answers for it (its records and keys are kept) until the account has credits again, which serves it again at once; a zone still unpaid at `deletes_at` is deleted (and the DS of a domain registered here withdrawn)
- `since`, string, **required** — the first hour that could not be charged
- `reminded_at`, string or null — when the account was told the serving would stop
- `stops_at`, string or null — when the serving stops unless the account pays
- `stopped_at`, string or null — when the serving stopped (null while it is still served)
- `deletes_at`, string or null — once the serving stopped: when the zone is deleted unless the account pays first, as the account was told (null while it is still served)
- **variant 2**: null
- `activated_at`, string or null
- `id`, string, **required**
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
- `seed`, one of
- **variant 1**: object
- `snapshot_id`, string
- `at`, string
- `mode`, string (one of `merge`, `replace`)
- `records`, integer — the records taken from the copy
- **variant 2**: null
- `domain`, string, **required**
- `default_ttl`, integer, **required**
- `state`, string, **required** — `pending`: kept, no DNS server answers for it yet (it becomes active once the domain's parent names the zone's pair; a pending zone never activated is deleted after a window and leaves the list); `active`: served and billed; `suspended`: still served and kept, not billed (the delegation was lost, the hours could not be charged, or another account's zone took the domain over), active again when the delegation check passes and, for a zone suspended for unpaid hours, once the current hour is paid (one of `pending`, `active`, `suspended`)
- `created_at`, string, **required**
- `served_at`, string or null — pending zones: since when our DNS servers answer for it before its delegation
- `nameservers`, array of strings, **required** — the zone's own pair: `.a1..` and `.a2..`
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `suspend_reason`, string or null — a suspended zone's reason: delegation-lost, billing-refused or superseded
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no zone of the caller for the domain; another customer's alike, in any state) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/zones/{origin}' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns records`](/cli/dns/#weird-dns-records), [`weird dns delete`](/cli/dns/#weird-dns-delete), [`weird dns delete-zone`](/cli/dns/#weird-dns-delete-zone)):
```terminal
$ weird dns records
$ weird dns delete [type]
$ weird dns delete-zone
```
MCP: [`weird_dns_zone_get`](/mcp/dns/#weird_dns_zone_get).
## Delete one of the caller's DNS zones {#deleteDnsZone}
`DELETE /dns/zones/{origin}` · operation `deleteDnsZone`
The zone and its records are deleted, in whatever state (an active or suspended zone stops being served); the domain may be created again as a new zone. Deleting a `pending` zone (never activated) refunds its creation charge in full, once; `refunded` and `refund_amount` report it. When the refund cannot be made at once the zone is deleted all the same, `refunded` is false and `refund_pending` true: the refund follows automatically. Record-write charges are not refunded, and deleting an active or suspended zone refunds nothing. The delete itself is charged under the contract `dns.zone-cancel` (see `GET /credits/charges`; it may be zero). Cannot be undone. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.zone-cancel` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:write`](/api/keys-and-permissions/#dns-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.zone-cancel per_request before
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Answer 200** (`DnsZoneDeleted`): the result
- `origin`, string, **required**
- `deleted`, boolean, **required** (must be `true`)
- `refunded`, boolean, **required** — true when the delete cancelled a pending zone and its creation charge was refunded
- `refund_amount`, string or null, **required** — the refunded amount as a decimal string; null when nothing was refunded
- `refund_pending`, boolean — present and true only when the refund could not be made at once: it follows automatically
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (DNS hosting is not available now), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (try again later) |
**Example**
```sh
curl -X DELETE 'https://api.weird.ro/dns/zones/{origin}' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)"
```
With the CLI ([`weird dns delete-zone`](/cli/dns/#weird-dns-delete-zone)):
```terminal
$ weird dns delete-zone
```
MCP: [`weird_dns_zone_delete`](/mcp/dns/#weird_dns_zone_delete).
## Check the zone's delegation now {#checkDnsZoneNow}
`POST /dns/zones/{origin}/check` · operation `checkDnsZoneNow`
After pointing the domain at the zone's pair at its registrar: checks the delegation at once instead of waiting for the next automatic check; a pending zone whose domain now points at its pair becomes active. Not charged. Safe to repeat.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:write`](/api/keys-and-permissions/#dns-write) |
| Charged | no |
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
**Answer 200** (`DnsCheckNow`): the result
- `origin`, string, **required**
- `domain`, string, **required**
- `state`, string, **required** — the zone's state before the check
- `verdict`, string or null
- `outcome`, string or null — activated, kept, pending, inconclusive ...
- `check`, one of
- **variant 1**: object — the last delegation check of the zone; null before the first
- `checked_at`, string or null, **required**
- `next_check_at`, string or null, **required**
- `verdict`, string or null, **required** — what the domain's parent answered: delegated (it names the zone's pair), not-delegated, lame or error
- `outcome`, string or null, **required** — what the last check did: activated, kept, suspended, resumed, inconclusive, pending, charge-refused (top up and the next check retries) ...
- **variant 2**: null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `account-suspended`, `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (the check cannot run now: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/dns/zones/{origin}/check' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns check`](/cli/dns/#weird-dns-check)):
```terminal
$ weird dns check
```
MCP: [`weird_dns_zone_check`](/mcp/dns/#weird_dns_zone_check).
## The DS record of one of the caller's active DNS zones {#getDnsZoneDnssec}
`GET /dns/zones/{origin}/dnssec` · operation `getDnsZoneDnssec`
Every hosted zone is DNSSEC-signed once active (algorithm 13, ECDSAP256SHA256); this is the DS record to give the domain's registrar to complete the chain of trust: the key tag, the algorithm, the digest type (2, SHA-256), the digest, and the same as one zone file line. Only an active zone answers. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
**Answer 200** (`DnsSec`): the result
- `origin`, string, **required**
- `domain`, string, **required**
- `enabled`, boolean, **required**
- `ds`, one of, **required**
- **variant 1**: object
- `key_tag`, integer, **required**
- `algorithm`, integer, **required** — 13: ECDSAP256SHA256
- `digest_type`, integer, **required** — 2: SHA-256
- `digest`, string, **required** — lowercase hex
- **variant 2**: null
- `ds_record`, string or null, **required** — the DS record as a zone file line: ` IN DS `
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no zone of the caller for the domain; another customer's alike) |
| 409 | `conflict` | conflict (the zone is pending or suspended) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/zones/{origin}/dnssec' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns dnssec`](/cli/dns/#weird-dns-dnssec)):
```terminal
$ weird dns dnssec
```
MCP: [`weird_dns_dnssec_get`](/mcp/dns/#weird_dns_dnssec_get).
## One of the caller's DNS zones as a zone file {#exportDnsZone}
`GET /dns/zones/{origin}/export` · operation `exportDnsZone`
The caller's zone of the domain, in whatever state, as an RFC 1035 zone file (the apex SOA and NS included). With an `Accept` header naming `text/dns` (or `text/plain`) the answer is the file itself, `text/dns; charset=utf-8`; otherwise the JSON object below. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
**Answer 200** (`DnsZoneExport`): the result
- `origin`, string, **required** — the zone, dotted (its A-label)
- `domain`, string, **required**
- `zone_file`, string, **required** — the zone as an RFC 1035 zone file, the apex SOA and NS included
- `records`, integer, **required** — how many records the file holds
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found (no zone of the caller for the domain; another customer's alike) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/zones/{origin}/export' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns export`](/cli/dns/#weird-dns-export)):
```terminal
$ weird dns export
```
MCP: [`weird_dns_zone_export`](/mcp/dns/#weird_dns_zone_export).
## Replace the records of one of the caller's DNS zones with a zone file {#importDnsZone}
`PUT /dns/zones/{origin}/import` · operation `importDnsZone`
REPLACES the zone's customer records with those of the RFC 1035 zone file (a record the file does not hold is gone; the apex SOA and NS are managed and skipped, as are lines that do not parse and unsupported types, all listed in `skipped`), in whatever state: the stored records of a pending zone, the served zone of an active or suspended one. The body is the file itself under `text/dns` or `text/plain`, or a JSON (or EDN) object `{"zone_file"}`. Every record passes the same rules as a record write; one refused record refuses the whole file and changes nothing. Charged under the contract `dns.manage`, like a record write. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.manage` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:write`](/api/keys-and-permissions/#dns-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.manage per_request before
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`ImportDnsZone`):
- `zone_file`, string, **required** — an RFC 1035 zone file; the same text may be sent as the body itself under `text/dns` or `text/plain`
**Answer 200** (`DnsZoneImported`): the result
- `origin`, string, **required**
- `target`, string, **required** — where the records were written: a pending zone's stored records, or an active or suspended zone's served copies (one of `pending`, `served`)
- `records`, integer, **required** — the customer records the zone now holds from the file
- `skipped`, array of objects, **required** — what the file held that was not imported: the managed apex SOA and NS, lines that do not parse, unsupported types
- `name`, string or null
- `type`, string or null
- `line`, integer or null
- `reason`, string or null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (field zone_file: a blank file, or a record refused, with reason invalid-record, cname-conflict or record-cap-exceeded); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict` | conflict (the zone changed state meanwhile: retry); conflict (the same operation is still in progress: retry shortly) |
| 415 | `unsupported-media-type` | unsupported-media-type (send the content type the operation names) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later) |
**Example**
```sh
curl -X PUT 'https://api.weird.ro/dns/zones/{origin}/import' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"zone_file":""}'
```
With the CLI ([`weird dns import`](/cli/dns/#weird-dns-import)):
```terminal
$ weird dns import
```
MCP: [`weird_dns_zone_import`](/mcp/dns/#weird_dns_zone_import).
## How to move the domain's DNS here without interruption {#getDnsMigrationAdvice}
`GET /dns/zones/{origin}/migration` · operation `getDnsMigrationAdvice`
Read now: the DS record the domain's parent publishes today (an old provider's DS left in place makes validating resolvers fail the moment the nameservers change) and the safe order of steps (remove the old DS at the current registrar, wait for its TTL, lower the TTLs a day before, switch the nameservers to the zone's pair, check now, add our DS), the TTLs of the newest copy's records and the longest one, our DS once the zone is signed, whether our servers already answer for the zone (`serving`), and `registry_managed` (whether the platform publishes the DS for the caller; false: publish the DS record at the registrar). The zone's events gain `old-ds-present` when the parent holds a DS. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.reads` is charged for each call that answers successfully, after it has answered (a refused or failed call is not charged); the calls are added up and taken from the credits every hour.
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:read`](/api/keys-and-permissions/#dns-read) |
| Charged | yes — see the charges below |
| Retry safety | a repeat makes a second one and is charged again: each successful call is charged as one request: a repeat after a lost answer is a second request and is charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.reads per_request after
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
**Answer 200** (`DnsMigrationAdvice`): the result
- `origin`, string, **required**
- `registry_managed`, boolean, **required**
- `steps`, array of objects, **required**
- `step`, string
- `text`, string
- `domain`, string, **required**
- `our_ds`, string or null — our DS record, once the zone is signed here
- `ttl`, object or null
- `longest`, integer
- `rrsets`, array of objects
- `lower_to`, integer
- `advice`, string
- `snapshot_id`, string
- `state`, string, **required**
- `nameservers`, array of strings, **required**
- `serving`, one of
- **variant 1**: object
- `state`, string, **required** — served: our DNS servers answer for the pending zone now, switching the registrar has no dark window; held: another account claims the domain (or a name above or below it), the zone is served from its activation; waiting: the platform cannot serve it yet (one of `served`, `held`, `waiting`)
- `reason`, string or null — why it is not served: claimed-elsewhere (another account claims the domain or a name above or below it), starting (served from the next publishing pass, within minutes), unavailable (the platform cannot serve it now); null when served (one of `claimed-elsewhere`, `starting`, `unavailable`, `null`)
- `since`, string or null
- **variant 2**: null
- `ds`, object, **required**
- `present`, boolean
- `records`, array of objects
- `error`, string or null
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 401 | `unauthorized` | unauthorized |
| 403 | `insufficient-scope`, `profile-incomplete`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it) or profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `unavailable` | unavailable (try again later) |
**Example**
```sh
curl -X GET 'https://api.weird.ro/dns/zones/{origin}/migration' \
-H "Authorization: Bearer $WEIRD_API_KEY"
```
With the CLI ([`weird dns move`](/cli/dns/#weird-dns-move)):
```terminal
$ weird dns move
```
MCP: [`weird_dns_migration_advice`](/mcp/dns/#weird_dns_migration_advice).
## Set one record set of one of the caller's DNS zones {#upsertDnsRecords}
`POST /dns/zones/{origin}/records` · operation `upsertDnsRecords`
`record` or `records`: one RRset (the same name, type and class), replacing the zone's records of that name, type and class wholesale: in the stored records of a pending zone, on the served zone of an active or suspended one. Types A, AAAA, CNAME, MX, TXT, SRV, CAA, NS and DS (below the apex), PTR, HTTPS, SVCB, TLSA and SSHFP; names inside the zone; class IN; ttl 1..2147483647 (default the zone's); a CNAME holds one value and never sits at the apex; the apex NS records are the zone's nameserver pair and cannot be set; `@` in a hostname data field names the zone. A record another product of the account manages (a VPS hostname, an IPFS gateway domain or name, a tunnel, a VPS app deployment), while it still holds the value that product wrote, is refused 409 `managed-record` (`managed_by`, `name`, `rrtype`, `deployment_id`): change it through that product. A delegate under a domain grant carrying `dns` writes the owner's zone, charged to the grant's payer (403 `delegate-blocked` under a sensitive domain). Charged under the contract `dns.manage`. The records replaced are not kept: send them again to restore them, or remove the set with `DELETE /dns/zones/{origin}/records/{name}`. Cost (credit charges in `GET /credits/charges`): the `per_request` credit charge of `dns.manage` is taken from the credits before it runs (402 `insufficient-funds` when they do not cover it: top up, then retry; it is refunded when the operation fails).
| | |
|---|---|
| Credential | an API key holding the permission below, or a session (`x-weird-auth: key`) |
| Permission | [`dns:write`](/api/keys-and-permissions/#dns-write) |
| Strong authentication | a session needs an authenticator enrolled and a recent proof of it (a step-up in the last 15 minutes, or `totp_code` / `backup_code` in the body); an API key is not asked — see [authentication](/api/authentication/#strong-authentication) |
| Charged | yes — see the charges below |
| Retry safety | send the `Idempotency-Key` header: a repeat with the same key answers the first answer and is not performed or charged again |
**Credit charges** (each a contract of the [list of credit charges](/guides/billing/#charges); the credit charge in force is filled in from the API):
```charged
dns.manage per_request before
```
**Parameters**
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `origin` | path | string | yes | |
| `Idempotency-Key` | header | string | no | 1..255 printable ASCII characters naming this operation. Repeating the request with the same key (on the same route, within 24 hours) answers the first answer again with the header `idempotent-replay: true`; it is not performed or charged a second time. |
**Request body** (`UpsertDnsRecords`):
- `record`, object
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
- `records`, array of objects — one RRset: the same name, type and class
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
**Answer 200** (`DnsRecords`): the result
- `origin`, string, **required**
- `records`, array of objects, **required**
- `name`, string, **required** — a name inside the zone, answered lowercased and dotted
- `type`, string, **required**
- `class`, string (default `"IN"`)
- `ttl`, integer (1 to 2147483647)
- `data`, object, **required** — the data of the type: A/AAAA {address}, CNAME/NS/PTR {name}, MX {preference, exchange}, TXT {texts}, SRV {priority, weight, port, target}, CAA {flags, tag, value}; DS (below the apex only) {key_tag, algorithm, digest_type, digest (hex)}, TLSA {usage, selector, matching_type, certificate (hex)}, SSHFP {algorithm, hash, fingerprint (hex)}, SVCB/HTTPS {priority, target_name, params?}
**Refusals** (`{"error": {"code", "message"}}`; see [errors](/api/errors/)):
| Status | Codes | When |
|---|---|---|
| 400 | `invalid-params` | invalid-params (a missing or refused record; reason invalid-record, cname-conflict or record-cap-exceeded, with the field); invalid-params (field Idempotency-Key: a malformed key, or one used for a different request) |
| 401 | `unauthorized` | unauthorized |
| 402 | `insufficient-funds` | insufficient-funds (the credits do not cover it: top up with `POST /credits/topup`, then retry) |
| 403 | `account-suspended`, `delegate-blocked`, `enrolment-required`, `insufficient-scope`, `profile-incomplete`, `step-up-required`, `terms-acceptance-required` | insufficient-scope (an API key without the scope `x-weird-scope` names: use a key that holds it), profile-incomplete (complete the profile first: `GET /auth/profile` says what is missing) or delegate-blocked (a delegate may not do this: the owner must); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: `POST /auth/step-up`, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; `contact` is the address to write to, `GET /auth/account/restrictions` says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: `required` lists them; read them with `GET /legal/documents` and accept with `POST /auth/legal/accept`) |
| 404 | `not-found` | not-found |
| 409 | `conflict`, `managed-record` | managed-record (another product manages the record), or conflict (the zone changed state meanwhile: retry); conflict (the same operation is still in progress: retry shortly) |
| 422 | `invalid-totp` | invalid-totp (a wrong or replayed authenticator code) |
| 429 | `rate-limited` | rate-limited |
| 502 | `upstream-unavailable` | upstream-unavailable (try again later) |
| 503 | `charges-not-published`, `ledger-unavailable`, `unavailable` | unavailable (try again later), ledger-unavailable (the credit account did not answer: try again later) or charges-not-published (the credit charges are not published yet: try again later) |
**Example**
```sh
curl -X POST 'https://api.weird.ro/dns/zones/{origin}/records' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'
```
With the CLI ([`weird dns set`](/cli/dns/#weird-dns-set)):
```terminal
$ weird dns set