Skip to content

ButterIX v1 is out: versions, multiple languages, Ask AI, and a per-site MCP server, all built in. →

Endpoint request snippet

<EndpointRequestSnippet> embeds an endpoint's request example from the API reference.

This component pulls data from the API reference, so it updates automatically with the OpenAPI spec. The examples below reference this site's platform API.

A request example card for an endpoint, with multi-language code and a "Try it" button (alias <RequestSnippet>):

<EndpointRequestSnippet endpoint="POST /orgs/{org}/api-keys" languages={["curl", "python", "javascript"]} />
POST/orgs/:org/api-keys
curl -X POST https://api.butterix.com/v1/orgs/acme/api-keys \
     -H "Content-Type: application/json" \
     -d '{}'
endpointstringRequired
METHOD /path, e.g. "POST /orgs/{org}/api-keys"; with multiple APIs, write api-name::METHOD /path.
examplestring
Pick a named example from the spec (by name or summary).
languagesstring[]
Languages to show, in order; may include "payload" (request body only). Aliases such as typescript, ts, and shell work too.
highlightstring | array
Lines to highlight, e.g. "1-3".
hideTryItButtonboolean
Hide the "Try it" button.

In the page's .md version it's the request example as code blocks: one per language when languages is set, otherwise only the site's first language.