POST
/
cloud
/
v1
/
secrets
/
{project_id}
/
{region_id}
Create secret
curl --request POST \
  --url https://api.gcore.com/cloud/v1/secrets/{project_id}/{region_id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "algorithm": "aes",
  "bit_length": 256,
  "expiration": "2025-12-28T19:14:44.180394",
  "mode": "cbc",
  "name": "AES key",
  "payload": "aGVsbG8sIHRlc3Qgc3RyaW5nCg==",
  "payload_content_encoding": "base64",
  "payload_content_type": "application/octet-stream",
  "secret_type": "certificate"
}'
{
  "tasks": [
    "d478ae29-dedc-4869-82f0-96104425f565"
  ]
}

Authorizations

Authorization
string
header
required

API key for authentication. Make sure to include the word apikey, followed by a single space and then your token. Example: apikey 1234$abcdef

Path Parameters

project_id
integer
required

Project ID

Examples:

1

region_id
integer
required

Region ID

Examples:

1

Body

application/json

Response

200 - application/json

OK

The response is of type object.