🚀 Quick Start
This API provides public endpoints for the blog's contact form and other dynamic features. No authentication is required for public endpoints.
Base URL:
https://api.codewithbotina.com📡 Endpoints
POST/api/contact
Submit a new contact form message. The data is validated, saved to the database, and an email notification is triggered.
Request Headers
Content-Type: application/jsonOrigin: https://blog.codewithbotina.com(CORS enforced)
Request Body
{
"nombre": "string (1-100 chars, required)",
"correo": "valid email (required)",
"mensaje": "string (10-1000 chars, required)"
}Success Response (201 Created)
{
"success": true,
"message": "Contact form submitted successfully",
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"nombre": "Diego Botina",
"correo": "test@example.com",
"mensaje": "...",
"created_at": "2023-10-27T10:00:00Z"
}
}⚡ Try It Out
Test the live API directly from your browser.
⚠️ Error Handling
All API errors follow a standardized JSON format:
{
"success": false,
"error": "Error message description",
"details": {
"field_name": "Specific validation error"
}
}Common Status Codes
- 400 Bad Request: Validation failed (check
detailsobject) - 403 Forbidden: Invalid CORS origin
- 429 Too Many Requests: Rate limit exceeded
- 500 Internal Server Error: Server-side issue
🛑 Rate Limiting
To prevent abuse, endpoints are rate-limited by IP address. If you exceed the limit, you will receive a 429 Too Many Requests response.
🔒 CORS Policy
Access is strictly limited to allowed origins. Currently allowed: https://blog.codewithbotina.com