Quickstart
Send Your First Event in 15 Minutes
This guide walks you through:
- Creating a workspace
- Connecting a destination (webhook)
- Defining an event type and rule
- Sending your first event
- Verifying delivery in the UI
This quickstart uses public event ingestion with a workspace publishable key (
X-Meshes-Publishable-Key). Publishable keys are intended for client-side use and only work with event ingestion endpoints.
Need to manage workspaces, connections, or rules programmatically? Use the private management API, which requires a server-side machine JWT (never in browser code). See: API Documentation and Authentication.
1. Create a Workspace
In the Meshes dashboard:
- Go to Workspaces → New Workspace.
- Choose a name, e.g.
Acme DevorDemo Workspace.
You’ll use the workspace publishable key for sending events. This can be found on the workspace settings page.
2. Connect a Destination (Webhook)
For this quickstart, we’ll send events to a simple webhook.
- Create or use an existing HTTP endpoint that accepts
POSTrequests (you can use a service like webhook.site while prototyping). - In the Meshes dashboard, go to Connections → New Connection.
- Choose Webhook / HTTP.
- Enter:
- Name:
Demo Webhook - URL: your webhook URL
- Name:
- Save the connection.
You now have a destination Meshes can send events to.
3. Define a Rule
Create a rule:
- Go to Rules → New Rule.
- Set Event Type:
contact.created- This is the default event type created for your account
- Set a Connection: your
Demo Webhookconnection- Payload mapping: pass through the event payload (or map fields as needed)
- Save the rule and ensure it is enabled.
At this point:
Whenever a contact.created event arrives in this workspace, Meshes will send it to your webhook.
4. Send an Event
You can send events via HTTPS or an SDK. Below are two simple options.
Option A: curl (Publishable Key)
Replace placeholders with your real values:
WORKSPACE_PUBLISHABLE_KEY– a workspace publishable key
curl -X POST https://events.meshes.io/api/v1/events \
-H "X-Meshes-Publishable-Key: WORKSPACE_PUBLISHABLE_KEY" \
-H "Content-Type: application/json" \
-d '{
"event": "contact.created",
"payload": {
"id": "lead_123",
"email": "jane@example.com",
"first_name": "Jane",
"last_name": "Doe",
"source": "marketing-site",
"tier": "pro"
}
}'
You should receive a 2xx response indicating the event has been accepted for processing.
Option B: JavaScript / TypeScript (Publishable Key)
Using the Meshes simple client SDK:
import { MeshesEventsClient } from '@mesheshq/events';
const meshesClient = new MeshesEventsClient(
`${process.env.MESHES_WORKSPACE_PUBLISHABLE_KEY}`
);
async function sendContactCreated() {
await meshesClient.emit({
event: 'contact.created',
payload: {
email: 'jane@example.com',
first_name: 'Jane',
last_name: 'Doe',
tier: 'pro',
utm_source: 'google-ads',
},
});
console.log('Event accepted by Meshes');
}
sendContactCreated().catch(console.error);
Option C: Server-side (Machine JWT)
If you’re emitting events from a backend service, you can authenticate using a machine JWT:
5. Verify Delivery in the UI
- In the Meshes dashboard, open your workspace.
- Navigate to Events.
- Find the
contact.createdevent you just sent. - Inspect:
- Overall event status
- Per-destination status (your
Demo Webhook) - Any retries or error messages
If you used a webhook test service, you should also see the incoming HTTP request, including the payload Meshes sent.
Next Steps
After you’ve sent your first event:
- Add additional destinations (e.g., HubSpot + Mailchimp) to see true fan-out.
- Introduce conditions (e.g., only send to Mailchimp when
tier = "starter"). - Create multiple workspaces (e.g.,
acme-devvsacme-prod) to explore multi-tenancy. - Check your usage in the dashboard to understand how events and limits are tracked.
- Sending events from a browser/mobile app? Use a publishable key. Managing resources via API? Use the private API with a server-side JWT.
You now have the basics: workspace → connection → event type → rule → event → delivery.
Learn More
- Publishable Keys: client-safe keys for event ingestion
- Send Events: emit a single event
- Bulk Event Ingestion: emit up to 100 events per request
- API Documentation: private management APIs (server-side JWT)