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

redirect_urisstring[] 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_typesGrantType[] required

Allowed grant types

response_typesOauth2ResponseType[] required

Allowed response types

client_namestring required

Client name

client_uristring

Client URI

scopestring

OAuth2 scopes

webhook_urlstring

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_headerobject

Webhook authentication header. (Authentication header that will be used to send webhooks)

access_token_lifetime_secondsnumber

Access token lifetime in seconds. (Default is 1 hour)

refresh_token_lifetime_secondsnumber

Refresh token lifetime in seconds. (Default is 1 year)

Example request

{
  "redirect_uris": [
    "https://my-app.com/oauth/callback"
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token"
  ],
  "response_types": [
    "code",
    "token"
  ],
  "client_name": "MCP Inspector",
  "client_uri": "https://github.com/modelcontextprotocol/inspector",
  "scope": "mcp:read mcp:write",
  "webhook_url": "https://my-app.com/webhooks",
  "webhook_authentication_header": {
    "x-api-key": "1234567890"
  },
  "access_token_lifetime_seconds": 3600,
  "refresh_token_lifetime_seconds": 31536000
}

Response

namestring required

The name of the client

descriptionstring

The description of the client

client_idstring required

The client ID

client_secretstring

The client secret

grant_typesnumber required

The grants of the client

redirect_urisstring[] 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_uristring

The client URI

created_atstring date-time required

The created at date

updated_atstring date-time required

The updated at date

access_token_lifetime_secondsnumber required

Access token lifetime in seconds

refresh_token_lifetime_secondsnumber required

Refresh token lifetime in seconds

webhook_urlstring

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_headerobject

The webhook authentication header of the client. Will be used as the authentication header when sending webhooks to the webhook URL

is_default_subscription_clientboolean

When true, this client is the default portal app for webhook subscriptions (one webhook URL per subscription).

Changes

No recorded changes to this operation across all 1 revision of this API.