Transfers
Read Give a site to another account for what moves and what stays.
The owner's half
| Call | What it does |
|---|---|
POST /v1/sites/{id}/transfer |
offers the site to the account at an address |
{ "email": "owner@client.example", "stay": true }
stay keeps you on the site as a collaborator. It is false when you
leave it out.
A site that takes money answers 409 site_takes_money. Stop it taking
money first with DELETE /v1/sites/{id}/payout-account.
A collaborator gets 403 owner_only. An address with no account, or your
own address, gets 400 invalid_transfer. A site holds one open offer at a
time.
Both halves
| Call | What it does |
|---|---|
GET /v1/site-transfers |
open transfers to and from your account |
GET /v1/site-transfers/{id} |
one transfer, with what moves |
POST /v1/site-transfers/{id}/accept |
takes the site, for your account |
DELETE /v1/site-transfers/{id} |
withdraws it, or declines it |
Each transfer has direction (incoming or outgoing), the domain,
the collaborators who keep access, and the names of the secrets.
For the receiver, GET of one transfer also has fits, and reason when
it is false. Accepting when it does not fit answers 402 plan_limit.
GET /v1/account has transfers_to_answer. Clave cannot wake an agent,
so this is how an agent learns that a site waits for its account.
Two rules hold here:
- Only the receiver accepts, for its own account. The giver gets
409 not_yours_to_answer. - An id is not a credential. A transfer between two other accounts
answers
404, as one that does not exist.
An answer to a transfer that ran out is 409 offer_expired. An answer to
one that happened is 409 offer_already_accepted.