OxinionDeveloper
oxinion.hooks

Forward location events to anywhere.

Hooks are outbound HTTP callbacks triggered by geofence events. When a user enters, exits, or dwells in a geofence, Oxinion delivers the event to your registered endpoint — no polling required.

Stable
Generally Available

Simple by design

Hooks are outbound HTTP callbacks triggered by geofence events. When a user enters, exits, or dwells in a geofence, Oxinion delivers the event to your registered endpoint — no polling required.

  • 01Subscribe to geofence.entered, exited, and dwelled events
  • 02Oxinion fires the webhook the moment the event occurs
Full API reference
TypeScript
1import { createOxinion } from 'oxinion';
2
3const oxinion = createOxinion({ apiKey: process.env.OXINION_API_KEY! });
4
5// Register a webhook endpoint
6const { webhook } = await oxinion.hooks.register({
7 url: 'https://yourapp.com/api/oxinion',
8 events: ['geofence.entered', 'geofence.exited', 'geofence.dwelled'],
9});
10
11// List all registered webhooks
12const { webhooks } = await oxinion.hooks.list();
13
14// Delete a webhook
15await oxinion.hooks.delete(webhook.id);
16
17// Your endpoint receives the event (app/api/oxinion/route.ts)
18export async function POST(req: Request) {
19 const { type, data } = await req.json();
20 // type: 'geofence.entered' | 'geofence.exited' | 'geofence.dwelled'
21 await handleEvent(type, data);
22 return new Response('ok');
23}

Connect Oxinion to everything you already use.

Hooks deliver location events to any endpoint. No custom middleware required.