---
title: "Create new authentication configuration"
method: POST
path: "/api/v3.1/auth_configs"
tags: ["Auth Configs"]
---

# Create new authentication configuration

`POST /api/v3.1/auth_configs`

Creates a new auth config for a toolkit, allowing you to use your own OAuth credentials or API keys instead of Composio-managed authentication. This is required when you want to use custom OAuth apps (bring your own client ID/secret) or configure specific authentication parameters for a toolkit.

## Request body

- object
  - `toolkit` object, required
    - `slug` string, required — Toolkit slug to create auth config for
  - `auth_config` union
    - object
      - `type` 'use_composio_managed_auth', required
      - `name` string — The name of the integration
      - `credentials` object
        - `scopes` union — OAuth scopes requested for the managed auth config.
          - string
          - string[]
        - `user_scopes` union — OAuth user-token scopes requested for the managed auth config. This is primarily used by Slack OAuth v2.
          - string
          - string[]
      - `tool_access_config` object
        - `tools_for_connected_account_creation` string[] — Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes.
      - `restrict_to_following_tools` string[] — Use tool_access_config instead. This field will be deprecated in the future.
      - `shared_credentials` object — [EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config
      - `is_enabled_for_tool_router` boolean — Whether this auth config is enabled for tool router
    - object
      - `type` 'use_custom_auth', required
      - `name` string — The name of the integration
      - `authScheme` 'OAUTH2' | 'OAUTH1' | 'API_KEY' | 'BASIC' | 'BILLCOM_AUTH' | 'BEARER_TOKEN' | 'GOOGLE_SERVICE_ACCOUNT' | 'NO_AUTH' | 'BASIC_WITH_JWT' | 'CALCOM_AUTH' | 'SERVICE_ACCOUNT' | 'SAML' | 'DCR_OAUTH' | 'S2S_OAUTH2', required
      - `credentials` object
        - `scopes` union — OAuth scopes requested for the custom auth config.
          - string
          - string[]
        - `user_scopes` union — OAuth user-token scopes requested for the custom auth config. This is primarily used by Slack OAuth v2.
          - string
          - string[]
      - `proxy_config` object, nullable
        - `proxy_url` string, uri, required — The url of the auth proxy
        - `proxy_auth_key` string — The auth key for the auth proxy
      - `restrict_to_following_tools` string[] — Use tool_access_config instead. This field will be deprecated in the future.
      - `tool_access_config` object
        - `tools_for_connected_account_creation` string[] — Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes.
      - `shared_credentials` object — [EXPERIMENTAL] Shared credentials that will be inherited by all connected accounts using this auth config
      - `is_enabled_for_tool_router` boolean — Whether this auth config is enabled for tool router

## Response `201`

Successfully created auth config

- object
  - `toolkit` object, required
    - `slug` string, required — The unique key of the toolkit
  - `auth_config` object, required
    - `id` string, authConfigId, required — The auth config id of the toolkit (must be a valid auth config id)
    - `auth_scheme` string, required — The authentication mode of the toolkit
    - `is_composio_managed` boolean, required — Whether the auth config is managed by Composio
    - `restrict_to_following_tools` string[] — The tools that the user can use with the auth config

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1.md) · [All operations](https://skmtc.net/composiohq/apis/composio-platform-api-v3-1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/composiohq/composio-platform-api-v3-1/versions/4239836857f8/schema)
