PlatformSolutionsPricingAboutGet Early Access →

Brigada API

v1.0.0

Server-to-server event ingestion API for Brigada MMP. Send conversion and behavioural events from your backend to Brigada for attribution and CAPI forwarding.

Servers

EnvironmentBase URL
Productionhttps://api.brigada.onestepsocial.com/v1
Staginghttps://api.brigada-staging.onestepsocial.com/v1

Authentication

Choose one of two auth options on every request:

Supabase JWT — for dashboard integrations

Authorization: Bearer <supabase_jwt> — the JWT must contain app_metadata.merchant_id.

API key — for programmatic server-to-server access

x-api-key: <key> combined with x-merchant-id: <merchant_id>. The API key is issued from the OneStepSocial dashboard.

Endpoints

POST/events

Ingest an event

Accepts a single server-side event. Validated, deduplicated, enriched, and forwarded to Meta CAPI and Google Ads API asynchronously via SQS.

Request body — Event (required)

FieldTypeRequiredDescription
event_idstring (1–128 chars)yesUnique ID for this event. Used for deduplication.
merchant_idstring (3–64 chars)yesYour merchant identifier. Must match authenticated identity.
timestampstring (date-time)yesISO 8601 UTC timestamp of when the event occurred.
event_typeenumyesOne of the Event Types listed below.
user_identityobjectyesAt least one of hashed_email, external_user_id, or device_id.
event_dataobjectValue, currency, user status, package tier, product category, metadata.
sourceobjectPlatform and originating IP address.
attributionobjectMedia source, campaign, ad set/creative, click IDs, UTMs, deep-link resolution.
session_idstring (1–128 chars)Connects multiple events from the same user visit.
deviceobjectDevice type, OS, browser, model, IDFA/GAID, install referrer.
locationobjectCountry (ISO 3166-1 alpha-2), city, region.
api_versionenum ['1.0']API version this payload was built against.

user_identity — at least one of hashed_email, external_user_id, or device_id is required:

FieldTypeRequiredDescription
hashed_emailstring (pattern: ^[a-f0-9]{64}$)SHA-256 hex digest of the lowercased, trimmed email address.
transaction_idstring (≤128 chars)
external_user_idstring (≤256 chars)
device_idstring (8–128 chars)Stable per-install device identifier, generated and persisted by the Scout SDK before any email/signup identity is known.

event_data:

FieldTypeRequiredDescription
valuenumber (≥0)
currencyenum: USD, EUR, GBP, CAD, AUD, INR, JPY, MXN
user_statusenum: NEW, RETURNING, DORMANT, AT_RISK
package_tierenum: FREE, BASIC, PREMIUM, ENTERPRISE, CUSTOM
product_categorystring (≤64 chars)
metadataobject (string/number/boolean values, ≤20 keys)

source:

FieldTypeRequiredDescription
platformenum: WEB, MOBILE_IOS, MOBILE_ANDROID, API, BACKEND, WEBHOOK
ip_addressstring (≤45 chars)

attribution — all fields optional; pass what you have, even media_source alone unlocks paid vs. organic splits in the dashboard:

FieldTypeRequiredDescription
media_sourcestring (≤128 chars)Ad network or traffic source (e.g. "facebook", "google", "tiktok", "organic").
campaignstring (≤256 chars)Campaign name or ID from your ad platform.
ad_setstring (≤256 chars)Ad set or ad group name.
ad_creativestring (≤256 chars)Ad creative name or ID.
click_idstring (≤512 chars)Platform click ID (fbclid, gclid, ttclid, etc.) for CAPI matching.
utm_sourcestring (≤256 chars)
utm_mediumstring (≤256 chars)
utm_campaignstring (≤256 chars)
deep_link_resolutionobjectPopulated by the Scout SDK when resolving a deferred deep link on install. Requires method (universal_link | none); optional link_id, matched_at.

device:

FieldTypeRequiredDescription
typeenum: DESKTOP, MOBILE, TABLET, OTHER
osstring (≤64 chars)e.g. "iOS 17", "Android 14".
browserstring (≤64 chars)e.g. "Safari", "Chrome".
modelstring (≤128 chars)e.g. "iPhone 15 Pro".
idfastring (≤64 chars)iOS advertising identifier. Only present when ATT consent was granted.
gaidstring (≤64 chars)Android advertising identifier. Only present when consent was granted and the OS did not nullify it.
install_referrerobjectPopulated by the Scout SDK from Android's Install Referrer API. Fields: raw, click_timestamp, install_timestamp, source (google_play).

location — prefer deriving from your server's request IP rather than client-reported values:

FieldTypeRequiredDescription
countrystring (2 chars)ISO 3166-1 alpha-2 country code (e.g. "US", "GB", "DE").
citystring (≤128 chars)
regionstring (≤128 chars)State or region name.

Example — transaction completed (with attribution)

{
  "event_id": "evt-a1b2c3d4",
  "merchant_id": "acme-corp",
  "timestamp": "2026-05-24T14:00:00Z",
  "event_type": "TRANSACTION_COMPLETED",
  "user_identity": {
    "hashed_email": "a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4"
  },
  "event_data": {
    "value": 99,
    "currency": "USD"
  },
  "attribution": {
    "media_source": "facebook",
    "campaign": "summer_sale_2026",
    "ad_set": "retargeting_us",
    "utm_source": "facebook",
    "utm_medium": "cpc"
  },
  "session_id": "sess-abc123xyz",
  "device": {
    "type": "MOBILE",
    "os": "iOS 17",
    "browser": "Safari"
  },
  "location": {
    "country": "US",
    "city": "New York"
  },
  "source": {
    "platform": "BACKEND"
  },
  "api_version": "1.0"
}

Example — minimal event (no attribution)

{
  "event_id": "evt-b2c3d4e5",
  "merchant_id": "acme-corp",
  "timestamp": "2026-05-24T14:00:00Z",
  "event_type": "USER_SIGNUP",
  "user_identity": {
    "hashed_email": "a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4c5d6e7f8a3b4"
  },
  "source": {
    "platform": "BACKEND"
  },
  "api_version": "1.0"
}

Responses

StatusDescription
202Event accepted and queued for processing. Body: { "status": "accepted" }.
400Invalid request body or schema validation failure. Body: Error.
401Missing or invalid authentication. Body: Error.
403merchant_id in body does not match authenticated identity. Body: Error.

Example 202 response body:

{
  "status": "accepted"
}

Example error response body (400/401/403):

{
  "error": "validation_failed",
  "errors": [
    "event_type is required",
    "user_identity must include one of hashed_email, external_user_id, device_id"
  ]
}

Event Types

event_type must be one of the following values:

TRANSACTION_COMPLETEDTRANSACTION_INITIATEDUSER_LOGINUSER_SIGNUPPRICING_PAGE_VIEWEDFEATURE_COMPARISON_VIEWEDDATA_CONNECT_SUCCESSPAYMENT_METHOD_ADDEDSUBSCRIPTION_TIER_UPGRADESUBSCRIPTION_TIER_DOWNGRADESUPPORT_TICKET_OPENEDMOBILE_INSTALLCUSTOM_EVENT

Error schema

FieldTypeRequiredDescription
errorstring
errorsarray of strings