# Connected apps

Apps you allowed through OAuth, such as MCP clients. Signed-in session only.

## Endpoints

- [Disconnect an app](https://developers.lydie.co/api/connected-apps/disconnect-an-app.md): `DELETE /v1/oauth-grants/{grantId}`
- [List connected apps](https://developers.lydie.co/api/connected-apps/list-connected-apps.md): `GET /v1/workspaces/{workspaceId}/oauth-grants`

## The OAuthGrant object

- `id` (string, required): (1–64 chars)
- `workspaceId` (string, required): (1–64 chars)
- `client` (object, required)
  - `id` (string, required)
  - `name` (string, required)
  - `uri` (string, optional)
- `scopes` (string[], required)
- `createdAt` (string, required)
- `lastUsedAt` (string, required, nullable)

```json
{
  "id": "string",
  "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
  "client": {
    "id": "string",
    "name": "Notes",
    "uri": "string"
  },
  "scopes": [
    "docs:read"
  ],
  "createdAt": "string",
  "lastUsedAt": null
}
```
