Menu
Referrals
Invitations and what they give.
| Operation | Method and path |
|---|---|
| The caller's gifts, referral rewards and promotional credit | GET /referrals |
| Claim a gift with its link and password | POST /referrals/claim |
| Buy a credit gift | POST /referrals/gifts |
| One of the caller's gifts | GET /referrals/gifts/{id} |
| Rotate a paid gift's claim link | POST /referrals/gifts/{id}/regenerate |
| Take an unclaimed gift back | POST /referrals/gifts/{id}/revoke |
The caller's gifts, referral rewards and promotional credit#
GET /referrals · operation getReferrals
promotion (id, live; null when no gift promotion runs), standard_amount (one year of a domain registration, in whole credits), gift_min / gift_max, sent (the gifts the caller gave, newest first: claim_url only while a gift is paid, the reward fields once a reward was paid, never who claimed), received (the gifts the caller claimed, never who gave), earnings (rewarded_count, total, next_reward) and promo_balance (the account's promotional credit, as GET /credits/promotional answers it; null when it cannot be read now). This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals:read |
| Charged | no |
Answer 200 (ReferralStatus): the result
promotion, object or null, requiredid, stringlive, boolean
standard_amount, string or nullgift_min, string or nullgift_max, string or nullsent, array of objects, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
received, array of objects, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
earnings, object, requiredrewarded_count, integer, requiredtotal, string, required — a decimal amount as textnext_reward, string or null
promo_balance, one of- variant 1: object — the account's promotional credit
user_id, stringcredit_type, string, required —promobalance, string, required — the promotional balanceavailable, string, required — what can be spent: the balance less what is lapsinglapsing, string, required — past its expiry and about to leave the balancedeficit, string, required — a decimal amount as textgrants, array of objects, required — every grant that still holds credit, in the order it is spent (soonest expiry first)seq, integer, requiredpromotion, string or nullreference, string or nullamount, string, required — a decimal amount as textremaining, string, required — a decimal amount as textexpires_at, string or nullcreated_at, stringlapsing, boolean, required — past its expiry: about to leave the balance
- variant 2: null
- variant 1: object — the account's promotional credit
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/referrals' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird referrals):
$ weird referralsMCP: weird_referrals.
Claim a gift with its link and password#
POST /referrals/claim · operation claimGift
token (from the claim link) and password. The gift becomes claimed for the calling account; its credits are added once the account's profile is complete. A wrong link or a wrong password answers 400 with reason gift-claim-failed; a giver cannot claim their own gift (reason gift-not-claimable). Attempts are limited per account and per link: past the limit, 429 rate-limited. A claim cannot be undone. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals:write |
| Charged | no |
Request body (ClaimGift):
token, string (password), required (a secret: shown once, never logged)password, string (password), required (a secret: shown once, never logged)
Answer 200 (GiftResult): the result
gift, object, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (reason gift-claim-failed or gift-not-claimable) |
| 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) |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/referrals/claim' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"token":"<token>","password":"<password>"}'With the CLI (weird referrals claim):
$ weird referrals claim <link>MCP: weird_gift_claim.
Buy a credit gift#
POST /referrals/gifts · operation createGift
amount (whole credits within gift_min..gift_max; omitted: the standard amount), claim_password (at least 6 characters: give it, with the claim link, to the recipient yourself) and provider (the payment method the giver chooses, one of the providers GET /credits/topup lists; default the first offered). A gift is a purchase: the giver pays the checkout at the price of one credit in force (VAT on top, invoiced like a top-up; refused 503 credits-not-on-sale while that price is not set) and the credits go to whoever claims the gift. Answers the gift (awaiting-payment), the checkout URL and the quote; the claim link exists once the gift is paid (GET /referrals/gifts/{id}). A gift never expires. Take it back with POST /referrals/gifts/{id}/revoke while it is unclaimed. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals: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 (CreateGift):
amount, integer — whole credits within gift_min..gift_max; default the standard amountclaim_password, string, required (length 6 to any)provider, string (one ofstripe,revolut)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 (GiftStarted): the result
total, string, required — a decimal amount as textcredit_price, string, required — the net price of one credit this gift is bought at (recorded on its order)vat, string, required — a decimal amount as textcurrency, string, required (must be"RON")gift, object, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
net, string, required — the credits at that price, before VAT, rounded to the bancheckout_url, string, requiredvat_percent, string, required — a decimal amount as textcredits, integer, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (field amount or claim_password; the provider) |
| 401 | unauthorized | unauthorized |
| 403 | account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing); enrolment-required (a session caller whose account has no authenticator: enrol one first) or step-up-required (a session without a recent step-up: POST /auth/step-up, then retry); account-suspended (the account is restricted while a report about it is reviewed: reading, support tickets and the copy of its data keep working; contact is the address to write to, GET /auth/account/restrictions says more); terms-acceptance-required (the current terms of service or privacy notice are not accepted yet: required lists them; read them with GET /legal/documents and accept with POST /auth/legal/accept) |
| 409 | conflict | conflict (the gift promotion is not active) |
| 422 | invalid-totp | invalid-totp (a wrong or replayed authenticator code) |
| 429 | rate-limited | rate-limited (also: too many unpaid or unclaimed gifts: wait for them or take some back) |
| 502 | provider-unavailable | provider-unavailable (the payment provider did not answer: try again) |
| 503 | company-identity-incomplete, credits-not-on-sale, payments-disabled, unavailable | payments-disabled (payments are switched off now: try again later), credits-not-on-sale (credits are not on sale now: nothing was ordered), company-identity-incomplete (the company details are not complete: nothing was ordered) or unavailable (gifts cannot be sold now: try again later) |
Example
curl -X POST 'https://api.weird.ro/referrals/gifts' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{"claim_password":"<claim_password>"}'With the CLI (weird referrals gift create):
$ weird referrals gift createMCP: weird_gift_create.
One of the caller's gifts#
GET /referrals/gifts/{id} · operation getGift
For its giver or its claimant, each in their own shape. While the gift awaits its payment the payment is checked first, so a checkout just completed shows at once: the gift is then paid and the giver's answer carries claim_url. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals:read |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (GiftResult): the result
gift, object, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_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) |
| 404 | not-found | not-found (not a gift of the caller) |
| 429 | rate-limited | rate-limited |
Example
curl -X GET 'https://api.weird.ro/referrals/gifts/{id}' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird referrals gift show):
$ weird referrals gift show <id>MCP: weird_gift.
Rotate a paid gift's claim link#
POST /referrals/gifts/{id}/regenerate · operation regenerateGift
A fresh claim link (the old one is dead at once) and, with new_password, a fresh claim password. Paid, unclaimed gifts only: before the payment there is no link to rotate. The old link cannot be revived. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals:write |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body (RegenerateGift):
new_password, string — omitted: the claim password stays (length 6 to any)
Answer 200 (GiftRegenerated): the result
gift, object, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
claim_url, string, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (field claim_password: too short) |
| 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 (not paid yet, already claimed or resolved, or not the caller's gift) |
| 429 | rate-limited | rate-limited |
Example
curl -X POST 'https://api.weird.ro/referrals/gifts/{id}/regenerate' \
-H "Authorization: Bearer $WEIRD_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'With the CLI (weird referrals gift regenerate):
$ weird referrals gift regenerate <id>MCP: weird_gift_regenerate.
Take an unclaimed gift back#
POST /referrals/gifts/{id}/revoke · operation revokeGift
No body. A gift awaiting its payment is cancelled (should its checkout still complete later, the credits go to the giver). A paid gift becomes revoked and its credits go to the giver's own account. A claimed or settled gift is refused. This call is not charged.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | referrals: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 (GiftResult): the result
gift, object, requiredclaim_url, string or null — the giver's view, only while the gift is paidreward_state, string — the giver's view, only once a reward was paidid, string, requiredresolved_at, string or nullunlocked_at, string or nullinvoice_id, string or null — the giver's view: the invoice of the purchaseamount, string, required — a decimal amount as textstate, string, required (one ofawaiting-payment,paid,claimed,unlocked,refunded,revoked,cancelled)checkout_url, string or null — the giver's view, while the payment is openreward_amount, string — a decimal amount as textcreated_at, string, requiredreward_index, integerrewarded_at, string or nullclaimed_at, string or null
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 401 | unauthorized | unauthorized |
| 403 | account-suspended, enrolment-required, insufficient-scope, profile-incomplete, step-up-required, terms-acceptance-required | insufficient-scope (an API key without the route's scope: required, granted); profile-incomplete (complete the profile first: GET /auth/profile says what is missing); 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 (already claimed or resolved) |
| 422 | invalid-totp | invalid-totp (a wrong or replayed authenticator code) |
| 429 | rate-limited | rate-limited |
| 502 | upstream-unavailable | upstream-unavailable (the gift is revoked; its credits reach the giver's account shortly) |
Example
curl -X POST 'https://api.weird.ro/referrals/gifts/{id}/revoke' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird referrals gift revoke):
$ weird referrals gift revoke <id>MCP: weird_gift_revoke.
This page is generated from the API's public document; it changes when the document does.