# Delete a machine instance and any transitions, state, or pending upgrades associated with it. **DELETE /machines/{machineSlug}/i/{instanceSlug}** Delete a machine instance and any transitions, state, or pending upgrades associated with it. *THIS IS OBVIOUSLY A DANGEROUS OPERATION AND WILL INTENTIONALLY CAUSE DATA LOSS* All historical transitions associated with the machine and all current state and context will be deleted. There is no option to recover data after an instance is deleted. To prevent accidental deletion, we require two validation parameters: - hmacSha256OfMachineInstanceNameWithMachineNameKey - `base64urlEncode(hmacSha256(key = "machine name", "machine instance name"))` - dangerDataWillBeDeletedForever - true A 400 error with the `parameter` set to the name of the incorrect parameter will be returned if the validation parameters are incorrect. This endpoint requires admin access. ## Servers - Production server: https://api.statebacked.dev (Production server) ## Authentication methods - Bearer auth ## Parameters ### Path parameters - **machineSlug** (string) The slug/name for the machine definition to delete. - **instanceSlug** (string) The slug/name for the machine instance. ### Body: (object) Validation parameters to prove that you really do want to delete the instance. - **dangerDataWillBeDeletedForever** (boolean) Just to ensure that you understand the ramifications of this action. - **hmacSha256OfMachineInstanceNameWithMachineNameKey** (string) This parameter serves to verify that you have read the documentation prior to deleting a machine and have taken the time to consider whether you really want to do so. Provide `base64urlEncode(hmacSha256(key = "machine name", "machine instance name"))` ## Responses ### 204 The machine instance was deleted successfully. ### 400 The request was malformed. #### Body: (object) - **error** (string) A description of the error. - **code** (string) A code specifying the type of error. - `specify-org` indicates that the user has access to multiple orgs and the operation requires specifying an organization. Pass the `x-statebacked-org-id` header to specify an org ID. - `invalid-parameter` indicates that one of the provided parameters was incorrect - **parameter** (string) The name of the invalid parameter ### 403 The request was unauthorized. #### Body: (object) - **error** (string) A description of the error. - **code** (string) A code specifying the type of error. [Powered by Bump.sh](https://bump.sh)