> ## 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.

# Remove Stack Member

> Takes an application, database or Blob folder out of a stack without deleting it, choosing what happens to its variables.

Takes a member out of the stack. The resource is **not deleted**. Taking out a member that came from a template detaches the stack from the template: it stops receiving versions. An application of a [closed template](https://docs.vertracloud.app/templates/use/closed-templates.md) cannot leave. Needs the `stacks:write` scope when called with an API key.

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

The stack ID.

**resource\_type** `string` *required*

`application`, `database` or `blob`.

**resource\_id** `string` *required*

The ID of the application or database. For a Blob folder, the ID of the member, as in `members` of [Get Stack](https://docs.vertracloud.app/api-reference/endpoint/stacks/get.md).

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

What happens to the variables the member's connections created:

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

**blob** `string` (default: keep)

For a Blob member: `keep` leaves the files, `delete` removes them. In both cases the key the platform created for the stack is revoked.

**workspace\_id** `string`

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

### Response

The updated stack with `restart_required` and `apps_to_restart`, as in [Create Stack](https://docs.vertracloud.app/api-reference/endpoint/stacks/create.md). Applications read variables only when they start: restart the listed ones.

### Errors

| Status | Code | When |
| - | - | - |
| 403 | `STACK_SERVICE_LOCKED` | The member comes from a closed template and cannot leave the stack. |
| 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_MEMBER_NOT_FOUND` | The resource is not a member of the stack. |


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