---
canonical_url: "https://docs.composio.dev/reference/api-reference/toolkits/patchCustomToolkitsBySlug"
markdown_url: "https://docs.composio.dev/reference/api-reference/toolkits/patchCustomToolkitsBySlug.md"
product: "platform"
version: "3.1"
last_updated: null
---

# Update a custom toolkit

**Documentation:** /reference/api-reference/toolkits/patchCustomToolkitsBySlug

> **API version:** This page documents Composio REST API v3.1, the current version, at `https://backend.composio.dev/api/v3.1`. `https://backend.composio.dev/api/v3` is the previous version and remains supported.

Experimental: this endpoint may change. Updates a custom toolkit's name, logo, or API key field text. Omitted fields keep their current value. To change app_url, auth_schemes, or user_id, delete and re-create the toolkit. On a project with 2FA enabled, updating a private toolkit requires the user_id it is private to.

---

## PATCH `/api/v3.1/custom/toolkits/{slug}`

**Endpoint:** `https://backend.composio.dev/api/v3.1/custom/toolkits/{slug}`

**Summary:** Update a custom toolkit

Experimental: this endpoint may change. Updates a custom toolkit's name, logo, or API key field text. Omitted fields keep their current value. To change app_url, auth_schemes, or user_id, delete and re-create the toolkit. On a project with 2FA enabled, updating a private toolkit requires the user_id it is private to.

### Authentication

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

### Path Parameters

- `slug` (string) *(required)*: Custom toolkit slug

### Request Body

Fields to update. Include at least one of name, logo_file, or api_key_field.

**Schema:**

- `name` (string): Display name of the toolkit
- `logo_file` (object): Square PNG or JPEG logo, 256-1024px, max 3MB. Omit to keep the current logo.
  - `content` (string) *(required)*: Base64-encoded image, max 3MB decoded
  - `mime_type` (enum: "image/png" | "image/jpeg") *(required)*: Image MIME type
- `api_key_field` (object): Label and help text for the API key input on the connect page. API_KEY toolkits only.
  - `display_name` (string): Label for the API key input
  - `description` (string): Help text below the API key input
- `user_id` (string): The user the toolkit is private to. Required to update a private toolkit when the project has 2FA enabled; optional for a toolkit shared with all users. Ignored when 2FA is disabled.

**Example:**

```json
{
  "name": "string",
  "logo_file": {
    "content": "string",
    "mime_type": "image/png"
  },
  "api_key_field": {
    "display_name": "string",
    "description": "string"
  },
  "user_id": "string"
}
```

### Responses

#### 200 - Successfully updated toolkit

**Response Schema:**

- `success` (enum: "true") *(required)*: The toolkit was updated

**Example Response:**

```json
{
  "success": true
}
```

#### 400 - Bad request - Invalid parameters, or user_id missing for a private toolkit on a project with 2FA enabled

**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 - Invalid or missing credentials

**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>)

#### 403 - Forbidden - Your role cannot update custom toolkits, or user_id cannot use this toolkit

**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 - Toolkit not found

**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>)

#### 408 - Request timeout

**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>)

#### 409 - Conflict - The toolkit cannot be updated right now

**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>)

#### 429 - Too many requests - Retry after a short backoff

**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 - Failed to update toolkit

**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 requests

Python uses `requests`; TypeScript uses Node.js fetch. Replace sample IDs and values before sending these requests.

Set `COMPOSIO_API_KEY` before running these requests.

#### Python

```python
import os
import requests
import json

response = requests.request("PATCH", "https://backend.composio.dev/api/v3.1/custom/toolkits/string",
    headers={"Content-Type": "application/json", "x-api-key": os.environ["COMPOSIO_API_KEY"]},
    json=json.loads("{\"name\":\"string\",\"logo_file\":{\"content\":\"string\",\"mime_type\":\"image/png\"},\"api_key_field\":{\"display_name\":\"string\",\"description\":\"string\"},\"user_id\":\"string\"}"))
response.raise_for_status()
print(response.text)
```

#### TypeScript

```typescript
const response = await fetch("https://backend.composio.dev/api/v3.1/custom/toolkits/string", {
  method: "PATCH",
  headers: { "Content-Type": "application/json", "x-api-key": process.env["COMPOSIO_API_KEY"]! },
  body: JSON.stringify({
  "name": "string",
  "logo_file": {
    "content": "string",
    "mime_type": "image/png"
  },
  "api_key_field": {
    "display_name": "string",
    "description": "string"
  },
  "user_id": "string"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
```

#### API

```bash
curl -X PATCH "https://backend.composio.dev/api/v3.1/custom/toolkits/string" \
  -H "x-api-key: $COMPOSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "logo_file": {
      "content": "string",
      "mime_type": "image/png"
    },
    "api_key_field": {
      "display_name": "string",
      "description": "string"
    },
    "user_id": "string"
  }'
```

---

## REST API version

The current REST API version is **v3.1**, served at `https://backend.composio.dev/api/v3.1`. Prefer it for new code and new examples.

`https://backend.composio.dev/api/v3` is the previous version. It is frozen with pinned tool-version defaults and remains supported — existing v3 integrations keep working and do not need to migrate.