Server-to-server attribution events

This page describes the server-to-server API for submitting attribution events.

circle-info

Use this API to report attribution events from a trusted backend service. This gives you a secure way to submit events such as purchases, where the mobile app should not be treated as the source of truth.

Attribution events can be sent in batches to:

POST https://onside.io/attribution-api/v1/events

Use Basic authentication. Contact your Onside account contact to get credentials.

Example request:

curl -X POST \
  -H 'Content-Type: application/json' \
  -u <basic auth> \
  --data '{
    "events": [
      {
        "event_name": "purchase_completed",
        "payload": {
          "currency": "USD",
          "amount": "9.99"
        },
        "event_datetime": "2026-05-05T12:00:00Z",
        "event_id": "550e8400-e29b-41d4-a716-446655440000",
        "installation_id": "550e8400-e29b-41d4-a716-446655440000"
      }
    ]
  }' \
  https://onside.io/attribution-api/v1/events

Request body

Example payload:

events is an array of attribution events. It can contain up to 1,000 items.

Each event includes:

  • event_name — The event name. Case-insensitive. Required

  • payload — A JSON object with event properties. Required

  • event_datetime — The time the event occurred on your server, in ISO 8601 format. Required

  • event_id — A unique UUIDv4 used for idempotency. Required

  • installation_id — The installation identifier returned by the Onside SDK in your app. Required

Limits

  • Send up to 1,000 events per request.

  • Keep the total request payload under 1 MB.

HTTP response codes

The endpoint can return the following HTTP status codes:

  • 204 No Content — The system accepted and queued the batch for processing.

  • 400 Bad Request — A validation error occurred. This includes malformed JSON and invalid UUIDs.

  • 413 Payload Too Large — The payload exceeds 1 MB or the batch contains more than 1,000 events.

  • 429 Too Many Requests — You have sent too many requests. Wait before you try again.

Last updated

Was this helpful?