Stashbase
Secrets

Bulk set (upsert)

Create or update secrets in the selected environment. The secret will be updated if it already exists or created if it does not exist.

PUT
/v1/projects/{project_identifier}/environments/{environment_identifier}/secrets/

Create or update secrets in the selected environment. The secret will be updated if it already exists or created if it does not exist.

Path Parameters

project_identifier*string

The name or ID of the project.

environment_identifier*string

The name or ID of the environment.

Request Body

application/json

The list of secrets to set

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/projects/string/environments/string/secrets/" \  -H "Content-Type: application/json" \  -d '[    {      "name": "string",      "value": "string"    }  ]'
{
  "created_secrets": [
    "DB_PASSWORD",
    "API_TOKEN"
  ],
  "updated_secrets": [
    "DB_USER"
  ]
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {
      "property1": null,
      "property2": null
    }
  }
}