Skip to content
Maaz Ahmed

Experience D · Technical documentation

Docs that developers love

Real documentation for this website's own Inquiry API — with search, sidebar navigation, multi-language code samples, copy buttons and responsive tables.

7 sections match

Getting started

Overview

The Inquiry API accepts project, quote, course and general inquiries submitted from maazahmed.com. It validates every request on the server, applies spam protection and forwards valid inquiries by email.

This is the real API behind the forms on this website. Requests are accepted only from the site's own origin.

Getting started

Quick start

  1. 1Collect the visitor's name, email and message in a form.
  2. 2Record the time the form was rendered (startedAt, in milliseconds).
  3. 3POST the JSON payload to /api/inquiry.
  4. 4Show a success state when the response contains "ok": true.
curl -X POST https://maazahmed.com/api/inquiry \
  -H "Content-Type: application/json" \
  -H "Origin: https://maazahmed.com" \
  -d '{
    "type": "project",
    "name": "Ada Lovelace",
    "email": "ada@example.com",
    "message": "We need a Moodle course built for 40 staff.",
    "consent": true,
    "startedAt": 1760860800000
  }'

Reference

POST/api/inquiry

Creates a new inquiry. The request body must be JSON and no larger than 20 KB.

FieldTypeRequiredDescription
typeenumYesOne of project, quote, course, general.
namestringYes2–100 characters.
emailstringYesA valid email address, max 200 characters.
messagestringYes20–5000 characters.
consentbooleanYesMust be true — the visitor agrees to be contacted.
startedAtintegerYesUnix time in ms when the form was rendered.
companystringNoOrganisation name, max 150 characters.
servicestringNoService of interest, max 120 characters.
budgetstringNoBudget band, max 60 characters.
timelinestringNoDesired timeline, max 60 characters.
sourcestringNoPage or campaign identifier, max 200 characters.
turnstileTokenstringCond.Required when Turnstile spam protection is enabled.

Reference

Responses

{
  "ok": true
}

Reference

Error codes

StatusMeaningHow to fix
400Malformed JSON or failed spam checkSend valid JSON; refresh the Turnstile token.
403Origin not allowedSubmit from maazahmed.com.
405Method not allowedUse POST.
413Body too largeKeep the payload under 20 KB.
415Unsupported content typeSend Content-Type: application/json.
422Validation failedRead the fields object and correct each value.
502Email delivery failedRetry later or use another contact method.
503Delivery not configuredThe site owner hasn't enabled delivery yet.

Guides

Spam protection

Three layers keep inquiries clean without frustrating real people:

  1. 1Honeypot: a hidden website field that people never see. If it is filled, the request is silently discarded.
  2. 2Timing: submissions faster than 3 seconds after render are treated as automated.
  3. 3Cloudflare Turnstile (optional): a privacy-friendly challenge verified server-side.

Bot submissions receive a normal-looking success response so automated scripts learn nothing about the filters.

Guides

Data & privacy

Inquiry data is used only to reply to the sender. It is delivered by email and not stored in a database by this API. See the privacy policy for full details.

What this demonstrates

  • —Information architecture for API docs
  • —Code samples in cURL, JavaScript & Python
  • —Error reference tables
  • —Search with highlighted matches
Get your docs written