---
title: "Create OAuth2 Client"
method: POST
path: "/oauth/clients"
tags: ["OAuth2"]
---

# Create OAuth2 Client

`POST /oauth/clients`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/oauth/clients`
- Auth: one of:
  - API key in header `pxtoken`
  - OAuth 2 (implicit, authorization URL `https://api.carbonvoice.app/oauth/authorize`)

## Request body

- Oauth2RegisterRequest
  - `redirect_uris` string[], required: Allowed redirect URIs for the OAuth2 client
  - `token_endpoint_auth_method` 'none' | 'client_secret_basic' | 'client_secret_post', required: Token endpoint authentication method
  - `grant_types` GrantType[], required: Allowed grant types
  - `response_types` Oauth2ResponseType[], required: Allowed response types
  - `client_name` string, required: Client name
  - `client_uri` string: Client URI
  - `scope` string: OAuth2 scopes
  - `webhook_url` string: Webhook URL. (URL that will be used to send webhooks)
  - `webhooks_url_mode` 'one_per_client' | 'one_per_subscription': Defines whether the app uses one webhook URL for the whole client or one webhook URL per subscription. Omit on create/update unless you need a non-default mode; when absent on the stored client, the effective mode is one_per_client.
  - `webhook_authentication_header` object: Webhook authentication header. (Authentication header that will be used to send webhooks)
  - `access_token_lifetime_seconds` number: Access token lifetime in seconds. (Default is 1 hour)
  - `refresh_token_lifetime_seconds` number: Refresh token lifetime in seconds. (Default is 1 year)

## Response `201`

- Oauth2Client
  - `name` string, required: The name of the client
  - `description` string: The description of the client
  - `client_id` string, required: The client ID
  - `client_secret` string: The client secret
  - `grant_types` number, required: The grants of the client
  - `redirect_uris` string[], required: The redirect URIs of the client
  - `scope` 'admin' | 'identity' | 'profile:read' | 'profile:write' | 'channels:read' | 'channels:write' | 'channels:join' | 'channels:history' | 'mcp:read' | 'mcp:write' | 'cv:read' | 'cv:write' | 'https://www.googleapis.com/auth/calendar.readonly' | 'https://www.googleapis.com/auth/calendar' | 'https://www.googleapis.com/auth/gmail.readonly' | 'https://www.googleapis.com/auth/gmail.modify' | 'https://www.googleapis.com/auth/gmail.send' | 'slack:read' | 'slack:write' | 'microsoft:graph:read' | 'microsoft:graph:write' | 'github:read' | 'github:write' | 'notion:read' | 'notion:write', required: The scopes of the client (space-separated)
  - `client_uri` string: The client URI
  - `created_at` string, date-time, required: The created at date
  - `updated_at` string, date-time, required: The updated at date
  - `access_token_lifetime_seconds` number, required: Access token lifetime in seconds
  - `refresh_token_lifetime_seconds` number, required: Refresh token lifetime in seconds
  - `webhook_url` string: The webhook URL of the client
  - `webhooks_url_mode` 'one_per_client' | 'one_per_subscription': Defines whether the app uses one webhook URL for the whole client or one webhook URL per subscription. Omit on create/update unless you need a non-default mode; when absent on the stored client, the effective mode is one_per_client.
  - `webhook_authentication_header` object: The webhook authentication header of the client. Will be used as the authentication header when sending webhooks to the webhook URL
  - `is_default_subscription_client` boolean: When true, this client is the default portal app for webhook subscriptions (one webhook URL per subscription).

---

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