Quick Start
From dashboard account to first delivery
The platform already provisions an application for each signed-in user. Your job is to obtain the key, register at least one endpoint, and start sending named events.
REST API
Current surface area
All routes below are scoped to the current application through the Bearer API key. Messages and deliveries support offset-based pagination, with limit defaulting to 20 and capped at 100.
cURL examples
Minimal requests to get started
1. Export environment variables
export BASE_URL="https://your-webhook-platform.example.com"
export WEBHOOK_API_KEY="whk_your_current_api_key"2. Create an endpoint
curl -X POST "$BASE_URL/api/v1/endpoints" \
-H "Authorization: Bearer $WEBHOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhooks/orders",
"events": ["order.created", "order.cancelled"],
"description": "Orders service",
"metadata": { "env": "production" }
}'3. Publish a message
curl -X POST "$BASE_URL/api/v1/messages" \
-H "Authorization: Bearer $WEBHOOK_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"event_type": "order.created",
"payload": {
"id": "ord_123",
"customer_id": "cus_456",
"total": 4900
},
"endpoint_ids": ["endpoint_uuid_if_you_need_targeting"]
}'4. Inspect and retry deliveries
curl "$BASE_URL/api/v1/deliveries?status=FAILED&limit=20" \
-H "Authorization: Bearer $WEBHOOK_API_KEY"
curl -X POST "$BASE_URL/api/v1/deliveries/delivery_uuid/retry" \
-H "Authorization: Bearer $WEBHOOK_API_KEY"NestJS SDK
Use the published client package
The current package name is @nestarc/webhook-client and the version in this repo is 0.1.0. The client posts to /api/v1/messages with the same Bearer API key you use from cURL, ships a dedicated User-Agent header, and exposes structured error classes for timeout and API failures.
Example module and service
import { Injectable, Module } from '@nestjs/common';
import {
WebhookClientModule,
WebhookClientService,
} from '@nestarc/webhook-client';
@Module({
imports: [
WebhookClientModule.forRoot({
baseUrl: process.env.WEBHOOK_BASE_URL!,
apiKey: process.env.WEBHOOK_API_KEY!,
}),
],
})
export class AppModule {}
@Injectable()
export class OrderEventsService {
constructor(private readonly webhookClient: WebhookClientService) {}
async emitOrderCreated(order: { id: string; total: number }) {
const result = await this.webhookClient.send({
eventType: 'order.created',
payload: order,
});
return result.id;
}
}Decorator mode for controller responses
import { Controller, Post } from '@nestjs/common';
import { WebhookEmit } from '@nestarc/webhook-client';
@Controller('orders')
export class OrdersController {
@Post()
@WebhookEmit('order.created', {
when: (response) => Boolean((response as { id?: string }).id),
await: true,
})
create() {
return { id: 'ord_123', total: 4900 };
}
}Use await: true in serverless environments when you want the webhook send attempt to finish before the HTTP response returns. By default, null and undefined responses are skipped.
Open-source docs
Related nestarc package documentation
The managed platform docs on this site cover the hosted API and dashboard. For engine internals and broader package references, use the official nestarc open-source documentation.
Next step
Generate a key, register an endpoint, and send the first event.
The dashboard owns credential reveal and rotation. The API and SDK use the same application key once you have it.