# Update an authentication configuration

**Documentation:** /reference/api-reference/auth-configs/patchAuthConfigsByNanoid

Modifies an existing authentication configuration with new credentials or other settings. Only specified fields will be updated.

---

## PATCH `/api/v3/auth_configs/{nanoid}`

**Endpoint:** `https://backend.composio.dev/api/v3/auth_configs/{nanoid}`

**Summary:** Update an authentication configuration

Modifies an existing authentication configuration with new credentials or other settings. Only specified fields will be updated.

### Authentication

**ApiKeyAuth** - API Key in `header` header `x-api-key` OR **UserApiKeyAuth** - API Key in `header` header `x-user-api-key`

### Path Parameters

- `nanoid` (string (authConfigId)) *(required)*: The unique identifier of the authentication configuration to update

### Request Body

**Schema:**

*One of:*
  - `type` (enum: "custom") *(required)*
  - `name` (string): The display name of the authentication configuration
  - `credentials` (object)
    - `scopes` (any)
    - `user_scopes` (any)
  - `proxy_config` (object,null)
  - `restrict_to_following_tools` (array<string>): Use tool_access_config instead. This field will be deprecated in the future.
  - `tool_access_config` (object)
    - `tools_for_connected_account_creation` (array<string>): Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes.
    - `tools_available_for_execution` (array<string>): The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config.
  - `shared_credentials` (object): Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config.
    - `[key: string]` (any)
  - `is_enabled_for_tool_router` (boolean): Whether this auth config is enabled for tool router
  - `type` (enum: "default") *(required)*
  - `name` (string): The display name of the authentication configuration
  - `scopes` (any)
  - `restrict_to_following_tools` (array<string>): Use tool_access_config instead. This field will be deprecated in the future.
  - `tool_access_config` (object)
    - `tools_for_connected_account_creation` (array<string>): Tools used to generate the minimum required scopes for the auth config (only valid for OAuth). If passed, this will update the scopes.
    - `tools_available_for_execution` (array<string>): The actions that the user can perform on the auth config. If passed, this will update the actions that the user can perform on the auth config.
  - `shared_credentials` (object): Shared credentials that will be inherited by connected accounts. For eg: this can be used to share the API key for a tool with all connected accounts using this auth config.
    - `[key: string]` (any)
  - `is_enabled_for_tool_router` (boolean): Whether this auth config is enabled for tool router

**Example:**

```json
null
```

### Responses

#### 200 - Successfully updated auth config

**Response Schema:**


#### 400 - Bad request - Invalid input or credentials format

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 401 - Unauthorized - Authentication required

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 404 - Not found - Auth configuration does not exist

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

#### 500 - Internal server error - Something went wrong on the server

**Response Schema:**

- `error` (object) *(required)*
  - `message` (string) *(required)*
  - `code` (number) *(required)*
  - `slug` (string) *(required)*
  - `status` (number) *(required)*
  - `request_id` (string)
  - `suggested_fix` (string)
  - `errors` (array<string>)

### Example cURL Request

```bash
curl -X PATCH "https://backend.composio.dev/api/v3/auth_configs/string" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d 'null'
```