> ## Documentation Index
> Fetch the complete documentation index at: https://onecli.sh/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Connections API: Manage Connected App Accounts

> List, rename, and disconnect connected app accounts with the OneCLI API. See workspace and organization connections side by side in one response.

A connection is an app account you connected to OneCLI, such as a Gmail inbox or a GitHub account. Agents use connections through grants, and the gateway supplies the account's credentials on their behalf.

Use these endpoints to audit and clean up connected accounts. To create a connection, use the [Apps](https://onecli.sh/docs/api-reference/apps) endpoints. For the full picture, see [App connections](https://onecli.sh/docs/integrations/app-connections.md).

## Related guides

* [App connections: connect accounts for agents](https://onecli.sh/docs/integrations/app-connections.md)
* [Agent access: grant connections to agents](https://onecli.sh/docs/guides/agent-access.md)

## Endpoints

| Endpoint | Method and path | What it does |
| - | - | - |
| [List connections](https://onecli.sh/docs/api-reference/connections/list-connections.md) | `GET /connections` | List every connected account your workspace can use, newest first, including organization connections. |
| [Rename a connection](https://onecli.sh/docs/api-reference/connections/rename-a-connection.md) | `PATCH /connections/{connectionId}` | Rename a connection to tell apart multiple accounts of the same app. |
| [Disconnect](https://onecli.sh/docs/api-reference/connections/disconnect.md) | `DELETE /connections/{connectionId}` | Disconnect an app account and remove every grant that referenced it. |

## Next steps

* [API overview](https://onecli.sh/docs/api-reference.md): base URLs, authentication, and pagination
* [Errors](https://onecli.sh/docs/api-reference/errors.md): status codes and the error format
* [Editions](https://onecli.sh/docs/api-reference/editions.md): which endpoints each edition serves


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