Menu

Shared access

Sharing a domain or a part of it with another account, which spends its own credits.

OperationMethod and path
The access given to the callerGET /grants
Accept an invitePOST /grants/{id}/accept
Decline an invitePOST /grants/{id}/decline
Give up access the caller holdsPOST /grants/{id}/leave

The access given to the caller#

GET /grants · operation listGrants

The active grants the caller holds and the pending invites addressed to an address it controls (its login address or a verified linked one), newest first, each with the domain, the owner's owner_user_id (what as_delegate_of names) and owner_email. Work under a grant is billed to the grant's payer. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiongrants:read
Chargedno

Answer 200 (DomainGrantList): the result

  • grants, array of objects, required
    • invited_email, string, required
    • id, string, required
    • payer, string, required (one of owner, grantee, split)
    • owner_email, string — on the grantee's listing
    • owner_user_id, string, required
    • ended_at, string or null
    • scopes, array of strings, required
    • ended_reason, string or null
    • mirror_state, string, required (one of synced, pending)
    • domain, string, required
    • accepted_at, string or null
    • state, string, required (one of pending, active, declined, revoked, left, lapsed)
    • created_at, string, required
    • inactive, boolean, required — pending or active, but the domain no longer holds
    • grantee_user_id, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
429rate-limitedrate-limited

Example

curl -X GET 'https://api.weird.ro/grants' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird grants):

$ weird grants

MCP: weird_grants_received.

Accept an invite#

POST /grants/{id}/accept · operation acceptGrant

A pending invite addressed to one of the caller's addresses; the domain must still be the owner's (409 otherwise). The grant is active from now. Leave it later with POST /grants/{id}/leave. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiongrants:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (DomainGrantResult): the result

  • grant, object, required
    • invited_email, string, required
    • id, string, required
    • payer, string, required (one of owner, grantee, split)
    • owner_email, string — on the grantee's listing
    • owner_user_id, string, required
    • ended_at, string or null
    • scopes, array of strings, required
    • ended_reason, string or null
    • mirror_state, string, required (one of synced, pending)
    • domain, string, required
    • accepted_at, string or null
    • state, string, required (one of pending, active, declined, revoked, left, lapsed)
    • created_at, string, required
    • inactive, boolean, required — pending or active, but the domain no longer holds
    • grantee_user_id, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
400invalid-paramsinvalid-params (the owner's own invite)
401unauthorizedunauthorized
403account-suspended, insufficient-scope, terms-acceptance-requiredinsufficient-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)
404not-foundnot-found (an invite meant for another address included)
409conflictconflict (the invite is no longer valid)
429rate-limitedrate-limited

Example

curl -X POST 'https://api.weird.ro/grants/{id}/accept' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird grants accept):

$ weird grants accept <id>

MCP: weird_grant_respond.

Decline an invite#

POST /grants/{id}/decline · operation declineGrant

Declines the invitation id (GET /grants lists those received): the other account's domain stays theirs and no access is given. Cannot be undone: the owner may invite again. Already accepted, declined or revoked is 409 conflict. This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiongrants:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (DomainGrantResult): the result

  • grant, object, required
    • invited_email, string, required
    • id, string, required
    • payer, string, required (one of owner, grantee, split)
    • owner_email, string — on the grantee's listing
    • owner_user_id, string, required
    • ended_at, string or null
    • scopes, array of strings, required
    • ended_reason, string or null
    • mirror_state, string, required (one of synced, pending)
    • domain, string, required
    • accepted_at, string or null
    • state, string, required (one of pending, active, declined, revoked, left, lapsed)
    • created_at, string, required
    • inactive, boolean, required — pending or active, but the domain no longer holds
    • grantee_user_id, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
404not-foundnot-found
409conflictconflict (the invite is no longer pending: it was accepted, declined or revoked)
429rate-limitedrate-limited

Example

curl -X POST 'https://api.weird.ro/grants/{id}/decline' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird grants decline):

$ weird grants decline <id>

MCP: weird_grant_respond.

Give up access the caller holds#

POST /grants/{id}/leave · operation leaveGrant

The caller's active grant ends at once (left). This call is not charged.

Credentialan API key holding the permission below, or a session (x-weird-auth: key)
Permissiongrants:write
Chargedno

Parameters

NameInTypeRequiredDescription
idpathstringyes

Answer 200 (DomainGrantResult): the result

  • grant, object, required
    • invited_email, string, required
    • id, string, required
    • payer, string, required (one of owner, grantee, split)
    • owner_email, string — on the grantee's listing
    • owner_user_id, string, required
    • ended_at, string or null
    • scopes, array of strings, required
    • ended_reason, string or null
    • mirror_state, string, required (one of synced, pending)
    • domain, string, required
    • accepted_at, string or null
    • state, string, required (one of pending, active, declined, revoked, left, lapsed)
    • created_at, string, required
    • inactive, boolean, required — pending or active, but the domain no longer holds
    • grantee_user_id, string or null, required

Refusals ({"error": {"code", "message"}}; see errors):

StatusCodesWhen
401unauthorizedunauthorized
403insufficient-scope, terms-acceptance-requiredinsufficient-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)
404not-foundnot-found
429rate-limitedrate-limited

Example

curl -X POST 'https://api.weird.ro/grants/{id}/leave' \
  -H "Authorization: Bearer $WEIRD_API_KEY"

With the CLI (weird grants leave):

$ weird grants leave <id>

MCP: weird_grant_leave.

This page is generated from the API's public document; it changes when the document does.