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
You’ll need a Meshes account and access to the dashboard.
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
Replace placeholders with your real values:
WORKSPACE_PUBLISHABLE_KEY– a workspace publishable key
curl -X POST https://api.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",
"plan": "pro"
}
}'
You should receive a 2xx response indicating the event has been accepted for processing.
Option B: JavaScript / TypeScript (Node)
Using the Meshes simple client SDK:
import { MeshesClient } from '@mesheshq/client';
const meshesClient = new MeshesClient(`${process.env.PUB_MESHES_WORKSPACE_KEY}`);
async function sendContactCreated() {
await meshesClient.emit({
event: 'contact.created',
payload: {
email: 'jane@example.com',
first_name: 'Jane',
last_name: 'Doe',
plan: 'pro',
utm_source: 'google-ads',
},
});
console.log('Event accepted by Meshes');
}
sendContactCreated().catch(console.error);
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
plan = "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.
You now have the basics: workspace → connection → event type → rule → event → delivery.