Skip to content

Quick Start

This guide gets you from zero to your first event: create an API key, report an event through the API, and look it up again.

  1. Sign in to the Dashboard with Google or your email.

  2. Open Settings, find API Keys, enter a key name and click Create key. Copy the key right away: it is shown only once.

  3. Terminal window
    curl -X POST "https://api.messagerouter.dev/v1/events" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer <API_KEY>" \
    -d '{
    "source_event_id": "ext-001",
    "type": "message.link",
    "actor": { "source_user_id": "u001", "display_name": "demo" },
    "payload": {
    "text": "Recommended reading https://example.com/article/1",
    "url": "https://example.com/article/1",
    "title": "Example Article"
    }
    }'

    The first report returns created: true (HTTP 201). Sending the same source_event_id again returns created: false (HTTP 200).

  4. Terminal window
    curl "https://api.messagerouter.dev/v1/events?limit=20" \
    -H "Authorization: Bearer <API_KEY>"