Skip to main content
Using our API via a dedicated deployment? Just replace api.langdock.com with your deployment’s base URL: <deployment-url>/api/public
Configures the authentication method for an integration. This sets how users connect to the external service — via API key, OAuth, service account, or no authentication.
Changing the authType deletes all existing user connections to this integration. Users will need to reconnect.

Required Scopes

This endpoint requires the INTEGRATION_API scope.

Path Parameters

Request Body

Auth Types

Auth Field Schema

Each auth field defines a credential input that users fill in when connecting to the integration.
The slug must be unique within the integration. The field id is auto-generated — do not include it in the request.

Field Types

OAuth Client Schema

Only relevant when authType is OAUTH or OAUTH_DCR.
OAuth credentials (clientId, clientSecret, authUrl, tokenUrl) are write-only — they are never returned in API responses.

Example: API Key Authentication

Response Format

Success Response (200 OK)

Behavior

  • Auth fields are fully replaced on every call — the entire array is deleted and recreated.
  • Changing authType deletes all existing user connections and any previous OAuth client configuration.
  • Setting authType to NONE, API_KEY, or SERVICE_ACCOUNT deletes any existing OAuth client.
  • OAuth credentials (clientId, clientSecret) are encrypted before storage.

Error Handling

Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on API Key Best Practices.