API reference

Server-side events

Report purchases and other events from your backend, where they cannot be tampered with.

Send events

POST/eventsevents:write

Records up to 50 events for a device and sends them to your webhooks and postbacks.

ParameterTypeDescription
app_idRequired integer The app this belongs to, from GET /apps.
device_idRequired string The UUID your app uses for this install with the SDK.
platformRequired string ios or android.
eventsRequired array Up to 50 objects with event_id, name, and optional time_ms, revenue, currency and properties.
curl -X POST "https://baiocodesolutions.com/api/v1/events" \
  -H "Authorization: Bearer $DEEPBERTH_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "app_id": 12,
    "device_id": "6f2b9a52-3c84-4b1e-9f10-2a7c1d4e8b90",
    "platform": "ios",
    "events": [
        {
            "event_id": "0c7f3a10-8d2e-4f6b-b1a4-93e5c2d7f810",
            "name": "purchase",
            "revenue": 19.99,
            "currency": "USD",
            "properties": {
                "sku": "A-100"
            }
        }
    ]
}'

202 Accepted

{
    "data": {
        "accepted": 1,
        "duplicates": 0
    }
}

Erase a device

DELETE/devices/{id}devices:write

Deletes a device and its install and event records, so you can honor an end user’s erasure request.

ParameterTypeDescription
app_idRequired integer The app this belongs to, from GET /apps.
curl -X DELETE "https://baiocodesolutions.com/api/v1/devices/6f2b9a52-3c84-4b1e-9f10-2a7c1d4e8b90?app_id=12" \
  -H "Authorization: Bearer $DEEPBERTH_TOKEN"

202 Accepted

{
    "data": {
        "status": "erasure_scheduled"
    }
}