# Enable or disable an authentication configuration

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

Updates the status of an authentication configuration to either enabled or disabled. Disabled configurations cannot be used for new connections.

---

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

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

**Summary:** Enable or disable an authentication configuration

Updates the status of an authentication configuration to either enabled or disabled. Disabled configurations cannot be used for new connections.

### 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
- `status` (enum: "ENABLED" | "DISABLED") *(required)*: The new status to set for the auth configuration

### Responses

#### 200 - Successfully updated auth config status

**Response Schema:**


#### 400 - Bad request - Invalid auth config ID or status value

**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/ENABLED" \
  -H "x-api-key: YOUR_API_KEY"
```