v1

latestOpenAPI 3.0.42026-08-068161,1253.1 MB
Universes

Create Secret

Creates a new secret. A maximum of 500 secrets per universe is allowed.

Only the owner of the universe can create secrets. For group-owned universes, only the group owner or authorized members can create secrets.

To encrypt the secret:

  1. Get the public key using the Get Public Key endpoint
  2. Encrypt your secret using LibSodium sealed box
  3. Base64 encode the encrypted content

Include the key_id from the public key response in the request.

For an example, see the Secrets store guide.

post/cloud/v2/universes/{universeId}/secrets

Path parameters

universeIdinteger required

The universe ID

Request body

idstring nullable

The user-specified secret name. Examples: "aws", "gcp", "discord".

Static when getting the public key for a universe.

Must be alphanumeric or underscore, 1-64 characters, not starting with a number.

secretstring byte nullable

The binary secret content. Examples: API key content (text), private keys.

When created, the secret must be encrypted using LibSodium sealed box and encoded in base64 with the universe's public key.

Contains the public key when getting the public key for a universe.

key_idstring nullable

Encryption key identifier. Identifies the key that was used to encrypt the secret content.

domainstring nullable

The domain wildcard that restricts the purpose of the key.

You can restrict the URLs callable via HttpService to a specific domain, e.g. "api.example.com" or "*.myservice.org".

An empty or null domain means that the secret is a private key and cannot be transformed with addPrefix/addSuffix or sent as a header or URL.

In order to make the secret accessible for all domains, use "*"

create_timestring nullable

Date and time when the secret was originally created.

update_timestring nullable

Date and time when the secret was last updated

Response

Created

idstring nullable

The user-specified secret name. Examples: "aws", "gcp", "discord".

Static when getting the public key for a universe.

Must be alphanumeric or underscore, 1-64 characters, not starting with a number.

secretstring byte nullable

The binary secret content. Examples: API key content (text), private keys.

When created, the secret must be encrypted using LibSodium sealed box and encoded in base64 with the universe's public key.

Contains the public key when getting the public key for a universe.

key_idstring nullable

Encryption key identifier. Identifies the key that was used to encrypt the secret content.

domainstring nullable

The domain wildcard that restricts the purpose of the key.

You can restrict the URLs callable via HttpService to a specific domain, e.g. "api.example.com" or "*.myservice.org".

An empty or null domain means that the secret is a private key and cannot be transformed with addPrefix/addSuffix or sent as a header or URL.

In order to make the secret accessible for all domains, use "*"

create_timestring nullable

Date and time when the secret was originally created.

update_timestring nullable

Date and time when the secret was last updated