API docs

Public endpoints for agents and integrations.

This site exposes a small set of public endpoints. The homepage advertises this document via the HTTP Link response header and exposes a machine-readable catalog at /.well-known/api-catalog. DNS-AID support in this repo is staged through /agents/index.json and /.well-known/agent-card.json, with provider-ready DNS records documented in DNS_AID.md. Agents can request this same URL as Markdown with Accept: text/markdown.

GET/api/v1/health

Service health check with an ISO timestamp.

{ "success": true, "service": "portfolio2026-api", "version": "v1", "timestamp": "2026-08-24T05:46:09.462Z" }
GET/api/v1/hello

Minimal test endpoint that returns a greeting payload.

{ "message": "Hello from the API" }
GET/api/v1/articles

Lists published articles. Supports optional query params such as status, tag, q, limit, and offset.

{ "success": true, "posts": [/* article records */], "total": 12 }
POST/api/v1/contact

Submits a contact inquiry. Expects JSON with fullName, countryCode, phone, email, and message.

{ "ok": true }
GET/api/v1/agent-access

Payable agent-native endpoint. Returns HTTP 402 plus payment requirements until a valid payment proof is supplied.

{ "success": true, "access": "granted", "resource": "agent-brief", "brief": "..." }
AUTH/.well-known/oauth-authorization-server

Protected write endpoints in this project publish protected-resource metadata at /.well-known/oauth-protected-resource and expose live OAuth/OIDC discovery documents backed by the configured external issuer. Agent registration guidance is available at /auth.md.

{
  "protectedResource": "https://himanshurawat.in/.well-known/oauth-protected-resource",
  "oauthDiscoveryEnabled": false,
  "oidcDiscoveryEnabled": false,
  "provider": null,
  "issuer": null,
  "authMd": "https://himanshurawat.in/auth.md",
  "docs": "https://himanshurawat.in/docs/api#authentication"
}
BOT/.well-known/http-message-signatures-directory

This site publishes a Web Bot Auth directory endpoint for HTTP message-signature key discovery. The directory is signed end-to-end with an Ed25519 key so receiving services can verify both the key directory payload and any signed bot or agent requests sent by this site.

{
  "directory": "https://himanshurawat.in/.well-known/http-message-signatures-directory",
  "configured": true,
  "keyCount": 1,
  "source": "generated",
  "keyId": "eplaWksp_CTg2YnzNi2agevPsfVUFxsO_cfscERydSQ"
}
PAY/api/v1/agent-access

Agent-native payments are exposed through a payable endpoint that returns HTTP 402 plus x402-compatible payment requirements. Payment discovery is also published through /openapi.json , /.well-known/ucp , and /.well-known/acp.json .