# Fork connector into org-owned copy

> Source: https://elaichi.ai/docs/api-reference/custom-connectors/connector/forkconnector/

`POST /connector/{slug}/fork`

Resource: **Connector** · API: **Custom connectors**

## Path parameters

- **`slug`** _(string, required)_
  Resource id

## Request body

- **`new_slug`** _(string)_
- **`label`** _(string)_

## Code examples

### curl

```bash
curl -X POST 'https://api.elaichi.ai/connector/<slug>/fork' \
  -H 'Authorization: Bearer $ELAICHI_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{"new_slug":"your_new_slug","label":"your_label"}'
```

### JavaScript

```javascript
const body = {
  "new_slug": "your_new_slug",
  "label": "your_label"
};

const response = await fetch('https://api.elaichi.ai/connector/<slug>/fork', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer ' + process.env.ELAICHI_API_TOKEN,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(body),
});

const data = await response.json();
console.log(data);
```

### Python

```python
import os
import requests

url = "https://api.elaichi.ai/connector/<slug>/fork"
headers = {
    "Authorization": f"Bearer {os.environ['ELAICHI_API_TOKEN']}",
    "Content-Type": "application/json",
}
payload = {
    "new_slug": "your_new_slug",
    "label": "your_label"
}

response = requests.post(url, headers=headers, json=payload)
print(response.json())
```
