---
title: "Grant a member access to a mailbox"
method: POST
path: "/v1/mailboxes/{id}/grants"
tags: ["Mailboxes"]
---

# Grant a member access to a mailbox

`POST /v1/mailboxes/{id}/grants`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/grants`
- Auth: API key in header `x-api-key`

Shares a mailbox with an organization member and returns the grant with status 201. The member must already belong to the organization. A member who already holds a grant conflicts rather than being rewritten: change an existing grant with `PATCH /v1/mailboxes/{id}/grants/{grantId}`, so a grant is never widened as a side effect of granting. List the current grants with `GET /v1/mailboxes/{id}/grants`.

## Path parameters

- `id` string, required

## Request body

- CreateMailboxGrantPayload
  - `userId` string, required
  - `role` 'admin' | 'collaborator' | 'viewer', required
  - `sendMode` 'send' | 'approval': How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it.

## Response `201`

Success

- MailboxGrant
  - `id` string, required
  - `actor` object, required
    - `kind` 'user' | 'apiKey' | 'extension' | 'externalAgent' | 'samvaAgent' | 'system', required
    - `id` string, required
    - `displayName` string, nullable
  - `permissions` string[], required
  - `sendMode` 'send' | 'approval', required: How the grantee's sends execute: `send` runs them within account limits; `approval` holds each one until a different member approves it.
  - `createdAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `409`: ConflictError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

[API](https://skmtc.dev/samva/apis/samva-api.md) · [All operations](https://skmtc.dev/samva/apis/samva-api/llms.txt) · [OpenAPI document](https://skmtc.dev/samva/apis/samva-api/revisions/a99408542cc3?raw)
