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

# Organization secrets API: Share Keys Across Workspaces

> Create, list, update, and delete organization secrets with the OneCLI API. One shared credential reaches every workspace, and agents never see its value.

Organization secrets are credentials, such as an API key or an LLM key, that an admin stores once and shares into every workspace in the organization. Any agent can then be granted the secret, and the gateway injects it into matching requests without the agent ever reading the value.

Use these endpoints to manage the shared pool from scripts or CI. For secrets that belong to a single workspace, use the [Secrets](https://onecli.sh/docs/api-reference/secrets) endpoints. To decide which agents may use a secret, see [Agent access](https://onecli.sh/docs/guides/agent-access.md).

## Related guides

* [Agent access: grant credentials to agents](https://onecli.sh/docs/guides/agent-access.md)
* [How it works: the gateway injects credentials](https://onecli.sh/docs/how-it-works.md)

## Endpoints

| Endpoint | Method and path | What it does |
| - | - | - |
| [List organization secrets](https://onecli.sh/docs/api-reference/organization-secrets/list-organization-secrets.md) | `GET /org/secrets` | List every organization secret shared into your workspaces. |
| [Create an organization secret](https://onecli.sh/docs/api-reference/organization-secrets/create-an-organization-secret.md) | `POST /org/secrets` | Create an organization secret that every workspace can use. |
| [Update an organization secret](https://onecli.sh/docs/api-reference/organization-secrets/update-an-organization-secret.md) | `PATCH /org/secrets/{secretId}` | Update an organization secret's value, name, or host pattern. |
| [Delete an organization secret](https://onecli.sh/docs/api-reference/organization-secrets/delete-an-organization-secret.md) | `DELETE /org/secrets/{secretId}` | Permanently delete an organization secret, removing it from every workspace. |

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