Skip to main content
This endpoint permanently deletes a support request. This action cannot be undone.
This endpoint requires authentication. Users can only delete their own support requests.

Endpoint

DELETE /support-request/{id}

Authentication

This endpoint requires a valid JWT token. Include the token in the Authorization header:
Authorization: Bearer YOUR_JWT_TOKEN

Path Parameters

id
integer
required
The unique identifier of the support request to delete

Response

success
boolean
required
Indicates whether the request was successful
message
string
required
A human-readable message confirming the deletion
data
null
No data is returned for successful deletions

Response Examples

{
  "success": true,
  "message": "Support request deleted successfully",
  "data": null
}

Code Examples

curl -X DELETE https://api.example.com/support-request/1 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Accept: application/json" \
  -H "Accept-Language: en"

Error Responses

401 Unauthorized
Returned when the request is made without a valid JWT token or the token has expired
404 Not Found
Returned when:
  • The support request with the specified ID does not exist
  • The support request belongs to a different user (ownership check)
  • The support request has already been soft deleted

Behavior

  • The endpoint uses soft deletion, meaning the record is marked as deleted but not removed from the database
  • The deleted_at timestamp is set to the current time when a support request is deleted
  • Soft-deleted support requests will not appear in list queries
  • Users can only delete support requests they created
  • If a user attempts to delete another user’s support request, a 404 Not Found error is returned (not 403 Forbidden) for security reasons

Notes

  • This endpoint uses Laravel’s soft delete feature via the SoftDeletes trait
  • Deleted support requests can potentially be restored by administrators with direct database access
  • The ownership check ensures users can only delete their own support requests
  • Laravel’s route model binding is used for automatic model retrieval

Build docs developers (and LLMs) love