API Blocks
The ApiBlock component renders interactive REST API endpoint documentation with color-coded method badges, JSON highlighting, auth indicators, and auto-generated cURL examples.
Quick Start
A simple GET endpoint.
/api/v1/statusNo auth requiredCheck the service health status.
Adding Options
A POST with a request body, status code, and rate limit.
/api/v1/tokensBearer TokenGenerate an access token with a scope and expiration.
Advanced
Multiple response tabs and deprecation marking.
/api/v1/docsBearer TokenRetrieve documents using the legacy endpoint.
Options
methodstringrequiredGET, POST, PUT, PATCH, or DELETE.
endpointstringrequiredURL path.
descriptionstringText shown below the header explaining what the endpoint does.
headersJSON stringRequest headers as a JSON object string.
bodyJSON stringRequest body.
responseJSON stringSingle response body.
statusCodenumberDefault: 200HTTP status code for the single response.
responsesJSON stringJSON array of response items, each with statusCode, optional label, and
body.
authstringbearer, apiKey, basic, oauth2, or none.
authLabelstringCustom label that overrides the default auth label.
deprecatedbooleanDefault: falseMarks the endpoint deprecated.
deprecationNotestringMigration guidance shown in a warning box.
rateLimitstring/JSONRate limiting metadata as plain text or JSON.
baseUrlstringBase URL prefix shown in muted text before the endpoint path.
codeExamplesJSON stringJSON array of extra examples, each with language, label, and code.