Secrets
List available environment secrets for the user's organization
🔒 Requires the read:environment permission
Specifies the attribute by which the returned list should be sorted ' +
'e.g. name
created_atPossible values: Specifies the order - ascending or descending - by which the returned list should be sorted e.g. ASC
Results offset to allow pagination e.g. 10
0Example: 10Results limit to allow pagination, e.g. 50
20Example: 10Structure: [key1=value1,key2=value2&value3]
Enables searching within the list for Secret Keys that match a particular query e.g. api_key
List of available environment secrets
Failed to list available environment secrets
Failed to authenticate user
Missing required scopes. 🔒 Requires the read:environment permission
Too many requests
GET /api/v1/environment/settings/secrets HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"total": 1,
"list": [
{
"name": "API_TOKEN",
"environment": {
"id": "f27d96be-c486-4075-a926-0ee96775119e",
"slug": "production-europe",
"name": "Production Europe",
"color": "#0000ff",
"is_default": true,
"is_active": true,
"created": "2025-11-11T06:41:08.610Z",
"cloud_account": null
},
"created_at": "2025-11-11T06:41:08.610Z",
"updated_at": null,
"created_by": {
"id": "prov0|1234567890",
"name": "John Doe",
"nickname": "JD",
"picture": "https://example.com/profile.jpg"
}
}
],
"filters": {
"environments": [
{
"id": "f27d96be-c486-4075-a926-0ee96775119e",
"name": "Production Europe",
"slug": "production-europe",
"color": "#0000ff"
}
],
"users": [
{
"id": "prov0|1234567890",
"name": "John Doe",
"nickname": "JD",
"picture": "https://example.com/profile.jpg"
}
]
}
}List environment secrets
🔒 Requires the read:secret permission
The environment's slug or ID e.g. prod | f27d96be-c486-4075-a926-0ee96775119d
production-europeList of environment secrets
Failed to list environment secrets
Failed to authenticate user
Missing required scopes. 🔒 Requires the read:secret permission
Environment not found
Too many requests
GET /api/v1/environment/{idOrSlug}/settings/secrets HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"environment": {
"guid": "f27d96be-c486-4075-a926-0ee96775119e",
"slug": "production-europe"
},
"secrets": [
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]
}Create environment secrets
🔒 Requires the create:secret permission
The environment's slug or ID e.g. prod | f27d96be-c486-4075-a926-0ee96775119d
production-europeList of new environment-scoped secrets
The secret key e.g. API_TOKEN
API_TOKENThe secret encrypted value e.g. ERJZ7ZOJcNpQEAvrb6wPOA==
ERJZ7ZOJcNpQEAvrb6wPOA==Updated environment secrets
Failed to create environment secrets
Failed to authenticate user
Missing required scopes. 🔒 Requires the create:secret permission
Environment not found
Secret with such key already exists
Too many requests
POST /api/v1/environment/{idOrSlug}/settings/secrets HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
[
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]{
"environment": {
"guid": "f27d96be-c486-4075-a926-0ee96775119e",
"slug": "production-europe"
},
"secrets": [
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]
}Update environment secrets
🔒 Requires the update:secret permission
The environment's slug or ID e.g. prod | f27d96be-c486-4075-a926-0ee96775119d
production-europeList of updated environment-scoped secrets
The secret key e.g. API_TOKEN
API_TOKENThe secret encrypted value e.g. ERJZ7ZOJcNpQEAvrb6wPOA==
ERJZ7ZOJcNpQEAvrb6wPOA==Updated environment secrets
Failed to update environment secrets
Failed to authenticate user
Missing required scopes. 🔒 Requires the update:secret permission
Environment or secret with provided key not found
Too many requests
PUT /api/v1/environment/{idOrSlug}/settings/secrets HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 56
[
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]{
"environment": {
"guid": "f27d96be-c486-4075-a926-0ee96775119e",
"slug": "production-europe"
},
"secrets": [
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]
}Delete environment secrets
🔒 Requires the delete:secret permission
The environment's slug or ID e.g. prod | f27d96be-c486-4075-a926-0ee96775119d
production-europeList of secret keys to delete within the environment
Updated environment secrets
Failed to delete environment secrets
Failed to authenticate user
Missing required scopes. 🔒 Requires the delete:secret permission
Environment or secret with provided key not found
Too many requests
DELETE /api/v1/environment/{idOrSlug}/settings/secrets HTTP/1.1
Host: api.bricks-dev.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 8
[
"text"
]{
"environment": {
"guid": "f27d96be-c486-4075-a926-0ee96775119e",
"slug": "production-europe"
},
"secrets": [
{
"key": "API_TOKEN",
"value": "ERJZ7ZOJcNpQEAvrb6wPOA=="
}
]
}Last updated
Was this helpful?

