API Components
Components for displaying HTTP methods, endpoints, parameters, responses, and authentication. Mostly driven by frontmatter in content files.
HttpMethodBadge
Colored badge for HTTP methods with method-specific colors.
| Prop | Type | Default | Description |
|---|---|---|---|
| method | HttpMethod | — | GET, POST, PUT, PATCH, or DELETE |
| size | 'sm' | 'md' | 'md' | Badge size |
PathDisplay
Renders API paths with highlighted path parameters (e.g. :id).
/v1/customers/:id /v1/customers/:customer_id/sources/:source_id /v1/customers/:id| Prop | Type | Default | Description |
|---|---|---|---|
| path | string | — | API path with :param placeholders |
| compact | boolean | false | Smaller font size |
EndpointCard
Card linking to an endpoint page. Shows method badge, path, title, and description.
/v1/customersCreate a customer
Creates a new customer object.
/v1/customers/:idRetrieve a customer
Retrieves the details of an existing customer.
/v1/customers/:idDelete a customer
DeprecatedPermanently deletes a customer.
| Prop | Type | Description |
|---|---|---|
| method | HttpMethod | HTTP method |
| path | string | API endpoint path |
| title | string | Endpoint title |
| description | string? | Optional description text |
| href | string | Link destination |
| deprecated | boolean | Show deprecated styling (reduced opacity, strikethrough) |
ParameterList
Recursive parameter list with types, required/nullable badges, enums, and expandable child
attributes. Driven by frontmatter parameters array.
Body parameters
Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the smallest currency unit.
Three-letter ISO currency code, in lowercase.
Possible enum values:
- •
usd— US Dollar - •
eur— Euro - •
gbp— British Pound
Set of key-value pairs for storing additional information.
parameters:
- name: amount
type: integer
required: true
description: Amount to charge in smallest currency unit.
- name: currency
type: string
required: true
enum:
- value: usd
description: US Dollar
- value: eur
description: Euro
- name: metadata
type: object
nullable: true
expandable: true
children:
- name: order_id
type: string
description: Your internal order ID.ResponseBlock
Displays an HTTP response status code with description and optional JSON example.
Successfully created the customer.
{
"id": "cus_1234abc",
"object": "customer",
"email": "jane@example.com"
}The requested customer does not exist.
| Prop | Type | Description |
|---|---|---|
| statusCode | number | HTTP status code (color-coded: 2xx green, 4xx/5xx red) |
| description | string | Response description |
| example | string? | JSON response example (displayed in code block) |
ReturnsSection
"Returns" section at the bottom of endpoint pages describing the response type.
Returns
Returns the Customer object
| Prop | Type | Description |
|---|---|---|
| description | string | Return description text |
| type | string? | Type name to display (rendered as link if href provided) |
| href | string? | Link to type definition |
AuthBadge
Displays the security scheme and optional scopes for an endpoint.
| Prop | Type | Description |
|---|---|---|
| scheme | string | Security scheme name |
| scopes | string[]? | Required scopes (displayed as small accent badges) |