Backend service

The REST API behind
Wakeel Online.

A small, focused NestJS service that captures service inquiries from the public website and routes them into our pipeline. This page is the developer reference for the endpoints it exposes.

Operational v1 · OpenAPI 3 Base · api.wakeelonline.com
What it does

A narrow service, kept narrow on purpose.

This API exists to ingest lead submissions from the marketing site and hand them to the team. It does not power the public site directly — that runs on its own Next.js stack.

Service inquiries

Accepts structured lead submissions from the website's contact and request forms. Each submission is persisted with a generated UUID.

Live

OpenAPI 3 spec

Every documented endpoint is browsable through Swagger UI at /docs and downloadable as raw JSON at /docs/json for codegen.

Live

Auth & rate limiting

The endpoint is currently open for first-party use from the website. API keys and per-key rate limits are on the roadmap before any external integration.

Planned
Reference

Endpoint overview

The current public surface. The OpenAPI document at /docs/json is the canonical source — this table is a quick read.

GET /docs Interactive Swagger UI for the full OpenAPI 3 specification. Open
GET /docs/json Raw OpenAPI JSON. Use it to import into Postman, generate clients, or feed a docs site. JSON
Quickstart

Make your first request.

Two equivalent ways to create a service inquiry. The payload shape matches the website's submission contract; field validation is enforced server-side.

shell · curl
curl -X POST https://api.wakeelonline.com/service-inquiries \
  -H "Content-Type: application/json" \
  -d '{
    "service_slug": "family-law",
    "service_title": "Family Law",
    "name": "Ayesha K.",
    "phone": "+92 300 1234567",
    "email": "ayesha@example.com",
    "based_in": "pakistan",
    "city": "Lahore",
    "best_time_to_call": "morning",
    "urgency": "this_week",
    "message": "Looking for a consultation regarding a custody matter.",
    "service_details": { "matter_type": "custody" }
  }'
javascript · fetch
const res = await fetch(
  "https://api.wakeelonline.com/service-inquiries",
  {
    method: "POST",
    headers: { "Content-Type": "application/json" },
    body: JSON.stringify({
      service_slug: "family-law",
      service_title: "Family Law",
      name: "Ayesha K.",
      phone: "+92 300 1234567",
      based_in: "pakistan",
      best_time_to_call: "morning",
      urgency: "this_week",
      message: "Looking for a consultation."
    })
  }
);

const { id } = await res.json();
Heads up

Before you integrate.

A short list of things worth knowing if you're building against this API today.

Authentication

The API has no auth today. It's intended for first-party use by the marketing site. Don't build a public-facing integration on top of it yet — keys and per-route limits are planned.

  • No API keys required (currently)
  • Auth and rate limiting are planned
  • CORS is open while the website integration settles

Field contract

Service slugs sent to /service-inquiries must match the canonical list in the website repo. If you rename one in the site data, update it here too.

  • based_in: pakistan or overseas
  • best_time_to_call: now_today, morning, afternoon, evening
  • urgency: urgent, this_week, exploring