# Disconnect one GitHub account's installation from this workspace.

> `installationId` is GitHub's id (`installations[].installationId`).
> https://koi.dog/docs/api/github/unlink-git-hub-installation-by-id/

`DELETE /api/v1/github/installations/{installationId}` · Scopes: `config`, `approve`

Koidog stops using that installation at once and forgets its tokens; the other linked accounts are untouched, and the App stays installed on GitHub (`manageUrl` removes it there). Already unlinked: `204`. `404 not_found` when it was never linked to this workspace. `409 connection_in_use` while a crew that is not over uses a repository on that account and no legacy token is stored. The timeline records the key ID, action and outcome.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `installationId` | `string` | yes | GitHub's id of the linked installation to unlink, as decimal digits: `installations[].installationId` from `GET /github/installation`. |

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Retry the same request with the same key. [Retry rules](https://koi.dog/docs/api/#retries). |

## Response.

204 No Content

## Request.

```sh
curl -X DELETE "https://api.koi.dog/api/v1/github/installations/$INSTALLATION_ID" \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch(`https://api.koi.dog/api/v1/github/installations/${process.env.INSTALLATION_ID}`, {
  method: "DELETE",
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(res.status);
```

```python
import os

import requests

r = requests.delete(
    f"https://api.koi.dog/api/v1/github/installations/{os.environ['INSTALLATION_ID']}",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.status_code)
```
