[{"label":"Frontend admission","endpoints":[{"method":"POST","path":"/api/admission","summary":"Trusted frontend rate-limit admission","description":"Server-only RATE_LIMIT_SECRET bearer required, distinct from OWNER_API_TOKEN. Fixed aggregate, owner, failure and resolver policies share the existing counter store. Never accepts visitor forwarding headers as identity. See docs/url-security.md.","params":[{"name":"environment (body)","type":"string","required":true,"description":"production or preview; isolated counter namespaces."},{"name":"kind (body)","type":"string","required":true,"description":"aggregate, owner, failure or resolver."},{"name":"clientIp (body)","type":"string","required":true,"description":"Validated Vercel ingress IPv4/IPv6, asserted only by the authenticated frontend."}],"responses":[{"status":204,"description":"Admission granted."},{"status":401,"description":"Admission authorization required."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Admission disabled or shared counter unavailable."}]}]},{"label":"Main","endpoints":[{"method":"GET","path":"/","summary":"API documentation page","description":"Cached repository-owned Markdown plus endpoint metadata; restart/watch to refresh.","params":[],"responses":[{"status":200,"description":"HTML documentation."}]},{"method":"GET","path":"/api/","summary":"API documentation (JSON)","description":"Returns this endpoint catalog. Shared API failures use { error, code, requestId } with an X-Request-ID header.","params":[],"responses":[{"status":200,"description":"Array of endpoint groups."}]},{"method":"GET","path":"/health/live","summary":"Liveness","description":"Process is responding; does not probe optional providers.","params":[],"responses":[{"status":200,"description":"{ status: \"ok\" }"}]},{"method":"GET","path":"/health/ready","summary":"Readiness","description":"Traffic is accepted only after database/index readiness. Readiness becomes false on draining or loss of DB connection.","params":[],"responses":[{"status":200,"description":"{ status: \"ready\" }"},{"status":503,"description":"{ status: \"not_ready\" }"}]}]},{"label":"GitHub","endpoints":[{"method":"GET","path":"/api/github/getCommits/:word","summary":"Search public commit messages","description":"Public GitHub commit-message phrase search. The trimmed input is quoted; quotes, backslashes and control characters are rejected. No owner/repo restriction, credentials or cache.","params":[{"name":"word","type":"string","required":true,"description":"Message phrase, 1-200 characters."},{"name":"page (query)","type":"number","required":false,"description":"Page 1-1000; default 1. Search is also subject to GitHub result limits."},{"name":"per_page (query)","type":"number","required":false,"description":"Page size 1-100; default 30."}],"responses":[{"status":200,"description":"GitHub search object with total_count, incomplete_results and items; extra upstream fields are retained."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":404,"description":"GitHub resource not found."},{"status":502,"description":"GitHub network, HTTP or response-contract failure."},{"status":503,"description":"GitHub denied access or rate limited the request."},{"status":504,"description":"GitHub deadline exceeded or request cancelled."}]},{"method":"GET","path":"/api/github/getCommitsByRepoAndOwner/:owner/:repo","summary":"List repository commits","description":"Public commit list for a validated owner/repository. Upstream pagination is explicit; native GitHub array shape is retained.","params":[{"name":"owner","type":"string","required":true,"description":"Account/organization name, 1-39 characters."},{"name":"repo","type":"string","required":true,"description":"Repository name, 1-100 letters, digits, dots, underscores or hyphens."},{"name":"page (query)","type":"number","required":false,"description":"Page 1-1000; default 1. Search is also subject to GitHub result limits."},{"name":"per_page (query)","type":"number","required":false,"description":"Page size 1-100; default 30."}],"responses":[{"status":200,"description":"GitHub commit array for the requested page."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":404,"description":"GitHub resource not found."},{"status":502,"description":"GitHub network, HTTP or response-contract failure."},{"status":503,"description":"GitHub denied access or rate limited the request."},{"status":504,"description":"GitHub deadline exceeded or request cancelled."}]}]},{"label":"Blog","endpoints":[{"method":"GET","path":"/api/blog","summary":"Published blog summaries (public)","description":"Published, non-future posts only. No article bodies. Shared cache TTL 60 seconds. See docs/blog.md for the full contract.","params":[{"name":"language (query)","type":"string","required":false,"description":"en or es."},{"name":"category (query)","type":"string","required":false,"description":"Exact category, maximum 80 characters."},{"name":"page (query)","type":"number","required":false,"description":"1-1000; default 1."},{"name":"limit (query)","type":"number","required":false,"description":"1-100; default 25."},{"name":"sort (query)","type":"string","required":false,"description":"slug (default, ascending) or publishedAt (descending)."},{"name":"status (query)","type":"string","required":false,"description":"Only published is accepted."}],"responses":[{"status":200,"description":"{ data: BlogPostSummary[], pagination: { page, limit, total, pages } }"},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"GET","path":"/api/blog/:slug","summary":"Published article (public)","description":"Complete language-prefixed slug must be URL-encoded, e.g. en%2F6-state-of-devs-2026-ai-workflow. Drafts and future posts return 404.","params":[{"name":"slug","type":"string","required":true,"description":"Unique language-prefixed slug, at most 200 characters."}],"responses":[{"status":200,"description":"BlogPostSummary plus Markdown content."},{"status":404,"description":"Blog post not found or not public."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"GET","path":"/api/blog/admin","summary":"All blog summaries (owner)","description":"OWNER_API_TOKEN bearer authentication. Includes drafts and future publications. Cache-Control: no-store. Unknown, repeated and structured queries are rejected.","params":[{"name":"status (query)","type":"string","required":false,"description":"draft or published; omit for both, including scheduled posts."},{"name":"language (query)","type":"string","required":false,"description":"en or es."},{"name":"category (query)","type":"string","required":false,"description":"Exact category, maximum 80 characters."},{"name":"page (query)","type":"number","required":false,"description":"1-1000; default 1."},{"name":"limit (query)","type":"number","required":false,"description":"1-100; default 25."},{"name":"sort (query)","type":"string","required":false,"description":"updatedAt (default), publishedAt or createdAt descending with ascending slug ties; slug ascending."}],"responses":[{"status":200,"description":"{ data: BlogPostSummary[], pagination: { page, limit, total, pages } }"},{"status":401,"description":"Owner bearer authorization required."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"GET","path":"/api/blog/admin/:id","summary":"Full blog post by ID (owner)","description":"OWNER_API_TOKEN bearer authentication. Returns drafts, published and future posts including Markdown content. Cache-Control: no-store.","params":[{"name":"id","type":"string","required":true,"description":"24 lowercase hex MongoDB ID."}],"responses":[{"status":200,"description":"BlogPostSummary plus Markdown content."},{"status":401,"description":"Owner bearer authorization required."},{"status":404,"description":"Blog post not found."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"POST","path":"/api/blog","summary":"POST blog post (owner)","description":"Existing OWNER_API_TOKEN bearer authentication. Strict input allowlist; no public writes. Full field definitions and examples in docs/blog.md.","params":[{"name":"body","type":"object","required":true,"description":"slug, language, title, content, coverImage; optional metadata."}],"responses":[{"status":201,"description":"Full blog post."},{"status":401,"description":"Owner bearer authorization required."},{"status":404,"description":"Blog post not found."},{"status":409,"description":"Duplicate slug."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"PATCH","path":"/api/blog/:id","summary":"PATCH blog post (owner)","description":"Existing OWNER_API_TOKEN bearer authentication. Strict input allowlist; no public writes. Full field definitions and examples in docs/blog.md.","params":[{"name":"id","type":"string","required":true,"description":"24 lowercase hex MongoDB ID."}],"responses":[{"status":200,"description":"Full blog post."},{"status":401,"description":"Owner bearer authorization required."},{"status":404,"description":"Blog post not found."},{"status":409,"description":"Duplicate slug."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"DELETE","path":"/api/blog/:id","summary":"DELETE blog post (owner)","description":"Existing OWNER_API_TOKEN bearer authentication. Strict input allowlist; no public writes. Full field definitions and examples in docs/blog.md.","params":[{"name":"id","type":"string","required":true,"description":"24 lowercase hex MongoDB ID."}],"responses":[{"status":200,"description":"{ id }"},{"status":401,"description":"Owner bearer authorization required."},{"status":404,"description":"Blog post not found."},{"status":409,"description":"Duplicate slug."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]}]},{"label":"URL Shortener","endpoints":[{"method":"GET","path":"/api/url","summary":"List a page of stored URLs (owner)","description":"Owner bearer authorization required. Ascending immutable _id order, projected fields and an opaque next cursor.","params":[{"name":"limit (query)","type":"number","required":false,"description":"1-100; default 25."},{"name":"after (query)","type":"string","required":false,"description":"24 lowercase hexadecimal characters; use pagination.next from the previous response."}],"responses":[{"status":200,"description":"{ error: false, message: \"URLs found\", data: [...], pagination: { limit, next } }. next is null at the end."},{"status":401,"description":"Owner bearer authorization required."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"POST","path":"/api/url/create","summary":"Create or reuse a short URL (owner)","description":"Owner bearer authorization required. Global exact original-URL reuse without canonicalization. New numeric codes use a cryptographically random 47-bit allocation space, with unique indexes and five bounded attempts.","params":[{"name":"original_url (body)","type":"string","required":true,"description":"Absolute HTTP(S) URL, at most 2048 characters, no embedded credentials, whitespace or control characters."}],"responses":[{"status":200,"description":"Projected document { _id, original_url, short_url, creation_date }, created or reused."},{"status":401,"description":"Owner bearer authorization required."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"GET","path":"/api/url/:short_url","summary":"Get a stored URL (public)","description":"Public lookup by issued numeric short code; no redirect and no list access.","params":[{"name":"short_url","type":"number","required":true,"description":"Nonnegative safe integer: canonical digits or legacy four-digit zero padding. Existing issued codes remain supported."}],"responses":[{"status":200,"description":"Projected URL document { _id, original_url, short_url, creation_date }."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":404,"description":"URL not found."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]},{"method":"DELETE","path":"/api/url/delete/:short_url","summary":"Delete a short URL (owner)","description":"Owner bearer authorization required. Deletes the stored mapping; a missing mapping returns 404.","params":[{"name":"short_url","type":"number","required":true,"description":"Nonnegative safe integer: canonical digits or legacy four-digit zero padding. Existing issued codes remain supported."}],"responses":[{"status":200,"description":"Projected deleted URL document."},{"status":401,"description":"Owner bearer authorization required."},{"status":400,"description":"Invalid input, code, path encoding or pagination."},{"status":413,"description":"Body exceeds 100 KiB or form has over 100 parameters."},{"status":415,"description":"Unsupported request encoding."},{"status":429,"description":"Rate limit exceeded."},{"status":500,"description":"Unexpected internal failure; details are masked."},{"status":404,"description":"URL not found."},{"status":503,"description":"Database unavailable or bounded code allocation exhausted."}]}]}]