Lock an account
POST
/console/users/{id}/lock
const url = 'https://example.com/console/users/example/lock';const options = { method: 'POST', headers: { cookie: 'bottle.session_token=<bottle.session_token>', 'Content-Type': 'application/json' }, body: '{"reason":"example"}'};
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/console/users/example/lock \ --header 'Content-Type: application/json' \ --cookie bottle.session_token=<bottle.session_token> \ --data '{ "reason": "example" }'They are signed out everywhere at once and cannot sign in again until unlocked. Bottle staff cannot be locked here: take them off staff first.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
reason
required
string
Examplegenerated
{ "reason": "example"}Responses
Section titled “Responses”Locked
Media typeapplication/json
object
id
required
string
email
required
string
name
required
string
emailVerified
required
boolean
twoFactorEnabled
required
boolean
createdAt
required
string format: date-time
lockedAt
required
string | null format: date-time
lockedReason
required
string | null
staffRole
required
string | null
memberships
required
Array<object>
object
tenantId
required
UUID v7
string format: uuid
tenantName
required
string
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
Example
{ "staffRole": "support", "memberships": [ { "tenantId": "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 Bottle staff, no two-step sign-in, or a console role too low for this
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Not found
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}A member of staff, or yourself
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" } ]}