Skip to main content
err:unkey:data:environment_not_found
The you referenced couldn’t be found. An environment is addressed by , app, and environment together, and one of them didn’t match. You get HTTP 404.
Example response

Likely causes

  • The environment slug is wrong.
  • The project or app slug is wrong. That’s also reported as a missing environment. On deployments.createDeployment the message says so: The requested project, app, or environment does not exist.
  • Your root key can’t read the environment. environments.getEnvironment, domains.createDomain, and deployments.createDeployment return this 404 instead of a 403. A key that can read the environment but lacks the action gets a 403 err:unkey:authorization:insufficient_permissions that names the missing permission.

How to fix

  1. List the app’s environments with environments.listEnvironments and use the returned slug.
  2. Check all three parts: project, app, and environment.
  3. Check that the root key has the permission the endpoint needs on the environment.
Last modified on October 27, 2026