GuidesWriting docs
Components
Callouts, steps, tabs, cards, file trees and API fields you can use in any page without importing them.
These components are registered in src/mdx-components.tsx, so you can use them in any .mdx file without an import. Add your own there.
Callout
A note adds context the reader may need.
Pro tip
A tip with a title suggests a better way.A warning points out something that can go wrong.
Danger is for data loss and security issues.
<Callout type="tip" title="Pro tip">
A **tip** with a title suggests a better way.
</Callout>Steps
Install the package
Run
npm install @relay/sdk.Add your key
Set
RELAY_API_KEY in your environment.<Steps>
<Step title="Install the package">Run `npm install @relay/sdk`.</Step>
<Step title="Add your key">Set `RELAY_API_KEY` in your environment.</Step>
</Steps>Tabs
Tabs with the same groupId switch together across the page and remember the reader's choice.
npm install @relay/sdkpnpm add @relay/sdkyarn add @relay/sdkbun add @relay/sdkTabs can hold any content, not only code:
Install with Homebrew:
brew install relay-cli.Install with Scoop:
scoop install relay-cli.<Tabs items={["npm", "pnpm"]} groupId="package-manager">
<Tab>
```bash
npm install @relay/sdk
```
</Tab>
<Tab>
```bash
pnpm add @relay/sdk
```
</Tab>
</Tabs>Cards
<Cards cols={3}>
<Card title="Quickstart" icon="rocket" href="/docs/quickstart/">Start in five minutes.</Card>
</Cards>Available icons: book, code, key, rocket, terminal, webhook and zap. Add more in src/components/mdx/cards.tsx.
File tree
app
api
webhooks/route.ts# receives events
.env.local
<FileTree>
- app/
- api/
- webhooks/route.ts # receives events
- .env.local
</FileTree>API reference
POST/v1/endpoints/{endpoint_id}/rotate-secret
Body parameters
urlstringrequired
The HTTPS URL that receives events.
eventsstring[]default: ["*"]
Event types to subscribe to.
<Endpoint method="POST" path="/v1/endpoints/{endpoint_id}/rotate-secret" />
<Fields title="Body parameters">
<Field name="url" type="string" required>The HTTPS URL that receives events.</Field>
<Field name="events" type="string[]" defaultValue='["*"]'>Event types to subscribe to.</Field>
</Fields>