Environments
Manage environment variable sets that are injected into test runs.
Environments are named sets of key-value variables injected into a test run. They're useful for running the same test against different configurations (e.g. staging vs production credentials).
Sensitive values — such as passwords and API tokens — are encrypted at rest and never returned by the API after creation. Only the key name and a flag indicating sensitivity are exposed.
The web app also supports attaching a saved logged-in browser session to an environment. Browser-session capture and management are app-only in this release; /v1 environment endpoints continue to expose variables only.
The environment object
{
"id": "018edddd-abcd-7000-8000-abc123456789",
"workspaceId": "018e1234-abcd-7000-8000-abc123456789",
"projectId": "018e5678-abcd-7000-8000-abc123456789",
"name": "Staging",
"variables": [
{
"id": "018eeeee-abcd-7000-8000-abc123456789",
"key": "BASE_URL",
"isSensitive": false
},
{
"id": "018effff-abcd-7000-8000-abc123456789",
"key": "ADMIN_PASSWORD",
"isSensitive": true
}
],
"createdAt": "2026-04-01T08:00:00.000Z",
"updatedAt": "2026-05-20T12:00:00.000Z"
}| Field | Type | Description |
|---|---|---|
id | UUID | Unique identifier |
workspaceId | UUID | Workspace this environment belongs to |
projectId | UUID | Project this environment belongs to |
name | string | Display name — must be unique per project |
variables | array | List of variable metadata (values are not returned) |
variables[].key | string | Variable name |
variables[].isSensitive | boolean | Whether the value is encrypted; sensitive values are never returned |
createdAt | ISO 8601 | Creation timestamp |
updatedAt | ISO 8601 | Last updated timestamp |
List environments
Path parameters
projectIdProject ID
curl "https://api.smoketest.sh/v1/projects/018e5678-abcd-7000-8000-abc123456789/environments" \
-H "Authorization: Bearer $SMOKETEST_API_KEY"Sample response
[
{
"id": "018edddd-abcd-7000-8000-abc123456789",
"workspaceId": "018e1234-abcd-7000-8000-abc123456789",
"projectId": "018e5678-abcd-7000-8000-abc123456789",
"name": "Staging",
"variables": [
{ "id": "018eeeee-abcd-7000-8000-abc123456789", "key": "BASE_URL", "isSensitive": false },
{ "id": "018effff-abcd-7000-8000-abc123456789", "key": "ADMIN_PASSWORD", "isSensitive": true }
],
"createdAt": "2026-04-01T08:00:00.000Z",
"updatedAt": "2026-05-20T12:00:00.000Z"
}
]Create an environment
Path parameters
projectIdProject ID
Body
nameDisplay name, unique within the project
variablesVariable definitions
variables[].keyVariable name
variables[].isSensitiveMark
true for passwords, tokens, secretsvariables[].valueVariable value; omit to create a blank placeholder
curl -X POST "https://api.smoketest.sh/v1/projects/018e5678-abcd-7000-8000-abc123456789/environments" \
-H "Authorization: Bearer $SMOKETEST_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Staging",
"variables": [
{ "key": "BASE_URL", "isSensitive": false, "value": "https://staging.acme.com" },
{ "key": "ADMIN_PASSWORD", "isSensitive": true, "value": "s3cr3t!" }
]
}'Get an environment
Path parameters
idEnvironment ID
curl https://api.smoketest.sh/v1/environments/018edddd-abcd-7000-8000-abc123456789 \
-H "Authorization: Bearer $SMOKETEST_API_KEY"