intentic
Create your workspace
The sandbox itself

Push notifications

So a finished turn can reach you when the tab is closed

On this page(4 sections)

What a device needs in order to subscribe, subscribing and unsubscribing, and a test. The test earns its place because there are four separate places a notification can be lost that nobody can inspect from outside.

GET/push/configWhat a device needs to subscribe

The public key and settings a browser or app needs before it can register for notifications from this sandbox.

What you send

FieldTypeWhere
idWhich device is askingstringquery

What comes back

FieldType
publicKeyThe key a browser needs in…string
subscribedWhether the asking device is already…boolean
Try itanswered in this tab
curl
curl "$SANDBOX/push/config" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.push.config();
POST/push/subscribeSend notifications to this device

Registers one device. The sandbox only interrupts you on the three moments where attention is genuinely wanted: a turn has finished, the agent is stuck on a question, and something is waiting for approval.

What you send

FieldTypeWhere
when kind is "webpush"shapebody
endpointrequiredWhere that browser's push service accepts…stringbody
keysrequiredWhat the browser handed you when…objectbody
p256dhrequiredThe browser's public key, for encrypting…stringbody
authrequiredThe browser's secret, for the samestringbody
when kind is "relay"shapebody
urlrequiredWhere to post a sendstringbody
deviceIdrequiredThe device's id, which also identifies…stringbody
secretrequiredProof that this sandbox may notify…stringbody

What comes back

FieldType
okAlways truetrue
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/push/subscribe" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"kind":"webpush","endpoint":"https://sandbox-a1b2c3d4e5f6.intentic.dev","keys":{"p256dh":"…","auth":"…"}}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.push.subscribe({
  "kind": "webpush",
  "endpoint": "https://sandbox-a1b2c3d4e5f6.intentic.dev",
  "keys": {
    "p256dh": "",
    "auth": ""
  }
});
POST/push/unsubscribeStop notifying a device

Removes one registered device. Others keep receiving.

What you send

FieldTypeWhere
idrequiredWhich device: a browser's push address,…stringbody

What comes back

FieldType
okAlways truetrue
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/push/unsubscribe" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"id":"a1b2c3d4"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.push.unsubscribe({
  "id": "a1b2c3d4"
});
POST/push/testSend a test notification

Proves the whole chain end to end. Worth having, because there are four separate places a notification can be lost that nobody can inspect from the outside: the device's permission, its registration, the sandbox's key, and the delivery service.

What you send

Nothing. Call it as it is.

What comes back

FieldType
deliveredHow many devices actually accepted itinteger
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/push/test" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.push.test();
More in The sandbox itself

Type to search every page, in the docs and the API reference.