# Replace integrations provider

Save one provider's wiring. `config` is REPLACED whole when present and left alone when absent; each field in `secrets` is sealed one at a time, and an empty string there means KEEP the stored credential — there is no way to clear a single one. `connected` switches the integration on or pauses it without discarding anything. Admin only, and nothing sealed here is ever readable again.

Access class: `workspace:admin`.

## Endpoint

`PUT /v1/integrations/{provider}`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| provider | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "config": {},
    "connected": true,
    "secrets": {}
  },
  "params": {
    ":provider": "string"
  },
  "query": {}
}
```

## Responses

### 200

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "config": {},
    "createdAt": "string",
    "provider": "string",
    "secrets": {},
    "status": "string",
    "updatedAt": "string",
    "updatedBy": 1.5
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
