Skip to main content
Delete a custom template that you created. Built-in templates cannot be deleted.

Endpoint

DELETE /v1/templates/{template_id}

Request

Headers

Authorization: Bearer your_api_key_here

Path Parameters

ParameterTypeRequiredDescription
template_idstring✅ YesTemplate ID to delete

Response

Status Code: 204 No Content No response body on success.

Examples

  • cURL
  • Python
  • JavaScript
curl -X DELETE \
  -H "Authorization: Bearer hopx_live_..." \
  https://api.hopx.dev/v1/templates/489

Error Responses

404 Not Found - Template not found
{
  "error": "Template not found",
  "message": "Template ID '489' does not exist"
}
403 Forbidden - Cannot delete built-in template
{
  "error": "Forbidden",
  "message": "Cannot delete built-in template"
}
409 Conflict - Template in use
{
  "error": "Template in use",
  "message": "Template is currently being used by active sandboxes"
}
401 Unauthorized - Invalid API key
{
  "error": "Unauthorized",
  "message": "Invalid API key"
}

Notes

  • Only templates you created can be deleted
  • Built-in templates (like code-interpreter) cannot be deleted
  • Templates that are currently in use by active sandboxes cannot be deleted
  • Deletion is permanent and cannot be undone

Next Steps