API Docs

Public API for the Diwash Bhandari portfolio website. Built with Next.js 15 and deployed on Vercel.

Base URL: https://www.diwash-bhandari.com.np/api

Endpoints

POST /api/contact

Send a message to Diwash Bhandari. Ideal for project inquiries, collaboration proposals, or technical questions.

FieldTypeRequiredConstraints
namestringYes2–100 characters
emailstringYesValid email format
messagestringYes10–2000 characters
{
  "success": true,
  "message": "Message sent successfully! I'll get back to you within 24-48 hours."
}

GET /api/contact

Returns endpoint metadata and accepted fields.

GET /api/openapi.json

Full OpenAPI 3.1 specification (machine-readable).

Rate Limiting

Error Codes

CodeHTTPDescription
MISSING_FIELDS400Required fields not provided
INVALID_NAME400Name length invalid
INVALID_EMAIL400Email format invalid
INVALID_MESSAGE400Message length invalid
INVALID_JSON400Request body is not valid JSON
RATE_LIMITED429Too many requests
DELIVERY_FAILED502Email provider unavailable
INTERNAL_ERROR500Unexpected server error

Developer Resources