Menu
Shared access
Sharing a domain or a part of it with another account, which spends its own credits.
| Operation | Method and path |
|---|---|
| The access given to the caller | GET /grants |
| Accept an invite | POST /grants/{id}/accept |
| Decline an invite | POST /grants/{id}/decline |
| Give up access the caller holds | POST /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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | grants:read |
| Charged | no |
Answer 200 (DomainGrantList): the result
grants, array of objects, requiredinvited_email, string, requiredid, string, requiredpayer, string, required (one ofowner,grantee,split)owner_email, string — on the grantee's listingowner_user_id, string, requiredended_at, string or nullscopes, array of strings, requiredended_reason, string or nullmirror_state, string, required (one ofsynced,pending)domain, string, requiredaccepted_at, string or nullstate, string, required (one ofpending,active,declined,revoked,left,lapsed)created_at, string, requiredinactive, boolean, required — pending or active, but the domain no longer holdsgrantee_user_id, string or null, 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 |
Example
curl -X GET 'https://api.weird.ro/grants' \
-H "Authorization: Bearer $WEIRD_API_KEY"With the CLI (weird grants):
$ weird grantsMCP: 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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | grants:write |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (DomainGrantResult): the result
grant, object, requiredinvited_email, string, requiredid, string, requiredpayer, string, required (one ofowner,grantee,split)owner_email, string — on the grantee's listingowner_user_id, string, requiredended_at, string or nullscopes, array of strings, requiredended_reason, string or nullmirror_state, string, required (one ofsynced,pending)domain, string, requiredaccepted_at, string or nullstate, string, required (one ofpending,active,declined,revoked,left,lapsed)created_at, string, requiredinactive, boolean, required — pending or active, but the domain no longer holdsgrantee_user_id, string or null, required
Refusals ({"error": {"code", "message"}}; see errors):
| Status | Codes | When |
|---|---|---|
| 400 | invalid-params | invalid-params (the owner's own invite) |
| 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) |
| 404 | not-found | not-found (an invite meant for another address included) |
| 409 | conflict | conflict (the invite is no longer valid) |
| 429 | rate-limited | rate-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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | grants:write |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (DomainGrantResult): the result
grant, object, requiredinvited_email, string, requiredid, string, requiredpayer, string, required (one ofowner,grantee,split)owner_email, string — on the grantee's listingowner_user_id, string, requiredended_at, string or nullscopes, array of strings, requiredended_reason, string or nullmirror_state, string, required (one ofsynced,pending)domain, string, requiredaccepted_at, string or nullstate, string, required (one ofpending,active,declined,revoked,left,lapsed)created_at, string, requiredinactive, boolean, required — pending or active, but the domain no longer holdsgrantee_user_id, string or null, 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) |
| 404 | not-found | not-found |
| 409 | conflict | conflict (the invite is no longer pending: it was accepted, declined or revoked) |
| 429 | rate-limited | rate-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.
| Credential | an API key holding the permission below, or a session (x-weird-auth: key) |
| Permission | grants:write |
| Charged | no |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Answer 200 (DomainGrantResult): the result
grant, object, requiredinvited_email, string, requiredid, string, requiredpayer, string, required (one ofowner,grantee,split)owner_email, string — on the grantee's listingowner_user_id, string, requiredended_at, string or nullscopes, array of strings, requiredended_reason, string or nullmirror_state, string, required (one ofsynced,pending)domain, string, requiredaccepted_at, string or nullstate, string, required (one ofpending,active,declined,revoked,left,lapsed)created_at, string, requiredinactive, boolean, required — pending or active, but the domain no longer holdsgrantee_user_id, string or null, 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) |
| 404 | not-found | not-found |
| 429 | rate-limited | rate-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.