Skip to main content
This endpoint requires authentication. Users can only view their own support requests.

Endpoint

GET /support-request

Authentication

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

Query Parameters

This endpoint does not accept any query parameters. It automatically filters results to show only support requests belonging to the authenticated user.

Response

success
boolean
required
Indicates whether the request was successful
message
string
required
A human-readable message describing the result
data
object
required
The response data object

Response Examples

{
  "success": true,
  "message": "Support requests retrieved successfully",
  "data": {
    "supportRequests": [
      {
        "id": 3,
        "user_id": 1,
        "date": "2026-03-15T10:30:00.000000Z",
        "location": "Building A, Room 305",
        "detail": "Network connectivity issues in the conference room. Unable to connect to WiFi.",
        "created_at": "2026-03-08T14:22:10.000000Z",
        "updated_at": "2026-03-08T14:22:10.000000Z",
        "deleted_at": null
      },
      {
        "id": 2,
        "user_id": 1,
        "date": "2026-03-10T09:00:00.000000Z",
        "location": "Main Office, Floor 2",
        "detail": "Printer not responding, urgent help needed for printing reports.",
        "created_at": "2026-03-07T11:15:33.000000Z",
        "updated_at": "2026-03-07T11:15:33.000000Z",
        "deleted_at": null
      },
      {
        "id": 1,
        "user_id": 1,
        "date": "2026-03-08T08:00:00.000000Z",
        "location": "Headquarters",
        "detail": "Computer won't boot up, getting blue screen error.",
        "created_at": "2026-03-06T09:45:22.000000Z",
        "updated_at": "2026-03-06T09:45:22.000000Z",
        "deleted_at": null
      }
    ]
  }
}

Code Examples

curl -X GET https://api.example.com/support-request \
  -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

Notes

  • Support requests are automatically filtered by the authenticated user’s ID
  • Results are ordered by ID in descending order (newest first)
  • The endpoint uses soft deletes, so deleted requests won’t appear in the results
  • When a support request is created, administrators are automatically notified

Build docs developers (and LLMs) love