Mailboxes

Update a mailbox policy

Updates the fields you name and keeps the rest. Set `enabled` to `false` to stop a policy applying without deleting it.

PATCH
/v1/mailboxes/{id}/policies/{policyId}

Updates the fields you name and keeps the rest. Set enabled to false to stop a policy applying without deleting it.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Request Body

application/json
  1. body
name?|null
outcome?|null
reason?|null|null
enabled?boolean|null

Response Body

MailboxPolicy

application/json
  1. response
id*MailboxPolicyId
Match^mbxpol_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
outcome*MailboxPolicyOutcomeKind
Value in"requireApproval""deny"
reason*string|null
enabled*boolean
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.mailboxes.updatePolicy({  "id": "example",  "policyId": "example"});
Example Response
{  "id": "string",  "name": "string",  "outcome": "requireApproval",  "reason": "string",  "enabled": true,  "createdAt": "string",  "updatedAt": "string"}

Related documentation