Code samples and SDKs
Protocol examples are generated. SDK examples are mapped by you.
0:00 / 0:16
Every operation shows cURL, HTTP, JavaScript, TypeScript, Java and Python examples generated from the canonical operation. Choosing an environment changes only the approved base URL; credentials stay placeholders.
Map an SDK
sdks: [{
id: "ts",
label: "TypeScript",
language: "typescript",
package: "@testinbox/client",
examples: [{
operation: "createInbox",
code: "const inbox = await client.inboxes.create({ ttl: 3600 });",
}],
}],Code in guides
Fenced code is highlighted at build time. title="…" is the only fence attribute.
```typescript title="signup.test.ts"
const inbox = await client.inboxes.create({ ttl: 600 });
```Use CodeGroup for the same thing in several tools — each fence title becomes a tab.
<CodeGroup>
```bash title="npm"
npm install @testinbox/client
```
```bash title="pnpm"
pnpm add @testinbox/client
```
</CodeGroup>Edge cases
Extra fence attributes
CONTENT_COMPONENT_PROP_INVALID✕ FAILSdocs/x.md
```ts title="a.ts" highlight="2"✓ FIXdocs/x.md
```ts title="a.ts"Only `title` is accepted.
Unknown language
No diagnostic✕ FAILSdocs/x.md
```hcl✓ FIXdocs/x.md
```tomlIt renders as plain text. Use a supported alias if one fits.
No SDK yet
Misleading✕ FAILSspecistry.config.ts
sdks: [{ id: "ts", examples: [] }]✓ FIXspecistry.config.ts
// omit sdks entirelyReaders assume a client exists.