Help & Support

These endpoints allow users to create support tickets and allow administrators to manage them. Each ticket includes user details, a message, and a status. Emails are also triggered upon creation to confirm receipt.

πŸ“Œ Common use cases: customer support, onboarding inquiries, issue resolution tracking.


πŸ”Έ POST /help-support/{user_id} – Submit a Support Ticket

Create a new help & support ticket for a specific user.

πŸ“₯ Request Body:

{
  "name": "Jane Doe",
  "phone_number": "+1234567890",
  "email": "[email protected]",
  "message": "I'm having trouble connecting my database."
}

πŸ” Auth Required: ❌ No πŸ“¨ Email confirmation is automatically sent to the user

πŸ“€ Response:

{
  "id": "b8234b1d-a657-4c99-bdf3-e125e9b027d0",
  "name": "Jane Doe",
  "phone_number": "+1234567890",
  "email": "[email protected]",
  "message": "I'm having trouble connecting my database.",
  "status": "open",
  "created_at": "2025-07-04T12:00:00Z",
  "updated_at": "2025-07-04T12:00:00Z"
}

βœ… cURL Example:

βœ… JavaScript (fetch):


πŸ”Έ GET /help-support/{ticket_id} – Get a Support Ticket by ID

πŸ” Auth Required: βœ… Yes (Admin)

βœ… cURL:


πŸ”Έ GET /help-support – List All Support Tickets

Lists all support tickets (paginated).

Query Parameters:

  • skip: Offset (default: 0)

  • limit: Number of results (default: 100)

βœ… cURL:


πŸ”Έ PATCH /help-support/{ticket_id}/status – Update Ticket Status

Update the status of a support ticket (e.g., open β†’ resolved, pending β†’ closed).

πŸ“₯ Query Parameter:

  • status=resolved

βœ… cURL:


🎯 Ticket Lifecycle

  • Status values: "open", "pending", "resolved", "closed"

  • Each submission triggers a confirmation email using HTML templates

  • Admins can view, filter, and update status as the ticket progresses


Last updated