POST
/
rest
/
secrets
curl --request POST \
  --url https://copilotz.com/rest/secrets \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "SECRET_NAME",
  "value": "SECRET_VALUE",
  "createdBy": 1
}'
{
  "name": "SECRET_NAME",
  "value": "SECRET_VALUE",
  "createdBy": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request payload for creating or updating a secret.

name
string
required

Name of the secret.

Example:

"SECRET_NAME"

value
string
required

Value of the secret.

Example:

"SECRET_VALUE"

createdBy
integer
required

ID of the user who created the secret.

Example:

1

Response

200 - application/json
Successful response

Response containing secret details.

name
string
required

Name of the secret.

Example:

"SECRET_NAME"

value
string
required

Value of the secret.

Example:

"SECRET_VALUE"

createdBy
integer
required

ID of the user who created the secret.

Example:

1