---
title: "Update an organization connection"
method: PATCH
path: "/v1/org-connections/{orgConnectionId}"
tags: ["Connect"]
---

# Update an organization connection

`PATCH /v1/org-connections/{orgConnectionId}`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/org-connections/{orgConnectionId}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/zernio/apis/zernio-api/docs/v1/org-connections/:orgConnectionId/patch.ts> (a function with typed inputs; its response is checked against the schema)

Changes the allowlist or the Google directory admin.

Mailboxes already added that a narrowed allowlist excludes answer `401` `reconnect_required` until it includes them again.

## Request body

- object
  - `allowedEmails` string[], nullable
  - `adminEmail` string, email, nullable

## Response `200`

The updated connection

- object
  - `data` OrgConnection: A Google Workspace domain or Microsoft 365 tenant whose administrator granted Zernio access to its mailboxes once.
    - `id` string
    - `provider` 'google' | 'microsoft'
    - `status` 'pending' | 'active' | 'revoked'
    - `profileId` string
    - `areas` string[]
    - `domain` string, nullable
    - `tenantId` string, nullable
    - `adminEmail` string, nullable
    - `allowedEmails` string[], nullable
    - `lastError` string, nullable
    - `verifiedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `setup` object: What the administrator does. Google returns `dnsRecord`, `adminConsoleUrl`, `clientId`, `scopes` and `directoryScope`; Microsoft returns `adminConsentUrl` and `applicationPermissions`.
      - `type` 'google_domain_wide_delegation' | 'microsoft_admin_consent'
      - `dnsRecord` object
        - `type` 'TXT'
        - `host` string
        - `value` string
      - `adminConsoleUrl` string, uri
      - `clientId` string, nullable
      - `scopes` string[]
      - `directoryScope` string
      - `adminConsentUrl` string, uri, nullable
      - `applicationPermissions` string[]
      - `steps` string[]

## Other responses

- `400`: Invalid request
- `401`: Missing or invalid API key. `code` is `missing_credentials` when no Authorization header was sent and `invalid_credentials` when the key is unknown, revoked or expired.
- `404`: Resource not found

## Changes

- **2026-11-10** `a79c233ebf22`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/org-connections/:orgConnectionId/patch.md)

---

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