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

# Delete Stack Connection

> Removes a connection of a stack, keeping or deleting the variables it created.

Removes a connection. The members stay in the stack. Needs the `stacks:write` scope when called with an API key.

**stack\_id** `string` *required*

The stack ID.

**binding\_id** `string` *required*

The connection ID.

**variables** `string` (default: keep\_connection)

What happens to the variables the connection created:

* `keep_connection`: they become ordinary variables and the certificates stay, so the application keeps connecting.
* `remove_variables`: the variables and the certificates copied to the application are deleted.

**workspace\_id** `string`

The workspace the stack belongs to, when you act on it as the workspace owner.

### Response

**response** `object`

**Toggle object**

**restart\_required** `boolean`

`true` when variables were removed from an application (`variables=remove_variables`): it must restart to stop reading them.

**apps\_to\_restart** `string[]`

The applications that need a restart.

```json Response theme={null}
{
  "response": { "restart_required": true, "apps_to_restart": ["app-abc123def456"] }
}
```

### Errors

| Status | Code | When |
| - | - | - |
| 403 | `WORKSPACE_OWNER_ONLY` | You are a workspace member, not the owner. |
| 404 | `STACK_NOT_FOUND` | The stack does not exist or belongs to another account. |
| 404 | `STACK_BINDING_NOT_FOUND` | The stack has no connection with that ID. |


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