List environment variables
List environment variables. Values are omitted for both config and secret variables.
Requires ENVIRONMENT_VARIABLES:READ; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Header parameters
Query parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Paginated environment variable metadata. |
| 400 | Bad Request | Validation error |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden |
| 404 | Not Found | Feature disabled |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request GET \
--url https://api.onlineornot.com/v1/env \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'X-OnlineOrNot-Organisation: string'
Response
{
"result": [
{
"id": "a1b2c3d4e5f6g7h8",
"name": "API_TOKEN",
"type": "secret",
"has_value": true,
"created_at": "2026-09-20T12:00:00.000Z",
"updated_at": "2026-09-20T12:00:00.000Z"
}
],
"result_info": {
"page": 1,
"per_page": 20,
"count": 1,
"total_count": 1
},
"success": true,
"errors": [],
"messages": []
}
Create an environment variable
Create a readable config or write-only secret variable. Type cannot be changed.
Requires ENVIRONMENT_VARIABLES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Header parameters
Body parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 201 | Created | Environment variable created. Config responses include the value; secret responses contain metadata only. |
| 400 | Bad Request | Validation error |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden |
| 404 | Not Found | Feature disabled |
| 409 | Conflict | The organization has 1,000 variables (environment_variable_limit_reached) or the name already exists (environment_variable_name_conflict) |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request POST \
--url https://api.onlineornot.com/v1/env \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'X-OnlineOrNot-Organisation: string' \
--data '{"name":"PRIMARY_REGION","type":"config","value":"us-east-1"}'
Response
{
"result": {
"id": "a1b2c3d4e5f6g7h8",
"name": "API_TOKEN",
"type": "secret",
"has_value": true,
"created_at": "2026-09-20T12:00:00.000Z",
"updated_at": "2026-09-20T12:00:00.000Z"
},
"success": true,
"errors": [],
"messages": []
}
Get an environment variable
Get an environment variable. Config responses include the value; secret responses do not.
Requires ENVIRONMENT_VARIABLES:READ; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Header parameters
Path parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Environment variable detail. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden |
| 404 | Not Found | Environment variable not found or feature disabled |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request GET \
--url https://api.onlineornot.com/v1/env/a1b2c3d4e5f6g7h8 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'X-OnlineOrNot-Organisation: string'
Response
{
"result": {
"id": "a1b2c3d4e5f6g7h8",
"name": "API_TOKEN",
"type": "secret",
"has_value": true,
"created_at": "2026-09-20T12:00:00.000Z",
"updated_at": "2026-09-20T12:00:00.000Z"
},
"success": true,
"errors": [],
"messages": []
}
Update an environment variable
Rename a variable, replace its value, or both. Type cannot be changed; secret values are never returned.
Requires ENVIRONMENT_VARIABLES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Header parameters
Path parameters
Body parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Environment variable updated. Config responses include the value; secret responses contain metadata only. |
| 400 | Bad Request | Validation error |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden |
| 404 | Not Found | Environment variable not found or feature disabled |
| 409 | Conflict | The new name already exists (environment_variable_name_conflict) |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request PATCH \
--url https://api.onlineornot.com/v1/env/a1b2c3d4e5f6g7h8 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'Content-Type: application/json' \
--header 'X-OnlineOrNot-Organisation: string' \
--data '{"value":"<replacement value>"}'
Response
{
"result": {
"id": "a1b2c3d4e5f6g7h8",
"name": "API_TOKEN",
"type": "secret",
"has_value": true,
"created_at": "2026-09-20T12:00:00.000Z",
"updated_at": "2026-09-20T12:00:00.000Z"
},
"success": true,
"errors": [],
"messages": []
}
Delete an environment variable
Delete an environment variable.
Requires ENVIRONMENT_VARIABLES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.
Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.
Example: Authorization: Bearer 123
Header parameters
Path parameters
Responses
| Status | Meaning | Description |
|---|---|---|
| 200 | OK | Environment variable deleted. |
| 400 | Bad Request | Invalid request |
| 401 | Unauthorized | Unauthenticated |
| 403 | Forbidden | Forbidden |
| 404 | Not Found | Environment variable not found or feature disabled |
| 409 | Conflict | The environment variable cannot be deleted (environment_variable_in_use) |
| 429 | Too Many Requests | Rate limit exceeded |
| 500 | Internal Server Error | Internal server error |
Response Schema
Request
curl --request DELETE \
--url https://api.onlineornot.com/v1/env/a1b2c3d4e5f6g7h8 \
--header 'Accept: application/json' \
--header 'Authorization: Bearer {access-token}' \
--header 'X-OnlineOrNot-Organisation: string'
Response
{
"result": {
"id": "string"
},
"success": true,
"errors": [],
"messages": []
}