OpsTrailsDocs
Console

Quick Start

Send your first event to OpsTrails in under a minute. Choose your preferred method below.

Prerequisites

  1. Create an OpsTrails account
  2. Generate an API key with READ_WRITE scope from the API Keys page

Send Your First Event

bash
curl -X POST https://api.opstrails.dev/api/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "specversion": "1.0",
    "type": "deployment",
    "source": "//github.com/your-org/your-repo",
    "time": "NOW"
  }'

Tip

Use "NOW" as the time value to let OpsTrails set the current server time automatically.

Full Example

Here's a complete example with all optional fields:

bash
curl -X POST https://api.opstrails.dev/api/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "specversion": "1.0",
    "type": "deployment",
    "source": "//github.com/your-org/your-repo",
    "time": "2025-01-15T14:30:00Z",
    "subject": "production",
    "severity": "LOW",
    "version": "v1.2.3",
    "data": {
      "description": "Deployed to production"
    }
  }'

Verify

Query your events to confirm they were recorded:

bash
curl "https://api.opstrails.dev/api/v1/events?type=deployment" \
  -H "Authorization: Bearer YOUR_API_KEY"

What's Next?