Operational

DocsGithub Open app

Operational

Github Articles Pitch Usecases Playground API

Contents

Start here
Setup
Get started Send your first event Structured Events Actions Contexts Log limits and errors
Events API
API
Error handling Event parametersPOST Log event Sending actions in events
The Manual
Introduction PWA & push notifications Conventions Setup Manage projects and teammates Categories and search View events in your project Setup PWA on phone Test mode Notifications
Integrations
Nodejs SDK PHP SDK Wordpress plugin
Self hosting
Introduction Install locally Install on VPS Install on Render Install via Docker Install via Docker and Coolify Onboarding Setup .env Setup PWA & push notifications Best practices Durability testing
Other
Vision Roadmap Contributing

Log event

Create an event in Operational. Send either name, content, or both.

Endpoint

  • Method: POST
  • Path: /api/v1/log

Authentication

  • bearerAuth

Request body

Required: true

application/json

Schema: #/components/schemas/LogEventPayload

{
  "name": "user signed up",
  "avatar": ":)",
  "content": "Someone signed up"
}

text/plain

Schema type: string

:) user signed up

Responses

201

Event created

  • text/plain: Schema type: string

400

Invalid payload

  • text/plain: Schema type: string

401

Authorization failed

  • text/plain: Schema type: string

Code samples

SDK (@operational.co/sdk)

import Operational from "@operational.co/sdk";

const ops = new Operational("API_KEY", {
  // Optional: override per deployment
  baseUrl: "https://api.your-domain.com",
});

await ops.events.log({
  name: "user signed up",
  avatar: ":)",
});

cURL

curl -X POST "https://api.your-domain.com/api/v1/log" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"user signed up","avatar":":)"}'
Event parametersSending actions in events

Operational

PrivacyTerms
About the product
  • Use cases
  • Playground
  • API
  • Pitch
  • Pricing
  • Wordpress plugin
Related to the product
  • Open Source
  • Articles
  • VS Logsnag
Useful articles for your SaaS
  • My experience running a Commercial OSS project
  • Force post: The Payment Hack that lets Merchants charge you without approval
  • 6 Best practices for early stage B2B SaaS customer support
  • Setup event notifications for your SaaS