Skip to main content

ContactsController API Documentation

Introduction

The ContactsController class is responsible for handling user contact messages. It allows users to send contact requests with specific details such as name, email, subject, and message.


API Endpoints

1. Send Contact Request

Endpoint:

POST /api/profile/contact

Description:
Sends a contact message from the user. The contact request will be stored in the database.

Request Example:

{
"type": "support",
"name": "John Doe",
"email": "john.doe@example.com",
"phone": "1234567890",
"subject": "Issue with product",
"message": "I am facing issues with the product, please assist."
}

Response Example (Success):

{
"status": true,
"message": "Your message has been sent successfully"
}

Response Example (Failure):

{
"status": false,
"message": "Validation failed"
}

Summary of Methods

  1. send() - Handles sending contact messages from the user.