Universes

Updates an existing secret.

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

Only the secret content, key_id, and domain can be updated - the secret ID cannot be changed.

To encrypt the updated secret:

  1. Get the current public key using the GetPublicKey endpoint
  2. Encrypt your new secret content 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.

patch/cloud/v2/universes/{universeId}/secrets/{secretId}

Request

  • Base URL
    https://apis.roblox.com
  • URL
    https://apis.roblox.com/cloud/v2/universes/{universeId}/secrets/{secretId}
  • Auth
    • API key in header x-api-key
    • or OAuth 2
      Authorization code: https://apis.roblox.com/oauth/v1/authorize
      Token URL: https://apis.roblox.com/oauth/v1/token

Path parameters

universeIdinteger required

The universe ID

secretIdstring required

The ID of the secret to update

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 date-time nullable

Date and time when the secret was originally created.

update_timestring date-time nullable

Date and time when the secret was last updated

Response

OK

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 date-time nullable

Date and time when the secret was originally created.

update_timestring date-time nullable

Date and time when the secret was last updated

Changes

    • breaking

      the request property format changed from no format to date-time

    • breaking

      the request property format changed from no format to date-time

    • breaking

      the response's property type changed from string to integer, and format from no format to int32 for status

    • breaking

      the response's property type changed from string to integer, and format from no format to int32 for status

    • breaking

      the response's property type changed from string to integer, and format from no format to int32 for status