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

Event parameters

Here are all event api’s parameters. Only name is required, everything else is optional.

namestring required

Required, must be a string, max 26 characters, more characters will be truncated.

avatarstring

1 character only. Rest will be truncated.

typestring

If left blank, defaults to ‘text’. Controls how content field is rendered. Options are ‘text’, ‘rows’, ‘json’, ‘image’.

userIdstring

[NOT USED FOR NOW] Defaults to null. Use this to map events to specific users. If a number is passed, it will be converted to a string.

categorystring

Use this to group common events by a specific category, eg: error, user, billing, etc. Read more about categories here.

contentstring/json

Mixed content type, can be a string or JSON depending on what type is set.

actionsjson

JSON Array, defaults to an empty array. Related to actions.

mutedboolean

Defaults to false. If true, won’t show up in the events UI unless the unmute button next to the search bar is clicked.

notifyboolean

Defaults to false. If true, will send you a push notification(if enabled on your device)

testboolean

Optional, boolean, defaults to false. If true, this event won’t show up unless test mode is activated.

contextIdstring

Defaults to null. Related to contexts.

contextStartboolean

Defaults to false. Related to contexts.


Example code:

const ops = new Operational("yourapikey");
const e = {
  name: "some event",
  avatar: "🤖",
  type: "text",
  userId: null,
  content: "Hello mellow!",
  actions: [],
  muted: false,
  notify: false,
  test: false,
  contextId: null,
  contextStart: false
};

await ops.events.log(e);
const e = {
  name: "some event",
  avatar: "🤖",
  type: "text",
  userId: null,
  content: "Hello mellow!",
  actions: [],
  muted: false,
  notify: false,
  test: false,
  contextId: null,
  contextStart: false
};

const token = "ops_yourapikey";

const config = {
  method: "POST",
  headers: {
  "Content-Type": "application/json",
  "Authorization": `Bearer ${token}`
  },
  body: JSON.stringify(e)
}

await fetch(url, config);'
Error handlingLog event

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