Scribe Component Showcase
Every component that ships with Scribe, rendered live. This is exactly what your documentation will look like — dark mode, light mode, responsive, accessible.
Callouts
Five types for every situation. Each with its own icon and color scheme.
Informational
Success
Warning
Danger
Pro Tip
Code Block
Syntax highlighting for 30+ languages with a copy button, language label, and optional filename header.
import Scribe from "scribe-docs";
const docs = new Scribe({
name: "My API",
version: "2.0",
theme: {
primaryColor: "#6366f1",
darkMode: true,
},
});
// Register your API endpoints
docs.endpoint("POST", "/users", {
description: "Create a new user",
bodyParams: [
{ name: "email", type: "string", required: true },
{ name: "role", type: '"admin" | "member"' },
],
});
docs.build();from scribe import Scribe
app = Scribe(
name="My API",
version="2.0",
base_url="https://api.example.com",
)
@app.endpoint("POST", "/users")
def create_user(email: str, role: str = "member"):
"""Create a new user account."""
return {"id": "usr_01J8X...", "email": email, "role": role}# Install Scribe and create your docs
git clone https://github.com/RapierCraft/Scribe.git my-docs
cd my-docs && npm install
npm run dev
# Open http://localhost:3000/docsCode Tabs
Multi-language code examples in a single tabbed container. Perfect for showing the same API call in different languages.
curl -X POST https://api.example.com/v1/payments \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{
"amount": 2000,
"currency": "usd",
"customer": "cus_abc123"
}'API Endpoint
Structured API documentation with method badges, parameter tables, multi-language request examples, and response status switching.
/v1/paymentsAuth requiredCreate a new payment intent. The payment will be in a 'requires_payment_method' state until a payment method is attached and confirmed.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
| amount | integer | Required | Amount in cents. Minimum 50.Example: 2000 |
| currency | string | Required | Three-letter ISO 4217 currency code.Example: "usd" |
| customer | string | Optional | ID of the customer to associate with this payment.Example: "cus_abc123" |
| description | string | Optional | Arbitrary string for your own records. |
| metadata | object | Optional | Key-value pairs for storing additional information. |
Request Examples
curl -X POST https://api.example.com/v1/payments \
-H "Authorization: Bearer sk_live_..." \
-H "Content-Type: application/json" \
-d '{"amount": 2000, "currency": "usd"}'Responses
{
"id": "pay_01HXZ7KBPM2QGQAZ5JRPEY8AX",
"object": "payment",
"amount": 2000,
"currency": "usd",
"status": "requires_payment_method",
"client_secret": "pay_01HXZ7..._secret_QZKpHnHF",
"created_at": "2026-03-21T10:00:00Z"
}/v1/payments/:idAuth requiredRetrieve a payment by its unique identifier.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Required | The payment ID (starts with "pay_").Example: "pay_01HXZ7..." |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| expand | string[] | Optional | Related objects to expand inline. Supports: customer, invoice.Example: ["customer"] |
Responses
{
"id": "pay_01HXZ7KBPM2QGQAZ5JRPEY8AX",
"object": "payment",
"amount": 2000,
"currency": "usd",
"status": "succeeded",
"customer": "cus_abc123",
"created_at": "2026-03-21T10:00:00Z"
}/v1/payments/:idAuth requiredCancel a payment that has not yet been captured. This action is irreversible.
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Required | The payment ID to cancel. |
Responses
{
"id": "pay_01HXZ7KBPM2QGQAZ5JRPEY8AX",
"status": "cancelled",
"cancelled_at": "2026-03-21T10:05:00Z"
}Steps
Numbered step-by-step instructions with connector lines. Each step supports a title, description, and optional embedded content.
Install the SDK
Choose your language and install the official SDK from your package manager.
npm install @acme/sdk
# or
pip install acme-sdkConfigure your API key
Add your secret key to environment variables. Never commit it to version control.
ACME_API_KEY=sk_live_your_key_here
ACME_WEBHOOK_SECRET=whsec_your_secret_hereCreate your first payment
Initialize the client and make your first API call. The SDK handles authentication automatically.
import { Acme } from "@acme/sdk";
const acme = new Acme(process.env.ACME_API_KEY);
const payment = await acme.payments.create({
amount: 2000,
currency: "usd",
description: "Premium subscription",
});
console.log(payment.client_secret);Handle the webhook
Listen for payment events to fulfil orders, send receipts, and update your database.
app.post("/webhooks/acme", async (req, res) => {
const event = acme.webhooks.verify(
req.body,
req.headers["acme-signature"],
);
if (event.type === "payment.succeeded") {
await fulfillOrder(event.data.id);
}
res.json({ received: true });
});Go live
Switch from test mode to live mode by replacing your API key. No code changes needed — the SDK handles everything.
Cards
Navigation cards with icons, descriptions, badges, and hover animations. Great for landing pages and section indexes.
Quick Start
Get up and running in under 5 minutes with our step-by-step guide.
API Reference
Complete endpoint documentation with examples in every language.
SDKs & Libraries
NewOfficial SDKs for JavaScript, Python, Go, Ruby, and PHP.
Webhooks
Receive real-time events and build reliable event-driven workflows.
Three-column layout
Authentication
API keys, OAuth2, and token management.
Rate Limits
Understand concurrency limits and throttling.
Error Codes
Complete reference for all error responses.
Global Coverage
135+ currencies across 47 countries.
Theming
ProCustomize colors, fonts, and layout.
Search
Built-in full-text search. Press "/" to try it.
Typography
All standard Markdown elements are pre-styled through the MDX component system.
Inline code
Use inline code for variable names, function calls like createPayment(), or HTTP methods like POST /v1/payments.
Lists
- Unordered lists use disc markers
- They support
inline codeand bold text - Nested content renders cleanly at any depth
- Ordered lists use decimal numbering
- Perfect for sequential instructions
- Each item aligns with consistent spacing
Blockquote
“The best API documentation is the one developers actually read.”
— Every developer advocate, ever.
Table
| Status | Meaning | Action |
|---|---|---|
200 | Success | Process the response body |
401 | Unauthorized | Check your API key |
429 | Rate Limited | Back off and retry with exponential delay |
500 | Server Error | Retry or contact support |