Mailboxes
Update a mailbox grant
Changes a member's role, send mode, or both on a mailbox and returns the updated grant.
PATCH
Changes a member's role, send mode, or both on a mailbox and returns the updated grant. A field left out keeps its value; naming neither is a validation error. Taking admin from the last grant that can configure the mailbox conflicts, as revoking it does. The change applies to the member's next request on every surface.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$grantId*stringMatch
^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$application/json- body
role?|nullsendMode?|nullMailboxGrant
application/json- response
id*MailboxGrantIdMatch
^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$actor*permissions*array<>sendMode*MailboxSendModeHow the grantee's sends execute: send runs them within account limits; approval holds each one until a different member approves it.
Value in
"send""approval"createdAt*stringimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.updateGrant({ "id": "example", "grantId": "example"});Example Response
{ "id": "string", "actor": { "kind": "user", "id": "string", "displayName": "string" }, "permissions": [ "mailbox:read" ], "sendMode": "send", "createdAt": "string"}