environments.unsetVariable
DELETE
/environments/{environmentId}/variables/{key}
const url = 'https://example.com/api/environments/example/variables/example';const options = { method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{"exposure":"build-time","scope":"defaults"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://example.com/api/environments/example/variables/example \ --header 'Content-Type: application/json' \ --data '{ "exposure": "build-time", "scope": "defaults" }'Removes an environment variable in a specific exposure and optional scope. Public docs: /docs/environments/variables/precedence/#environment-variable-precedence
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” environmentId
required
string
key
required
string
Request Body required
Section titled “Request Body required ” Media type application/json
object
exposure
required
string
scope
string
Responses
Section titled “ Responses ”OK
Media type application/json
null
Example generated
example