This document describes all available HTTP endpoints for the Contact Us API.
Generate a short-lived token for form submission. This should be called when the contact form page loads.
Response:
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"expires_in": 300
}Rate Limit: Per IP address
Submit contact form data. Requires a valid token and signature.
Request Body:
{
"name": "John Doe",
"email": "john@example.com",
"message": "Hello, I would like to get in touch...",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"signature": "abc123def456...",
"timestamp": 1699123456
}Response:
{
"status": "success",
"message": "Your message has been received."
}Rate Limit: Per IP and per origin
Generate an HMAC signature for contact form data. This endpoint validates the token and generates the signature server-side, keeping the signing secret secure.
Request Body:
{
"name": "John Doe",
"email": "john@example.com",
"message": "Hello, I would like to get in touch...",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"timestamp": 1699123456
}Response:
{
"signature": "abc123def456...",
"timestamp": 1699123456
}Rate Limit: Per IP and per origin
Note: This endpoint requires a valid token from /api/token. The signing secret is kept server-side for security.
Health check endpoint. Useful for monitoring and load balancer health checks.
Response:
{
"status": "healthy"
}Rate Limit: None