Menu
Accounts, sign-in and keys
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.
The account's closing request#
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 |
| Charged | no |
Answer 200 (AccountClosingResult): the result
closing, object, requiredstate, string, required (one ofnone,pending,cancelled,closed)requested_at, string or null, requiredexecute_after, string or null, required — until when a pending request can be cancelled; the account is closed after itblockers, array of objects, requiredkind, 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 bypay_byat the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has beguncount, integermessage, string — what to do, for the domain kindspay_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 ofrefund_amountand of each refund'samount(must be"RON")refund_credits, string, required — a decimal amount as textrefund_amount, string, required — RON, VAT includedforfeited_credits, string, required — a decimal amount as textrefunds, array of objects, requiredorder_ref, string, requiredcredits, string, required — a decimal amount as textamount, string, required — a decimal amount as text
- variant 2: null
- variant 1: object or null
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/account/close' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account close status, weird account close):
$ weird account close status$ weird account close
MCP: weird_account_closing.
Ask for the account to be closed#
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 |
| Strong authentication | the body itself must carry totp_code or backup_code, from a session and an API key alike — see 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 (defaultfalse)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, requiredstate, string, required (one ofnone,pending,cancelled,closed)requested_at, string or null, requiredexecute_after, string or null, required — until when a pending request can be cancelled; the account is closed after itblockers, array of objects, requiredkind, 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 bypay_byat the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has beguncount, integermessage, string — what to do, for the domain kindspay_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 ofrefund_amountand of each refund'samount(must be"RON")refund_credits, string, required — a decimal amount as textrefund_amount, string, required — RON, VAT includedforfeited_credits, string, required — a decimal amount as textrefunds, array of objects, requiredorder_ref, string, requiredcredits, string, required — a decimal amount as textamount, string, required — a decimal amount as text
- variant 2: null
- variant 1: object or null
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird account closeMCP: weird_account_close.
Cancel the pending account closing#
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 |
| Charged | no |
Answer 200 (AccountClosingResult): the result
closing, object, requiredstate, string, required (one ofnone,pending,cancelled,closed)requested_at, string or null, requiredexecute_after, string or null, required — until when a pending request can be cancelled; the account is closed after itblockers, array of objects, requiredkind, 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 bypay_byat the latest), refunds-in-progress, refund-awaiting-bank-details; closing once the closing itself has beguncount, integermessage, string — what to do, for the domain kindspay_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 ofrefund_amountand of each refund'samount(must be"RON")refund_credits, string, required — a decimal amount as textrefund_amount, string, required — RON, VAT includedforfeited_credits, string, required — a decimal amount as textrefunds, array of objects, requiredorder_ref, string, requiredcredits, string, required — a decimal amount as textamount, string, required — a decimal amount as text
- variant 2: null
- variant 1: object or null
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/account/close/cancel' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account close cancel):
$ weird account close cancelMCP: weird_account_close_cancel.
Start changing the account's email address#
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 |
| Strong authentication | the body itself must carry totp_code or backup_code, from a session and an API key alike — see authentication |
| Charged | no |
Request body (EmailChangeStart):
email, string, required — the new addresstotp_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):
| 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
curl -X POST 'https://api.weird.ro/auth/account/email/start' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"<email>"}'With the CLI (weird emails primary):
$ weird emails primary <new address>MCP: weird_login_email_change.
Finish changing the account's email address#
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 |
| 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 |
| Charged | no |
Request body (EmailChangeVerify):
token, string (password), required (a secret: shown once, never logged)code, string, required — the code mailed to the new addresstotp_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, requiredemail, string, requiredsessions_revoked, integer, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/account/email/verify' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"<token>","code":"<code>"}'With the CLI (weird emails primary):
$ weird emails primary <new address>MCP: weird_login_email_change.
Ask for a copy of the data kept about the account#
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 |
| 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 |
| 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, requiredstate, string, required (one ofpreparing,ready,failed)requested_at, string, requiredready_at, string or null, requiredexpires_at, string or null, required — when a ready copy is removedsize_bytes, integer or null, requiredsha256, string or null, required — the SHA-256 of the document's JSON text, hexnext_request_at, string, required — when a new copy can be asked for
- variant 2: null
- variant 1: object
Answer 202 (DataExportResult): the result
export, one of, required- variant 1: object
id, string, requiredstate, string, required (one ofpreparing,ready,failed)requested_at, string, requiredready_at, string or null, requiredexpires_at, string or null, required — when a ready copy is removedsize_bytes, integer or null, requiredsha256, string or null, required — the SHA-256 of the document's JSON text, hexnext_request_at, string, required — when a new copy can be asked for
- variant 2: null
- variant 1: object
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird account export requestMCP: weird_data_export_request.
The state of the latest copy of the account's data#
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 |
| Charged | no |
Answer 200 (DataExportResult): the result
export, one of, required- variant 1: object
id, string, requiredstate, string, required (one ofpreparing,ready,failed)requested_at, string, requiredready_at, string or null, requiredexpires_at, string or null, required — when a ready copy is removedsize_bytes, integer or null, requiredsha256, string or null, required — the SHA-256 of the document's JSON text, hexnext_request_at, string, required — when a new copy can be asked for
- variant 2: null
- variant 1: object
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/account/export' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account export status, weird account export download):
$ weird account export status$ weird account export download
MCP: weird_data_export, weird_data_export_save.
Download the copy of the account's data#
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 |
| 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 |
| Charged | no |
Answer 200 (DataExportDocument): the result
format, string, required (must be"weird-data-export")version, integer, requiredgenerated_at, string, requiredaccount_id, string, requiredabout, string, requiredsections, array of objects, requiredid, string, required (one ofaccount,profile,billing_profiles,security,legal,notifications,support,payments,credits,referrals,domain_access,domains,resources,restrictions,data_exports)title, string, requireddescription, string, required — what the section holdspurpose, string, required — why it is keptstatus, string, required — partial: a part could not be read now; that part says so (one ofcomplete,partial)data, object, required
kept_elsewhere, array of objects, requiredwhat, string, requiredwhere, string, requiredhow_to_get, string, required
not_in_this_file, array of objects, requiredwhat, string, requiredwhy, string, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/account/export/download' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account export download):
$ weird account export downloadMCP: weird_data_export_save.
The restrictions placed on the account after a review#
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 |
| 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, requiredcontact, string, required — the address to write to about it
- variant 2: null
- variant 1: object
decisions, array of objects, requirednotified_at, string or nullstatement_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-blockedorhostname-blocked; null for an act that lifts or ends accessid, string, requiredcontested_at, string or nullground, string or nullaction, string, required (one ofsuspend,resume,block,lift,revoke-access,delete-resource,release-name)statement, string or nullreference, string, required — quote it when you write about the decisiontarget, one of- variant 1: object
kind, string (one ofcontent,hostname)value, string
- variant 2: null
- variant 1: object
ground_text, string or nulldecided_at, string, requiredcontest_ticket_id, string or null
contact, string, requiredhow_to_contest, string, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/account/restrictions' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account restrictions):
$ weird account restrictionsMCP: weird_account_restrictions.
Create an API key#
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 |
| 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 |
| 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, requiredrevoked_at, string or nullid, string, requiredkey_prefix, string, requiredname, string, requiredrevoked_reason, string or nullscopes, array of strings, requiredstatus, string, required (one ofactive,revoked)created_at, string, requiredlast_used_at, string or null
token, string (password), required —weird_..., shown once (a secret: shown once, never logged)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/api-keys' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"<name>","scopes":["<scope>"]}'With the CLI (weird keys create, weird mcp setup):
$ weird keys create$ weird mcp setup
The account's API keys#
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 |
| Charged | no |
Answer 200 (ApiKeyList): the result
api_keys, array of objects, requiredrevoked_at, string or nullid, string, requiredkey_prefix, string, requiredname, string, requiredrevoked_reason, string or nullscopes, array of strings, requiredstatus, string, required (one ofactive,revoked)created_at, string, requiredlast_used_at, string or null
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/api-keys' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird keys list, weird mcp setup):
$ weird keys list$ weird mcp setup
MCP: weird_api_keys.
Revoke an API key#
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 |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (Ok): the result
ok, boolean, required (must betrue)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/api-keys/{id}/revoke' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird keys revoke, weird mcp setup):
$ weird keys revoke <id>$ weird mcp setup
MCP: weird_api_key_revoke.
The account's billing profiles#
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 |
| Charged | no |
Answer 200 (BillingProfileList): the result
profiles, array of objects, requiredtrade_registry_number, string or nullcity, stringpostal_code, stringid, string, requiredcountry_code, string — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, stringinvoice_email, string or nulladdress1, stringfiscal_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 onevat_payer, booleanetag, string — the profile's version, forIf-Matchon its updatekind, string, required (one ofindividual,company)default, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/billing-profiles' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird billing, weird billing update):
$ weird billing$ weird billing update <id>
MCP: weird_billing_profiles.
Create a billing profile#
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 |
| 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 |
| Charged | no |
Request body (BillingProfileInput):
trade_registry_number, string or nullcity, string, requiredpostal_code, string, requiredcountry_code, string, required — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, string, requiredinvoice_email, string or nulladdress1, string, requiredtotp_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 onevat_payer, booleankind, string, required (one ofindividual,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, requiredtrade_registry_number, string or nullcity, stringpostal_code, stringid, string, requiredcountry_code, string — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, stringinvoice_email, string or nulladdress1, stringfiscal_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 onevat_payer, booleanetag, string — the profile's version, forIf-Matchon its updatekind, string, required (one ofindividual,company)default, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
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":"<name>","address1":"<address1>","city":"<city>","state_province":"<state_province>","postal_code":"<postal_code>","country_code":"<country_code>"}'With the CLI (weird billing add):
$ weird billing addMCP: weird_billing_profile_save.
Update a billing profile#
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 |
| 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 |
| 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 nullcity, string, requiredpostal_code, string, requiredcountry_code, string, required — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, string, requiredinvoice_email, string or nulladdress1, string, requiredtotp_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 onevat_payer, booleankind, string, required (one ofindividual,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, requiredtrade_registry_number, string or nullcity, stringpostal_code, stringid, string, requiredcountry_code, string — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, stringinvoice_email, string or nulladdress1, stringfiscal_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 onevat_payer, booleanetag, string — the profile's version, forIf-Matchon its updatekind, string, required (one ofindividual,company)default, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
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":"<name>","address1":"<address1>","city":"<city>","state_province":"<state_province>","postal_code":"<postal_code>","country_code":"<country_code>"}'With the CLI (weird billing update):
$ weird billing update <id>MCP: weird_billing_profile_save.
Delete a billing profile#
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 |
| 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 |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (Ok): the result
ok, boolean, required (must betrue)
Refusals ({"error": {"code", "message"}}; see 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
curl -X DELETE 'https://api.weird.ro/auth/billing-profiles/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird billing delete):
$ weird billing delete <id>MCP: weird_billing_profile_delete.
Make a billing profile the default#
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 |
| 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 |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (BillingProfileResult): the result
profile, object, requiredtrade_registry_number, string or nullcity, stringpostal_code, stringid, string, requiredcountry_code, string — two-letter ISO 3166-1address2, string or nullname, string, required (length 2 to 150)state_province, stringinvoice_email, string or nulladdress1, stringfiscal_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 onevat_payer, booleanetag, string — the profile's version, forIf-Matchon its updatekind, string, required (one ofindividual,company)default, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/billing-profiles/{id}/default' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird billing default):
$ weird billing default <id>MCP: weird_billing_profile_default.
Approve a pending device login#
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 |
| Charged | no |
Request body (DeviceDecision):
user_code, string, requiredtotp_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, requiredconfirmation_code, string, required — XXX-XXX, shown once
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/device/approve' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":"<user_code>"}'With the CLI (weird device approve):
$ weird device approve <code>Complete a device login#
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, requiredconfirmation_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 thenrefresh_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, requiredlang, string — the account's language (PUT /auth/language): its notifications and the texts shown when a request names none; onGET /auth/me(one ofro,en)id, string, requiredemail, string, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requireddisplay_name, stringpersonal_info_complete, boolean, requiredcreated_at, string, requiredprofile_complete, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/device/complete' \
-H "Content-Type: application/json" \
-d '{"device_code":"<device_code>","confirmation_code":"<confirmation_code>"}'With the CLI (weird login):
$ weird loginDeny a pending device login#
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 |
| Charged | no |
Request body (DeviceDecision):
user_code, string, requiredtotp_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 betrue)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/device/deny' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":"<user_code>"}'With the CLI (weird device deny):
$ weird device deny <code>Look up a pending device login by its user code#
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, requireduser_agent, string or null, requiredcreated_at, string, requiredexpires_in, integer, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/device/lookup' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"user_code":"<user_code>"}'With the CLI (weird device approve, weird device deny):
$ weird device approve <code>$ weird device deny <code>
Poll a device login#
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 betrue)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/device/poll' \
-H "Content-Type: application/json" \
-d '{"device_code":"<device_code>"}'With the CLI (weird login):
$ weird loginStart a device login#
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, requireduser_code, string, required — XXXX-XXXXverification_uri, string, requiredexpires_in, integer, requiredinterval, integer, required — seconds between polls
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/auth/device/start'With the CLI (weird login):
$ weird loginThe addresses the account may put on a registrant contact#
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 |
| Charged | no |
Answer 200 (LinkedEmails): the result
account_email, string, requiredlinked, array of objects, requiredemail, string, requiredverified_at, string, requiredsource, string, required (one ofverified,migrated)
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/emails' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird emails):
$ weird emailsMCP: weird_emails.
Start linking an additional email address#
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 |
| 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):
| 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
curl -X POST 'https://api.weird.ro/auth/emails' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"email":"<email>"}'With the CLI (weird emails add):
$ weird emails add <address>MCP: weird_email_link_start.
Confirm a linked email address with its code#
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 |
| 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, requiredemail, string, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/emails/confirm' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"<token>","code":"<code>"}'With the CLI (weird emails verify, weird emails add):
$ weird emails verify <token> <code>$ weird emails add <address>
MCP: weird_email_link_confirm.
Remove a linked email address#
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 |
| 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 |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
email | path | string | yes |
Answer 200 (LinkEmailRemoved): the result
removed, boolean, requiredemail, string, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X DELETE 'https://api.weird.ro/auth/emails/{email}' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird emails remove):
$ weird emails remove <address>MCP: weird_email_unlink.
Set the account's language#
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 |
| Charged | no |
Request body (SetLanguage):
lang, string, required (one ofro,en)
Answer 200 (Language): the result
lang, string, required (one ofro,en)
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird account language [ro|en]MCP: weird_account_language.
What the caller has to accept#
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 |
| 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, requiredkind, stringversion, string
accepted, array of objects, requiredkind, stringversion, stringlang, string or nullaccepted_at, string
current, array of objects, requiredlang, string — the language of this text (one ofro,en)url, string or nullpublished_at, string, requiredbody, string — the text, on a read of one documentlanguages, array of strings — the languages this version is published inkind, string, required (one ofterms,privacy,dpa)title, string, requiredeffective_at, string — when this version takes effect (its publication unless published ahead)version, string, required
upcoming, array of objectslang, string — the language of this text (one ofro,en)url, string or nullpublished_at, string, requiredbody, string — the text, on a read of one documentlanguages, array of strings — the languages this version is published inkind, string, required (one ofterms,privacy,dpa)title, string, requiredeffective_at, string — when this version takes effect (its publication unless published ahead)version, string, required
dpa, object — the data processing agreement:versionin force, whether youacceptedit, whether it isrequiredat sign-in, theupcomingversion and whether you accepted it ahead (upcoming_accepted)version, string or nullaccepted, booleanrequired, booleanupcoming, string or nullupcoming_accepted, boolean
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/legal' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird legal, weird legal accept, weird legal accept-dpa):
$ weird legal$ weird legal accept$ weird legal accept-dpa [version]
MCP: weird_legal_status.
Accept the current terms of service and privacy notice#
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 |
| 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, stringprivacy_version, stringdpa_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 thelangquery parameter, else the Accept-Language header, else the account's language, else Romanian; any other value is refused 400 invalid-params (field lang) (one ofro,en)
Answer 200 (LegalStatus): the result
required, array of objects, requiredkind, stringversion, string
accepted, array of objects, requiredkind, stringversion, stringlang, string or nullaccepted_at, string
current, array of objects, requiredlang, string — the language of this text (one ofro,en)url, string or nullpublished_at, string, requiredbody, string — the text, on a read of one documentlanguages, array of strings — the languages this version is published inkind, string, required (one ofterms,privacy,dpa)title, string, requiredeffective_at, string — when this version takes effect (its publication unless published ahead)version, string, required
upcoming, array of objectslang, string — the language of this text (one ofro,en)url, string or nullpublished_at, string, requiredbody, string — the text, on a read of one documentlanguages, array of strings — the languages this version is published inkind, string, required (one ofterms,privacy,dpa)title, string, requiredeffective_at, string — when this version takes effect (its publication unless published ahead)version, string, required
dpa, object — the data processing agreement:versionin force, whether youacceptedit, whether it isrequiredat sign-in, theupcomingversion and whether you accepted it ahead (upcoming_accepted)version, string or nullaccepted, booleanrequired, booleanupcoming, string or nullupcoming_accepted, boolean
Refusals ({"error": {"code", "message"}}; see 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
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, weird legal accept-dpa, weird terms):
$ weird legal accept$ weird legal accept-dpa [version]$ weird terms
Start a login#
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):
| 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
curl -X POST 'https://api.weird.ro/auth/login/start' \
-H "Content-Type: application/json" \
-d '{"email":"<email>"}'With the CLI (weird login):
$ weird loginVerify a login#
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 codetotp_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 thenrefresh_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, requiredlang, string — the account's language (PUT /auth/language): its notifications and the texts shown when a request names none; onGET /auth/me(one ofro,en)id, string, requiredemail, string, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requireddisplay_name, stringpersonal_info_complete, boolean, requiredcreated_at, string, requiredprofile_complete, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/login/verify' \
-H "Content-Type: application/json" \
-d '{"token":"<token>","code":"<code>"}'With the CLI (weird login):
$ weird loginRevoke the current session#
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 betrue)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | origin-refused | origin-refused |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/auth/logout' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"With the CLI (weird logout):
$ weird logoutRevoke every session of the account#
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, requiredrevoked, integer, required — the sessions revokedgrants_revoked, integer — the OAuth grants revoked (logout-all only)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | origin-refused | origin-refused |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/auth/logout-all' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"With the CLI (weird logout, weird sessions revoke):
$ weird logout$ weird sessions revoke [<id>]
Revoke every other session of the account#
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, requiredrevoked, integer, required — the sessions revokedgrants_revoked, integer — the OAuth grants revoked (logout-all only)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/auth/logout-others' \
-H "Authorization: Bearer $WEIRD_ACCESS_TOKEN"With the CLI (weird sessions revoke):
$ weird sessions revoke [<id>]The caller's account#
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 |
| Charged | no |
Answer 200 (UserResult): the result
user, object, requiredlang, string — the account's language (PUT /auth/language): its notifications and the texts shown when a request names none; onGET /auth/me(one ofro,en)id, string, requiredemail, string, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requireddisplay_name, stringpersonal_info_complete, boolean, requiredcreated_at, string, requiredprofile_complete, boolean, required
restriction, one of — only onGET /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, requiredcontact, string, required — the address to write to about it
- variant 2: null
- variant 1: object
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/me' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird account, weird whoami, weird account language):
$ weird account$ weird whoami$ weird account language [ro|en]
MCP: weird_account, weird_account_language.
The personal profile and the completeness flags#
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 |
| Charged | no |
Answer 200 (ProfileView): the result
profile, one of, required- variant 1: object
city, stringpostal_code, stringcnp_fiscal_code, string — masked: every character but the last four is*email, stringcountry_code, stringphone_verified, booleanaddress2, string or nullname, stringstate_province, stringupdated_at, stringaddress1, stringphone, string
- variant 2: null
- variant 1: object
completeness, object, requiredpersonal_info_complete, boolean, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requiredprofile_complete, boolean, requiredphone_required, boolean — a verified phone is needed for this account's profile to be completephone_exempt, booleanmissing, array of strings
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/profile' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird profile, weird profile set, weird domains register):
$ weird profile$ weird profile set$ weird domains register <domain>
MCP: weird_account, weird_profile_update.
Save the personal profile#
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 |
| 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, requiredpostal_code, string, requiredcnp_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-1address2, string (length 0 to 200)name, string, required (length 2 to 100)state_province, string, requiredaddress1, string, required (length 1 to 200)phone, string, required — E.164 after normalization
Answer 200 (ProfileResult): the result
profile, object, requiredcity, stringpostal_code, stringcnp_fiscal_code, string — masked: every character but the last four is*email, stringcountry_code, stringphone_verified, booleanaddress2, string or nullname, stringstate_province, stringupdated_at, stringaddress1, stringphone, string
Refusals ({"error": {"code", "message"}}; see 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
curl -X PUT 'https://api.weird.ro/auth/profile' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"<name>","address1":"<address1>","city":"<city>","state_province":"<state_province>","postal_code":"<postal_code>","country_code":"<country_code>","phone":"<phone>"}'With the CLI (weird profile set):
$ weird profile setMCP: weird_profile_update.
Check the phone verification code#
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 |
| Charged | no |
Request body (CodeBody):
code, string, required
Answer 200 (PhoneVerified): the result
ok, boolean, requiredphone_verified_at, string, required
Refusals ({"error": {"code", "message"}}; see 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
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":"<code>"}'With the CLI (weird profile phone confirm, weird profile phone start):
$ weird profile phone confirm <code>$ weird profile phone start
MCP: weird_phone_verification.
Send the phone verification code#
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 |
| Charged | no |
Answer 200 (PhoneVerificationStarted): the result
ok, boolean, requiredphone, string, required
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird profile phone startMCP: weird_phone_verification.
Rotate a refresh token#
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 thenrefresh_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, requiredlang, string — the account's language (PUT /auth/language): its notifications and the texts shown when a request names none; onGET /auth/me(one ofro,en)id, string, requiredemail, string, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requireddisplay_name, stringpersonal_info_complete, boolean, requiredcreated_at, string, requiredprofile_complete, boolean, required
Refusals ({"error": {"code", "message"}}; see 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
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#
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 |
| Charged | no |
Answer 200 (SecurityStatus): the result
second_factor_enrolled, boolean, requiredstep_up_expires_at, string or null, required — ISO 8601, null when the session must step up first
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/security' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird security status, weird status):
$ weird security status$ weird status
MCP: weird_security_status.
Remove the account's second factor#
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 |
| Strong authentication | the body itself must carry totp_code or backup_code, from a session and an API key alike — see 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, requiredsecond_factor_enrolled, boolean, required (must befalse)
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird security disableMCP: weird_second_factor_remove.
Start the authenticator enrolment#
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 |
| 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, requiredsecret, string (password), required — base32, 160 bits (a secret: shown once, never logged)uri, string, required — the otpauth URIissuer, 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 asemail_code
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird security enrollVerify the enrolment with the first code#
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 |
| 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_requiredtrue 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):
| 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
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":"<totp_code>"}'With the CLI (weird security enroll):
$ weird security enrollThe account's sessions#
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 |
| Charged | no |
Answer 200 (SessionList): the result
sessions, array of objects, requiredrevoked_at, string or nullid, string, requiredrevoked_reason, string or nullstatus, string, required (one ofactive,expired,revoked)ip, string or nullcurrent, boolean, requiredcreated_at, string, requiredlast_used_at, string or nullclient, string —browser: a page signed in with the refresh cookie;token: the command line or another program holding its tokens (one ofbrowser,token)user_agent, string or null
Refusals ({"error": {"code", "message"}}; see 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
curl -X GET 'https://api.weird.ro/auth/sessions' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird sessions):
$ weird sessionsMCP: weird_sessions.
Revoke one session of the account#
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 |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (Ok): the result
ok, boolean, required (must betrue)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/sessions/{id}/revoke' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird sessions revoke):
$ weird sessions revoke [<id>]MCP: weird_session_revoke.
Cancel a signup in flight#
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 betrue)
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | invalid-token, session-expired | invalid-token or session-expired |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/auth/signup/cancel' \
-H "Content-Type: application/json" \
-d '{"token":"<token>"}'With the CLI (weird signup):
$ weird signupComplete a signup from the magic link#
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 thenrefresh_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, requiredlang, string — the account's language (PUT /auth/language): its notifications and the texts shown when a request names none; onGET /auth/me(one ofro,en)id, string, requiredemail, string, requiredphone_verified, boolean, requiredbilling_profile_present, boolean, requireddisplay_name, stringpersonal_info_complete, boolean, requiredcreated_at, string, requiredprofile_complete, boolean, required
return_to, string or null, required — the page the start named inreturn_to(go there now), or null: the start named none (go to the application's home)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/signup/complete' \
-H "Content-Type: application/json" \
-d '{"token":"<token>","secret":"<secret>"}'With the CLI (weird signup):
$ weird signupStart a signup#
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), requiredreturn_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 byPOST /auth/signup/completeand 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 400invalid-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 ofsent,recent)
Refusals ({"error": {"code", "message"}}; see 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
curl -X POST 'https://api.weird.ro/auth/signup/start' \
-H "Content-Type: application/json" \
-d '{"email":"<email>"}'With the CLI (weird signup):
$ weird signupStep the session up with the second factor#
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, requiredstep_up_expires_at, string, required — ISO 8601: until when the session passes the strong-authentication gate
Refusals ({"error": {"code", "message"}}; see 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
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):
$ weird step-upThis page is generated from the API's public document; it changes when the document does.