---
title: "Update an OAuth app"
method: PATCH
path: "/v1/connect/oauth-apps/{appId}"
tags: ["Connect"]
---

# Update an OAuth app

`PATCH /v1/connect/oauth-apps/{appId}`

## Request

- Base URL: `https://zernio.com/api`
- URL: `https://zernio.com/api/v1/connect/oauth-apps/{appId}`
- Auth: HTTP bearer

Renames the app or rotates its secret.

A new secret is checked with the platform before it is saved, and takes effect for every account on the app at once; their tokens keep working.

The client ID cannot change: a different client ID is a different app, so add it and reconnect the accounts through it.

## Request body

- object
  - `label` string
  - `clientSecret` string
  - `metaAppId` string: Instagram only: the numeric ID of the Meta app your Instagram app lives in. Zernio uses it with `metaAppSecret` to register the webhook. Send both or neither.
  - `metaAppSecret` string: Instagram only: the secret of that Meta app. Never returned.
  - `slackSigningSecret` string: Slack only: saves or replaces the signing secret from the app's Basic Information page; any other platform is a 400.
  - `scopeAreas` string[]: Replaces the areas new connects request. Accounts already connected keep what they were granted until they reconnect.

## Response `200`

The updated app.

- object
  - `app` OAuthApp, required
    - `id` string, required: Pass it as `oauthAppId` on GET /v1/connect/{platform} to connect through this app.
    - `platform` string, required: The platform the app belongs to, as in GET /v1/connect/{platform}.
    - `label` string, required
    - `clientId` string, required: The client ID (or app ID) of your app on the platform. The secret is never returned.
    - `scopeAreas` string[], required: The permission areas every connect through this app requests. Pick only what your app is approved for on the platform.
    - `status` 'ok' | 'unchecked' | 'invalid', required: `ok`: the platform accepted the keys at the last check. `unchecked`: the check could not reach a verdict (see lastError). `invalid`: the platform rejected the keys; connects and token refreshes through this app will fail until the secret is rotated.
    - `lastCheckedAt` string, date-time, nullable
    - `lastError` string, nullable
    - `accountCount` integer, required: Connected accounts currently running on this app.
    - `redirectUri` string, uri, required: The OAuth redirect URI to allow in your app's settings on the platform.
    - `webhook` object, nullable: Facebook and Instagram only; null on platforms with nothing to set up. Meta delivers comments and messages to your app's own webhook. Set this callback URL and verify token on the app's webhook product (Page for Facebook, Instagram for Instagram) and subscribe the listed fields. Zernio checks each delivery against your app secret.
      - `callbackUrl` string, uri, required
      - `verifyToken` string, required
      - `object` 'page' | 'instagram', required: The webhook object to configure.
      - `fields` string[], required: Subscribe the app to these fields.
    - `sharedWebhookUrl` string, uri, nullable: TikTok only: set this as the webhook callback URL in your TikTok developer app. TikTok uses it to report when a video finishes publishing; Zernio also checks the publish status itself, so posting works without it. Null on other platforms.
    - `hasSlackSigningSecret` boolean: Slack only: whether the signing secret of your Slack app is saved. Without it Zernio refuses every event sent to `slackEvents.requestUrl`.
    - `slackEvents` object, nullable: Slack only; null on other platforms. Slack delivers messages and mentions to your app's own Request URL. Save the app's signing secret first (`slackSigningSecret`), then set this Request URL under Event Subscriptions and subscribe the listed bot events. Zernio checks each delivery against that secret.
      - `requestUrl` string, uri, required
      - `botEvents` string[], required: Subscribe the app to these bot events.
    - `createdAt` string, date-time, required

## 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.
- `403`: The caller cannot change workspace settings (INSUFFICIENT_PERMISSIONS).
- `404`: Resource not found

## Changes

- **2026-10-30** `62ae2e766614`: 2 info
  - added the new optional request property `metaAppId`
  - added the new optional request property `metaAppSecret`
- **2026-10-29** `134756fb8dc2`: 3 info
  - added the new optional request property `slackSigningSecret`
  - added the optional property `app/hasSlackSigningSecret` to the response with the `200` status
  - added the optional property `app/slackEvents` to the response with the `200` status
- **2026-10-29** `1b0c783e7f44`: 1 info
  - added the optional property `app/sharedWebhookUrl` to the response with the `200` status
- **2026-10-28** `0ef14b964717`: 1 breaking, 2 info
  - removed the enum value `ads` of the request property `scopeAreas/items/`
  - added the optional property `app/webhook` to the response with the `200` status
  - removed the `ads` enum value from the `app/scopeAreas/items/` response property for the response status `200`
- **2026-10-28** `9f1c5346e670`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/zernio/apis/zernio-api/changes/v1/connect/oauth-apps/:appId/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/c319eb5d95b6?raw)
