Skip to Content

Update a mailbox grant

Changes a member's role on a mailbox and returns the updated grant.

PATCH
/v1/mailboxes/{id}/grants/{grantId}

Changes a member's role 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.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$
grantId*string
Match^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
role?|null

Response Body

MailboxGrant

application/json
  1. response
id*MailboxGrantId
Match^mbxacl_[0-9a-hjkmnp-tv-z]{16,24}$
actor*
permissions*array<>
createdAt*string
Example Request
import { 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"
  ],
  "createdAt": "string"
}

Related documentation