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

# Link Template or Stack

> Moves a private template, or a stack, from your account to a workspace. Owner only. Also available as /stacks/{stack_id}.

Moves one of your private templates to the workspace. The same rules apply to a stack on `POST https://api.vertracloud.app/v1/workspaces/{id}/stacks/{stack_id}`; a stack moves only when all its members are already in the workspace. Same rules as [Link Application](https://docs.vertracloud.app/api-reference/endpoint/workspaces/links/add-app.md): owner only, `workspaces:write` scope for an API key, and the resource must be owned by the caller.

### Path

**id** `string` *required*

Workspace ID.

**template\_id** `string` *required*

Template ID. For a stack, use `/stacks/{stack_id}` with the stack ID instead.

### Response

Empty response on success.

### Errors

| Status | Code | When |
| - | - | - |
| 403 | `WORKSPACE_OWNER_ONLY` | Caller isn't the workspace owner. |
| 403 | `PLAN_RESTRICTED_FEATURE` | Owner's plan is frozen. |
| 404 | `WORKSPACE_NOT_FOUND` | Workspace doesn't exist or you're not a member. |
| 404 | `TEMPLATE_NOT_FOUND` | The template doesn't exist or isn't owned by the caller. |
| 404 | `STACK_NOT_FOUND` | The stack doesn't exist or isn't owned by the caller. |
| 409 | `STACK_MEMBER_CONFLICT` | A member of the stack is not in the workspace. |


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