Create an organization secret
Creates a new secret at the organization level. Organization secrets apply across all projects. Requires admin role. Available on OneCLI Cloud and self-hosted Enterprise.
1Password-sourced values (valueSource: onepassword) are project-only and rejected here — organization secrets must carry an inline value.
Authorizations
API key obtained from the dashboard or GET /user/api-key
Body
1 - 255"Shared Anthropic Key"
anthropic, openai, generic The secret value (API key, token, etc.)
1 - 10000Hostname pattern to match
"api.anthropic.com"
1000How the gateway injects this secret into matching outbound requests (generic secrets only). Exactly one variant:
- Header —
{ "headerName": "Authorization", "valueFormat": "Bearer {value}" } - Query parameter —
{ "paramName": "key", "paramFormat": "{value}" } - URL path template —
{ "pathTemplate": "/bot{value}" }(must start with/and contain{value}exactly once) - URL path regex —
{ "pathRegex": "^/bot([^/]+)", "pathReplacement": "/bot{value}" }(replacement must contain{value})
Unknown or mixed keys are rejected.
- Header injection
- Query parameter injection
- URL path template injection
- URL path regex injection
Response
Secret created
The narrowed secret representation returned by create endpoints.