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

# Set Stack Network Mode

> Sets how the members of a stack reach each other. The accepted mode is `public`.

Only `public` is accepted: the members use the public addresses of the services, and databases are reached with client certificates. Any other value fails with `STACK_NETWORK_MODE_UNAVAILABLE`. Needs the `stacks:write` scope when called with an API key.

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

The stack ID.

**workspace\_id** `string`

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

**network\_mode** `string` *required*

`public`.

### Response

The stack, as in [Get Stack](https://docs.vertracloud.app/api-reference/endpoint/stacks/get.md).

### Errors

| Status | Code | When |
| - | - | - |
| 400 | `STACK_NETWORK_MODE_UNAVAILABLE` | The mode is not `public`. |
| 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. |


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