The linked API references are authenticated APIs to create a secret, set secret values in different environments (both create and update), and fetch all secrets in a given environment.

Do note that these are authenticated APIs and require the Authorization header as described in the section Making An Authenticated API Request.

Creating a new secret

API Reference

Creates a new secret under an app

API Description

  • Path Param: catalog-app-id

  • Body Params:

    • name: Name of the secret to be created

    • providerId: Optional field; should be omitted in the request and the secret can later be updated from the dashboard

    • purposeType: The broad purpose this secret relates to. Should be one of:

      - APIKey
      - SSHKey
      - UsernamePassword
      - Other
    • environmentScopedValues: A deprecated field. Should be sent as an empty list [].

Setting Secret Value

The secret created in the previous step only creates the secret entity and does not assign values to the secret in any environment. To do so we need to individually set values in each of the environments associated with the secret (the environments are automatically created for a secret based on the environments available for the app).

API Reference

Set app-secret value in an environment

API Description

  • Path Params
    • catalog-app-id
    • secret-id
      • id of the secret returned in the secret creation step
    • environment-id
  • Body

All fields in the body should be hard coded as present in the JSON below except for the field text which should contain the actual value of the secret that needs to be persisted in the given environment. The optional activity field can be ignored.

    "valueTypeUrn": "urn:app-secret:app-secret-type:keyValueAppSecret",
    "hidden": false,
    "kvAppSecretValue": {
        "typeHint": "urn:app-secret:kv-secret-value:textType",
        "text": "{{value-to-be-set}}"

Fetching secrets for an app

This endpoint returns all secrets for a given app in a specific environment.

API Reference

Get rendered secrets for an app in an environment

API Description

  • Path Params
    • catalog-app-id
  • Query Params
    • environment
    • mode
      • Dictates whether to completely reveal secret values when fetched (Full) or to fetch them in a masked manner (PreviewOnly)
    • secret-name-filter
      • An optional query param that can be used to query for a subset of secrets for an (app, env) pair.
      • Accepts a list of secret names