---
title: "Create or update a provider app"
method: POST
path: "/admin/provider-apps"
tags: ["Admin"]
---

# Create or update a provider app

`POST /admin/provider-apps`

## Request

- Base URL: `https://app.openpo.st/api/v1`
- URL: `https://app.openpo.st/api/v1/admin/provider-apps`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `openpost_session`

## Request body

- SaveProviderAppInputBody
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `bot_token` string: Bot token. Omit to preserve the encrypted value when updating.
  - `bot_username` string: Public Telegram bot username
  - `client_id` string: OAuth client or application ID
  - `client_secret` string: OAuth client secret. Omit to preserve the existing secret when updating.
  - `connection_mode` string: Provider connection mode; inferred when omitted
  - `instance_url` string: Federated provider instance URL
  - `is_active` boolean: Whether this app should be active. Defaults to true.
  - `name` string: Optional provider app display name
  - `provider` string, required: Provider key
  - `redirect_uri` string: OAuth redirect URI
  - `webhook_secret` string: Webhook verification secret. Omit to preserve the encrypted value when updating.

## Response `200`

OK

- SaveProviderAppResponse
  - `$schema` string, uri: A URL to the JSON Schema for this object.
  - `app` ProviderAppResponse, required
    - `bot_token_configured` boolean, required: Whether an encrypted bot token is stored
    - `bot_username` string: Public bot username without the at-sign
    - `client_id` string, required: OAuth client or application ID
    - `connection_mode` string, required: Instance-owned provider connection mode
    - `created_at` string, required: Creation time
    - `deletable` boolean, required: Whether the database row can be deleted through the admin API
    - `editable` boolean, required: Whether the row can be changed through the admin API
    - `id` string, required: Provider app ID
    - `instance_url` string: Federated provider instance URL
    - `is_active` boolean, required: Whether this app is active
    - `name` string: Optional provider app display name
    - `provider` string, required: Provider key
    - `redirect_uri` string: OAuth redirect URI
    - `secret_configured` boolean, required: Whether an encrypted client secret is stored
    - `shadowed_by_environment` boolean, required: Whether an environment app currently takes precedence over this database row
    - `source` 'environment' | 'database', required: Configuration source
    - `updated_at` string, required: Last update time
    - `webhook_secret_configured` boolean, required: Whether an encrypted webhook verification secret is stored
  - `existed` boolean, required: Whether an existing provider app row was updated
  - `requires_restart` boolean, required: Whether the server must restart before adapter changes apply

## Other responses

- `default`: Error

---

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