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

# Unlink a Private Template from GitHub

> Removes the link between a private template and its GitHub repository, so pushes no longer publish versions.

After unlinking, pushes no longer publish versions. Existing versions and the apps created from the template are not affected. You can link again at any time with [Link a Private Template to GitHub](https://docs.vertracloud.app/api-reference/endpoint/templates/github-link.md). Only the owner of the template can unlink it.

Needs the `templates:write` scope when called with an API key.

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

The template ID.

**workspace\_id** `string`

If the template belongs to a workspace, the workspace's ID.

```bash cURL theme={null}
curl -X DELETE https://api.vertracloud.app/v1/templates/tpl-abc123def456/github \
  -H "Authorization: Bearer $VERTRA_API_KEY"
```

### Response

The template object of [Create a Private Template](https://docs.vertracloud.app/api-reference/endpoint/templates/create.md), now with `github` set to `null`.

**response** `object`

The template.

**Toggle object**

**github** `object | null`

`null` after unlinking.

**id** `string`

The template ID. The other fields are the ones listed in [Create a Private Template](https://docs.vertracloud.app/api-reference/endpoint/templates/create.md).

```json Response theme={null}
{
  "response": {
    "id": "tpl-abc123def456",
    "slug": "support-bot",
    "origin": "private",
    "github": null
  }
}
```

### Error Responses

**code** `string`

The error code indicating the reason for the failure. Possible values:

* `API_KEY_SCOPE_DENIED`: The API key does not have the `templates:write` scope (`403`).
* `TEMPLATE_NOT_FOUND`: The template does not exist or is not yours (`404`).
* `WORKSPACE_OWNER_ONLY`: Only the workspace owner unlinks its templates.

```json Error Response theme={null}
{
  "code": "TEMPLATE_NOT_FOUND"
}
```


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