err:unkey:data:deployment_not_foundExample response
Likely causes
- The deployment ID has a typo. Deployment IDs start with
d_. - Your root key can’t read the deployment. The get, promote, rollback, stop, and start endpoints return this 404 instead of a 403, so it’s as likely a permission problem as a wrong ID. A key that can read the deployment but lacks the action gets a 403
err:unkey:authorization:insufficient_permissionsthat names the missing permission. - For a redeploy with
deployments.createDeployment, the source deployment is from a different app or environment. - The deployment is in another workspace.
How to fix
- List deployments with
deployments.listDeploymentsand use the returned ID. - Check that the root key has the right permission:
readon the deployment fordeployments.getDeployment,readon the deployment’sbuildLogsfordeployments.listBuildLogs,writeon the deployment’s environment fordeployments.promoteDeploymentanddeployments.rollbackDeployment, orwriteon the deployment fordeployments.stopDeploymentanddeployments.startDeployment. - For a redeploy, pick a deployment from the same app and environment you’re deploying to.
Related errors
err:unkey:application:deployment_not_ready: the deployment exists but isn’t ready.err:unkey:data:environment_not_found: the environment doesn’t exist.err:unkey:data:app_not_found: the app doesn’t exist.