跳转到主要内容
POST
/
v3beta1
/
organizations
/
{org_id}
/
secrets
创建组织级密钥
curl --request POST \
  --url https://api.devin.ai/v3beta1/organizations/{org_id}/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "<string>",
  "type": "cookie",
  "value": "<string>",
  "is_sensitive": true,
  "note": "<string>"
}
'
{
  "access_type": "org",
  "created_at": 123,
  "created_by": "<string>",
  "is_sensitive": true,
  "key": "<string>",
  "note": "<string>",
  "secret_id": "<string>",
  "secret_type": "cookie"
}

权限

需要具有组织层级 ManageOrgSecrets 权限的服务用户。

授权

Authorization
string
header
必填

服务用户凭据(前缀:cog_)

请求体

application/json
key
string
必填
type
enum<string>
必填
可用选项:
cookie,
key-value,
totp
value
string
必填
is_sensitive
boolean
默认值:true
note
string | null

响应

成功响应

access_type
enum<string>
必填
可用选项:
org,
personal
created_at
integer
必填
created_by
string
必填
is_sensitive
boolean
必填
key
string | null
必填
note
string | null
必填
secret_id
string
必填
secret_type
enum<string>
必填
可用选项:
cookie,
key-value,
totp