Welcome to our new docs! Please keep in mind we are still working on making everything is as accurate as possible. Join us on discord and ask us questions if you are unsure.
DezerX Spartan Logo
Services

Terminate Service

Terminate a service permanently. If the service is already terminated, it will be deleted from the system. This action cannot be undone.

POST
/api/application/services/{id}/terminate
AuthorizationBearer <token>

Bearer token authentication

In: header

Path Parameters

idinteger

Service ID

Response Body

curl -X POST "https://api.example.com/api/application/services/0/terminate"
{
  "success": true,
  "message": "Service action completed successfully",
  "data": {
    "id": 1,
    "service_name": "Web Hosting Premium",
    "product_id": 1,
    "category_id": 1,
    "owner_id": 1,
    "extra_owners": null,
    "price": "25.00",
    "original_price": null,
    "coupon_id": null,
    "billing_cycle": "yearly",
    "due_date": "2024-12-31T23:59:59.000000Z",
    "status": "active",
    "module": "HostingModule",
    "config": {
      "domain": "example.com",
      "created_at": "2024-01-01T00:00:00.000000Z",
      "license_id": 1,
      "license_key": "LIC-XXXXXXXX-XXXXXXXX-XXXXXXXX",
      "last_rotated": "2024-01-01T00:00:00.000000Z"
    },
    "created_at": "2024-01-01T00:00:00.000000Z",
    "updated_at": "2024-01-01T00:00:00.000000Z",
    "last_reminded": null,
    "owner": {
      "id": 1,
      "name": "user@example.com",
      "email": "user@example.com"
    },
    "product": {
      "id": 1,
      "name": "Premium Hosting"
    },
    "category": {
      "id": 1,
      "name": "Web Hosting"
    }
  }
}
{
  "success": false,
  "message": "Failed to perform service action"
}
{
  "success": false,
  "message": "Service not found"
}
{
  "success": false,
  "message": "An internal server error occurred"
}