Opinly Events API
The Events API from Opinly — 2 operation(s) for events.
The Events API from Opinly — 2 operation(s) for events.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/opinly-ai:opinly-ai-events-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Opinly SDK Events API
version: 1.0.0
description: Headless content API for the Opinly SDK.
tags:
- name: Events
paths:
/v1/events/purchase:
post:
tags:
- Events
summary: Record a purchase (server-side, authoritative revenue)
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseEvent'
responses:
'201':
description: Purchase recorded
content:
application/json:
schema:
$ref: '#/components/schemas/PurchaseEventResult'
'400':
description: Invalid request body
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Missing or invalid API key
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
operationId: postV1EventsPurchase
x-operation-id-source: derived
/v1/events:
post:
tags:
- Events
summary: Record an event (server-side)
security:
- BearerAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Event'
responses:
'201':
description: Event recorded
content:
application/json:
schema:
$ref: '#/components/schemas/EventResult'
'400':
description: Invalid request body
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
'401':
description: Missing or invalid API key
content:
application/problem+json:
schema:
$ref: '#/components/schemas/Problem'
operationId: postV1Events
x-operation-id-source: derived
components:
schemas:
PurchaseEventResult:
type: object
properties:
recorded:
type: boolean
example: true
required:
- recorded
EventResult:
type: object
properties:
recorded:
type: boolean
example: true
required:
- recorded
Problem:
type: object
properties:
type:
type: string
example: https://opinly.ai/docs/reference/errors/not-found
title:
type: string
example: Not found
status:
type: number
example: 404
detail:
type: string
instance:
type: string
code:
type: string
example: NOT_FOUND
request_id:
type: string
required:
- type
- title
- status
- code
PurchaseEvent:
type: object
properties:
orderId:
type: string
minLength: 1
maxLength: 251
description: Your unique order/transaction id. Idempotency + dedup key.
example: ord_12345
value:
type: number
minimum: 0
maximum: 99999999.99
description: Order total in major currency units (e.g. 49.00).
example: 49
currency:
type: string
minLength: 3
maxLength: 3
description: ISO 4217 currency code.
example: USD
email:
type: string
format: email
description: Customer email — attributes the purchase to a known visitor (hashed, never stored raw).
example: buyer@example.com
anonId:
type: string
minLength: 1
maxLength: 128
description: Opinly anonymous visitor id, if captured client-side.
example: a1b2c3d4
required:
- orderId
- value
Event:
type: object
properties:
event:
type: string
minLength: 1
maxLength: 64
description: Event name (snake_case). A standard event (purchase, sign_up, add_to_cart, generate_lead, …) or your own custom name.
example: sign_up
properties:
type: object
additionalProperties:
nullable: true
description: Arbitrary event properties. Revenue events (purchase, refund) should include `value` (major units) and `currency`.
example:
value: 49
currency: USD
externalEventId:
type: string
minLength: 1
maxLength: 255
description: Idempotency + dedup key. Repeat calls with the same id collapse to one event.
example: evt_12345
email:
type: string
format: email
description: Customer email — attributes the event to a known visitor (hashed, never stored raw).
example: buyer@example.com
anonId:
type: string
minLength: 1
maxLength: 128
description: Opinly anonymous visitor id, if captured client-side.
example: a1b2c3d4
required:
- event
securitySchemes:
BearerAuth:
type: http
scheme: bearer