---
title: "Create a confidential OAuth client (client ID and secret) for an agent platform."
method: POST
path: "/v1/workspaces/{workspaceId}/oauth-clients"
---

# Create a confidential OAuth client (client ID and secret) for an agent platform.

`POST /v1/workspaces/{workspaceId}/oauth-clients`

## Request

- Base URL: `https://api.bangermail.com`
- URL: `https://api.bangermail.com/v1/workspaces/{workspaceId}/oauth-clients`
- Auth: HTTP bearer

Owners and admins only. Each member who connects through the client signs in to Banger, approves access, and acts with their own role in this workspace.

## Request body

- CreateWorkspaceOAuthClientRequest
  - `name` string: Shown in Connected apps. Defaults to "Gemini Enterprise" for that preset.
  - `preset` 'gemini_enterprise' | 'custom': gemini_enterprise uses Google's redirect URI; custom requires redirect_uris.
  - `redirect_uris` string[]: Custom preset only. HTTPS redirect URIs, fixed at creation.

## Response `201`

OAuth client created. The client secret is returned only once.

- object
  - `data` object, required
    - `client_id` string, required
    - `name` string, required
    - `preset` 'gemini_enterprise' | 'custom', required
    - `client_surface` 'codex' | 'chatgpt' | 'claude' | 'grok' | 'gemini' | 'other_agent', required: The agent platform behind an OAuth connection, from the client's name and redirect URIs.
    - `redirect_uris` string[], required
    - `connections` integer, required: Active connections made through this client.
    - `created_at` string, date-time, required
    - `created_by_you` boolean, required
    - `setup` object, required: The values to enter in the agent platform's custom MCP server form.
      - `server_url` string, uri, required
      - `authorization_url` string, uri, required
      - `token_url` string, uri, required
      - `scopes` string, required: Space-separated. offline_access asks for a refresh token, which every connection has.
      - `token_endpoint_auth_methods` string[], required
    - `client_secret` string, required

---

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