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

Update Service Owner

Transfer service ownership to another user. The new owner must be a valid user in the system.

PUT
/api/application/services/{id}/owner
AuthorizationBearer <token>

Bearer token authentication

In: header

Path Parameters

idinteger

Service ID

user_idinteger

ID of the new owner (must exist in users table)

Response Body

curl -X PUT "https://api.example.com/api/application/services/0/owner" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": 123
  }'
{
  "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": "Service not found"
}
{
  "success": false,
  "message": "Validation failed",
  "errors": {
    "price": [
      "The price field is required."
    ]
  }
}