Skip to main content
POST
/
org
/
secrets
Create an organization secret
curl --request POST \
  --url https://api.onecli.sh/v1/org/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Shared Anthropic Key",
  "value": "<string>",
  "hostPattern": "api.anthropic.com",
  "pathPattern": "<string>",
  "injectionConfig": {}
}
'
{
  "id": "<string>",
  "name": "<string>",
  "hostPattern": "<string>",
  "pathPattern": "<string>",
  "injectionConfig": {},
  "isPlatform": true,
  "scope": "<string>",
  "typeLabel": "<string>",
  "createdAt": "2023-11-07T05:31:56Z"
}

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.

Authorizations

Authorization
string
header
required

API key obtained from the dashboard or GET /user/api-key

Body

application/json
name
string
required
Required string length: 1 - 255
Example:

"Shared Anthropic Key"

type
enum<string>
required
Available options:
anthropic,
openai,
generic
value
string
required

The secret value (API key, token, etc.)

Required string length: 1 - 10000
hostPattern
string
required

Hostname pattern to match

Example:

"api.anthropic.com"

pathPattern
string
Maximum string length: 1000
injectionConfig
object

Configuration for how the gateway injects this secret into outbound requests.

Response

Secret created

id
string
name
string
type
enum<string>
Available options:
anthropic,
openai,
generic
hostPattern
string
pathPattern
string | null
injectionConfig
object

Configuration for how the gateway injects this secret into outbound requests.

isPlatform
boolean
scope
string
typeLabel
string
createdAt
string<date-time>