Create an invitation
POST
/invitations
const url = 'https://example.com/invitations';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"email":"brian@example.com","role":"owner"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/invitations \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "email": "brian@example.com", "role": "owner" }'The invitee does not need an account yet. The response carries the raw token once, for the invitation link; only its hash is stored. Inviting the same address again replaces the outstanding invitation rather than adding a second.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
email
required
string format: email
Example
brian@example.comrole
required
Owner: billing, deleting the tenant, full control of members. admin: all operational work and may manage drivers and admins. driver: their own round only.
string
Responses
Section titled “Responses”Invited
Media typeapplication/json
object
id
required
UUID v7
string format: uuid
email
required
string format: email
role
required
Owner: billing, deleting the tenant, full control of members. admin: all operational work and may manage drivers and admins. driver: their own round only.
string
invitedByName
required
string | null
expiresAt
required
string format: date-time
acceptedAt
required
string | null format: date-time
revokedAt
required
string | null format: date-time
createdAt
required
string format: date-time
token
required
Raw token. Shown once, never stored, never shown again.
string
Example
{ "id": "019205d1-6e7a-7c3b-9f6e-3a2b1c0d9e8f", "role": "owner"}Not signed in
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not a member, or the role is not allowed to do this
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Already a member
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Validation failed
Media typeapplication/json
object
error
required
string
message
required
string
issues
required
Array<object>
object
path
required
string
message
required
string
Example
{ "error": "validation", "issues": [ { "path": "email", "message": "Invalid email" } ]}