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

# Sync a custom toolkit

**Documentation:** /reference/v3/api-reference/toolkits/postCustomToolkitsSync

> **API version:** This page documents Composio REST API v3.0 at `https://backend.composio.dev/api/v3`, the previous version. v3.1 is current, at `https://backend.composio.dev/api/v3.1` — the same page on v3.1 is /reference/api-reference/toolkits/postCustomToolkitsSync.md.

Experimental: custom toolkits are in pilot and this contract may change. Re-fetches tool definitions from the remote MCP server for the custom toolkit with the provided slug. Call it when automatic sync fails or the remote tool definitions change.

---

## POST `/api/v3/custom/toolkits/sync`

**Endpoint:** `https://backend.composio.dev/api/v3/custom/toolkits/sync`

**Summary:** Sync a custom toolkit

Experimental: custom toolkits are in pilot and this contract may change. Re-fetches tool definitions from the remote MCP server for the custom toolkit with the provided slug. Call it when automatic sync fails or the remote tool definitions change.

### Authentication

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

### Request Body

Toolkit sync data

**Schema:**

- `slug` (string) *(required)*: Toolkit slug to sync
- `connected_account_id` (string (connectedAccountId)): The unique identifier for the connected account

**Example:**

```json
{
  "slug": "string",
  "connected_account_id": "string"
}
```

### Responses

#### 200 - Successfully synced toolkit

**Response Schema:**

- `slug` (string) *(required)*: Synced toolkit slug
- `version` (string) *(required)*: Version of the toolkit created after sync
- `synced_count` (number) *(required)*: Number of tools synced for toolkit

**Example Response:**

```json
{
  "slug": "string",
  "version": "string",
  "synced_count": 1
}
```

#### 400 - Bad request - Invalid parameters

**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 - The caller cannot write custom toolkits

**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 - Toolkit already exists

**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 sync 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("POST", "https://backend.composio.dev/api/v3/custom/toolkits/sync",
    headers={"Content-Type": "application/json", "x-api-key": os.environ["COMPOSIO_API_KEY"]},
    json=json.loads("{\"slug\":\"string\",\"connected_account_id\":\"string\"}"))
response.raise_for_status()
print(response.text)
```

#### TypeScript

```typescript
const response = await fetch("https://backend.composio.dev/api/v3/custom/toolkits/sync", {
  method: "POST",
  headers: { "Content-Type": "application/json", "x-api-key": process.env["COMPOSIO_API_KEY"]! },
  body: JSON.stringify({
  "slug": "string",
  "connected_account_id": "string"
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.text());
```

#### API

```bash
curl -X POST "https://backend.composio.dev/api/v3/custom/toolkits/sync" \
  -H "x-api-key: $COMPOSIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "slug": "string",
    "connected_account_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.