# Update a connector

Update the name, purpose, data-source type, or configuration of a saved connector. Send only fields that need to change; all other fields retain their current values.

```text
PUT $CLOUDSIGMA_API_BASE/connectors/{connector_id}
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

First [get connector details](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/get-connector.html.md) to confirm the connector to change.

The example uses:

- `$CONNECTOR_ID`: the connector ID to update.
- `$NEW_CONNECTOR_NAME`: the updated connector name.

When changing `source_type` or `config`, send the complete nested configuration that matches the target data-source type. For complete types, fields, and authentication branches, see [Type-specific configuration fields for creating a connector](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/create-connector.html.md#type-specific-configuration-fields). Do not send `usage_type: 0` or an empty array; omit `usage_type` to retain the current purpose.

## Request example

```bash
curl -X PUT "$CLOUDSIGMA_API_BASE/connectors/$CONNECTOR_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID" \
  -H 'Content-Type: application/json' \
  -d "{
    \"name\": \"$NEW_CONNECTOR_NAME\"
  }"
```

## Path parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `connector_id` | string | Connector ID to update. |

## Request body

All request-body fields are optional. The example changes only the connector name.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | No | New connector name. |
| `source_type` | integer | No | New data-source type code. When changing it, also send the `config` matching the new type. For available types, see [Connectors](https://omnifabric.cloudsigma.com/docs/guides/ai-studio/data-sources/connectors.html.md#select-a-data-source-type). |
| `usage_type` | integer or integer[] | No | New purpose bitmask: `1` = import and `2` = export. You can send a single integer or an array with the same meaning: `1` and `[1]`, `2` and `[2]`, and `3` and `[1, 2]`. Omitting this field retains the current purpose; do not send `0` or `[]`. Available values depend on the target `source_type`; the Langfuse edit form does not show this option. |
| `config` | object | No | Type-specific connection configuration. When sent, it replaces the saved connection configuration. For top-level keys and complete fields, see [Type-specific configuration fields for creating a connector](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/create-connector.html.md#type-specific-configuration-fields). |

`[]` after a type denotes an array. `[]` in a field path denotes each item in an array.

## Successful response

When the response `code` is `OK`, the update request has completed. `data` is `null`; [get connector details](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/get-connector.html.md) again to confirm the result.

```json
{
  "code": "OK",
  "msg": "OK",
  "data": null
}
```

Response fields are as follows.

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data` | null | This endpoint does not return the updated connector object. |

## Error response

`HTTP 200` does not necessarily mean that the update succeeded. Always check `code`; only `code: "OK"` means the update completed.

```json
{
  "code": "ErrParamInvalid",
  "msg": "invalid connector parameters",
  "data": null
}
```

### Common HTTP errors

```{list-table}
:header-rows: 1
:widths: 12 22 32 34

* - HTTP status
  - Error code
  - Common cause
  - Recommended action
* - `400`
  - `ErrParamInvalid`
  - Invalid JSON, a name with disallowed characters, or an invalid purpose value was submitted.
  - Correct the request body and retry.
* - `404`
  - `ErrNotFound`
  - The request or existing connector uses a data-source type that is not currently enabled.
  - Select a currently available data-source type.
* - `200`
  - `ErrServer`
  - The service could not update the connector.
  - Check `code`; the update did not complete and can be retried later.
```

## Next steps

This endpoint returns `data: null` on success. Use the same `connector_id` to [get connector details](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/get-connector.html.md) and confirm its name, purpose, and status. If you changed the connection configuration, [validate connector configuration](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/validate-connector.html.md) before using it in tasks. To remove the connector, first confirm that it has no related tasks, then [delete the connector](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-connections/connectors/delete-connector.html.md).
