• Blog
  • Documentation
  • FAQ
  • Contact
Join Waitlist

A single, reliable layer for all your product's integrations - rules, routing, retries, and fan-out included.

© Copyright 2025 Meshes. All Rights Reserved.

About
  • Blog
  • Contact
Product
  • Documentation
  • Status
Legal
  • Terms of Service
  • Privacy Policy
  • Cookie Policy
  • Getting Started
    • What is Meshes?
    • Core Concepts
    • Quickstart
    • API Overview
  • API Documentation
    • API Reference
    • Authentication
    • Results
    • Rate Limiting
  • Events
    • Publishable Keys
    • Send Events
    • Bulk Event Ingestion
  • Integrations
    • HubSpot
    • Intercom
    • Zoom

Send Events

Emit a single event into Meshes using either a publishable key (client-side) or a machine JWT (server-side).

Use this endpoint to emit a single event:

POST https://api.meshes.io/api/v1/events

You can authenticate with either:

  • X-Meshes-Publishable-Key (recommended for client-side), or
  • Authorization: Bearer <jwt> (server-side only)

Request

Headers (publishable key)

-H "X-Meshes-Publishable-Key: <WORKSPACE_PUBLISHABLE_KEY>"
-H "Content-Type: application/json"

Body

At minimum, send:

  • event (string): Your event name (e.g. contact.created)
  • payload (object): Event data (arbitrary JSON)

Optional fields:

  • resource (string)
  • resource_id (string)
  • workspace (uuid) — typically inferred from the publishable key; include only if your usage requires it

Example: curl (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",
      "utm_source": "google-ads"
    }
  }'

Example: TypeScript (Meshes client)

import { MeshesEventsClient } from '@mesheshq/events';

const client = new MeshesEventsClient(process.env.WORKSPACE_PUBLISHABLE_KEY!);

await client.emit({
  event: 'contact.created',
  payload: {
    email: 'jane@example.com',
    first_name: 'Jane',
    last_name: 'Doe',
    utm_source: 'google-ads',
  },
});

Responses

  • 201 Created — event accepted and queued for processing
  • 400 Bad Request — invalid payload
  • 401 Unauthorized — missing/invalid key or token
  • 429 Too Many Requests — rate limit exceeded
  • 500 Internal Error
  1. Request
    1. Body
    2. Responses