> ## Documentation Index
> Fetch the complete documentation index at: https://docs.60db.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Integration

> Rename a connection or change its credentials. Any field change runs a new live test

Change the name or the field values of a connection. Send at least one of `name` or `fields`.

* Fields you send are merged with the stored values. Secrets you leave out keep their stored value.
* If a destination field changes (for example the URL of a webhook or MCP server), the stored headers are dropped. Send any required secret again.
* Any change to `fields` runs a new live test. The change is saved even when the test fails. Check `status` and `last_error` in the response.
* A custom webhook keeps its signing secret when its URL changes.

## Request

### Headers

**Authorization** `string` *required*

Bearer token with your API key (scope `agents`)

**Content-Type** `string` *required*

application/json

### Path

**id** `string` *required*

The connection `id` (UUID)

### Body

**name** `string`

1 to 64 characters, unique in the workspace

**fields** `object`

Field values to change, keyed by the catalog `key`. Same rules as [Create integration](https://docs.60db.ai/api-reference/agents/create-integration.md)

## Response

**200 OK** with the connection. The fields match [List integrations](https://docs.60db.ai/api-reference/agents/list-integrations.md). `status` and `last_tested_at` show the result of the new test when `fields` changed. `used_by` lists the agents that hold the connection's tools.

## Errors

| Status | Code | Meaning |
| - | - | - |
| 400 | `VALIDATION_ERROR` | The body is empty or a field is invalid. `field` names it |
| 400 | `INTEGRATION_SECRETS_REQUIRED` | The destination changed and a required secret was not sent again. `field` is `fields.<key>` |
| 403 | `POLICY_DENY` | Your role cannot manage integrations, or the API key lacks the `agents` scope |
| 404 | `INTEGRATION_NOT_FOUND` | No connection with this ID in your workspace |
| 409 | `INTEGRATION_NAME_TAKEN` | Another integration already uses this name |
| 422 | `INTEGRATION_URL_REJECTED` | The new URL is not public `https` on port 443, or points to a private address |
| 429 | `RATE_LIMITED` | More than 10 integration changes in the last minute |

## Example

```bash cURL theme={null}
curl -X PATCH https://api.60db.ai/agents/integrations/INTEGRATION_ID \
  -H "Authorization: Bearer your-api-key" \
  -H "Content-Type: application/json" \
  -d '{"fields": {"token": "pat-NEW_TOKEN"}}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.