Skip to Content
kosemdocs
ReferenceAPISecrets

Add secret version in organization

Adds a version to a secret, which becomes its latest. A shared secret's versions are its source's to add.

POST
/v1/organizations/{organization}/secrets/{secret}/versions

Adds a version to a secret, which becomes its latest. A shared secret's versions are its source's to add.

Authorization

bearer
headerAuthorizationBearer <token>

An access token, or an API key.

Path Parameters

organization*string

The organization's ID.

Match^org_[0-7][0-9a-hjkmnp-tv-z]{25}$
secret*string

The secret's ID.

Match^sec_[0-7][0-9a-hjkmnp-tv-z]{25}$

Request Body

application/json
  1. body
payload*

The version's value.

Response Body

Created

application/json
  1. response
createTime*string

When the version was added.

Formatdate-time
destroyTime?string

When the version was destroyed, if it was.

Formatdate-time
name*string

Resource name, …/secrets/{secret_id}/versions/{version}, numbered from 1. A shared secret names its source's versions under itself.

state*string

Whether the version can be read: DISABLED until it is enabled again, and DESTROYED for good.

Value in"ENABLED""DISABLED""DESTROYED"
Example Request
curl -X POST 'https://api.kosem.ai/v1/organizations/string/secrets/string/versions' \
  -H 'Content-Type: application/json' \
  -d '{
  "payload": {
    "data": "string"
  }
}'
Example Response
{
  "createTime": "2019-08-24T14:15:22Z",
  "destroyTime": "2019-08-24T14:15:22Z",
  "name": "string",
  "state": "ENABLED"
}