Create Contact
Submit a contact form message.
Endpoint
Authentication
Not required (public endpoint)
Request Body
{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"county": "Baku",
"subject": "Product Inquiry",
"message": "I would like to know more about your products."
}
Parameters
| Field | Type | Required | Description | Validation |
|---|---|---|---|---|
first_name |
string | Yes | Contact's first name | Not empty |
last_name |
string | No | Contact's last name | - |
email |
string | Yes | Contact's email address | Valid email format |
phone |
string | No | Contact's phone number | Valid phone format (if provided) |
county |
string | No | County/region | - |
subject |
string | No | Message subject | - |
message |
string | No | Message content | - |
Response
Success (200 OK)
{
"id": 1,
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"county": "Baku",
"subject": "Product Inquiry",
"message": "I would like to know more about your products.",
"created": "01-15-2025 10:30:00"
}
Error Responses
Validation Error (400)
or
Example Request
curl -X POST "https://api.luxmart.site/v1/contacts/site/" \
-H "Content-Type: application/json" \
-d '{
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com",
"phone": "+994501234567",
"county": "Baku",
"subject": "Product Inquiry",
"message": "I would like to know more about your products."
}'
Notes
- This is a public endpoint, no authentication required
- Only
first_nameandemailare required - Contact messages are stored for admin review
- Admin can view and delete contacts via admin endpoints