dropto.run docs
Drop2Run.Api | v1

The account a site belongs to, the people who can reach it, and the invitations that add them. An account is the unit everything else hangs from — sites, quota and billing are all per account rather than per person.


Renames the account being acted on.

PATCH
https://dropto.run
/api/account
d2r_session (cookie)
or
Bearer

Renames the account being acted on. › Request Body

Body of `PATCH /account`.
name
​null | string · maxLength: 255 · required

What to call the account, or null to clear the name.

Renames the account being acted on. › Responses

OK

The account itself, as its members see it.
accountId
​string · required

Its ULID.

kind
​string · required

Whether it belongs to one person or is shared.

name
​null | string · required

What it calls itself, or null when nobody has named it.


POST
https://dropto.run
/api/account/invites
d2r_session (cookie)
or
Bearer
Body of `POST /account/invites`.
email
​string · maxLength: 320 · required

Address to invite. Compared against the accepter's own before they are let in.

role
​null | string · maxLength: 16

What accepting grants: Owner or Member. Absent means member.

Absent rather than required, and defaulting to the lesser of the two, because an omitted field must not hand out authority nobody asked for — the same rule every capability column on a plan follows.

OK

An invitation, as its sender sees it once.
acceptUrl
​string · required

The link. Returned here and nowhere else — only its hash is stored, so this response is the one chance to copy it, which is what lets an owner pass it on when mail does not arrive.

email
​string · required

The address it was sent to.

expiresAt
​string · date-time · required

When it stops working.

id
​string · required

Its id, for revoking.


Withdraws an invitation that has not been accepted.

DELETE
https://dropto.run
/api/account/invites/{inviteId}
d2r_session (cookie)
or
Bearer

Withdraws an invitation that has not been accepted. › path Parameters

inviteId
​string · required

Withdraws an invitation that has not been accepted. › Responses

OK

What was taken away.
id
​string · required

The user or invitation that is gone.


Lists who is on the account and which invitations still stand.

GET
https://dropto.run
/api/account/members
d2r_session (cookie)
or
Bearer

Lists who is on the account and which invitations still stand. › Responses

OK

Who is on the account, and who has been asked.
​InviteRow[] · required

Invitations still standing. Spent and withdrawn ones are history, not a list.

​MemberRow[] · required

People who may act on it, oldest first.

requireTwoFactorAt
​null | string · date-time · required

Since when the owner has required two-factor of every member, or null while they have not.

tokensOfUnprotectedMembers
​integer | string · int32 · pattern: ^-?(?:0|[1-9]\d*)$ · required

Access tokens on this account held by members without two-factor. Requiring two-factor does not stop them, so the owner is told before turning it on.


Takes somebody off the account, effective on their next request.

DELETE
https://dropto.run
/api/account/members/{userId}
d2r_session (cookie)
or
Bearer

Takes somebody off the account, effective on their next request. › path Parameters

userId
​string · required

Takes somebody off the account, effective on their next request. › Responses

OK

What was taken away.
id
​string · required

The user or invitation that is gone.


Changes what somebody on the account may do.

PATCH
https://dropto.run
/api/account/members/{userId}
d2r_session (cookie)
or
Bearer

Changes what somebody on the account may do. › path Parameters

userId
​string · required

Changes what somebody on the account may do. › Request Body

Body of `PATCH /account/members/{userId}`.
role
​string · maxLength: 16 · required

The role to give them: Owner or Member.

Changes what somebody on the account may do. › Responses

OK

One person on the account.
email
​string · required

Their address, which is how a colleague recognises them.

founder
​boolean · required

Whether they created the account. A founder cannot be removed or demoted while the plan is held in their name, so the members screen offers neither for this row.

joinedAt
​string · date-time · required

When they were added.

name
​null | string · required

Their display name, or null when Google gave none.

role
​string · required

What they may do here.

twoFactor
​boolean · required

Whether they have two-factor on — the column an owner reads before requiring it, and a member reads to see whether the rule would block them.

userId
​string · required

Their ULID, which is what removing them names.


Starts or stops requiring two-factor.

PATCH
https://dropto.run
/api/account/security
d2r_session (cookie)
or
Bearer

Members without two-factor are refused from their next request. Access tokens they already made keep working.

Starts or stops requiring two-factor. › Request Body

Body of `PATCH /account/security`.
requireTwoFactor
​boolean · required

Whether every member must sign in with two-factor.

Starts or stops requiring two-factor. › Responses

OK

Response of `PATCH /account/security`.
requireTwoFactorAt
​null | string · date-time · required

Since when two-factor is required, or null while it is not.


Lists the accounts the signed-in person may act on.

GET
https://dropto.run
/api/accounts
d2r_session (cookie)
or
Bearer

Lists the accounts the signed-in person may act on. › Responses

OK

Response of `GET /api/accounts`.
​AccountSummary[] · required

Every account the caller may act on, oldest membership first. Never empty for a signed-in person: signing in creates an account for them, and they are its owner.


POST
https://dropto.run
/api/invites/accept
d2r_session (cookie)
or
Bearer
Body of `POST /account/invites/accept`.
token
​string · maxLength: 200 · required

The token from the invitation link.

OK

What the accepter joined.
accountId
​string · required

The account they are now a member of.

accountName
​null | string · required

What it calls itself, or null when nobody has named it.

requiresTwoFactor
​boolean · required

Whether the account joined requires two-factor, so the page can say so before the gate does (IMPLEMENTATION-PLAN §5.3.6).

role
​string · required

What they may do there.