Skip to main content

Report an Embedded Signup Session Event

POST/v1/onboarding/es-events

Report one Embedded Signup session event (which screen the customer abandoned on, or a customer self-reported error). Always 202.

Authentication

Send Authorization: Bearer <API_KEY> in the request headers, with scope onboarding:write. Which resources an API Key can reach is determined by its current authorization scope.

Request​

Base URL: https://api.bluehola.com

Request body​

A request body is required.

Request body fields​

FieldTypeRequiredDescription
portfolioIdstringNoThe Business Portfolio this run is for, bm_... Use exactly one of this and customerEntityId
customerEntityIdstringNoCustomer entity ID, cust_... when onboarding was started for a customer; before authorization there is no Portfolio yet. Use exactly one of this and portfolioId
eventstringYesThe event value from the ES message event: FINISH* / CANCEL / ERROR
esVersionv2 | v3 | v4NoThe ES version used when starting
currentStepstringNoThe screen the customer was on when they abandoned, e.g. PHONE_NUMBER_SETUP
errorCodestringNoThe error code Meta gave when the customer self-reported an error during the flow
errorMessagestringNoThe corresponding error text shown to the customer
metaSessionIdstringNoMeta's session_id — required when contacting Meta support
timestampintegerNoThe unix seconds Meta supplied (only present for error events)

Content-Type: application/json Example:

{
"customerEntityId": "cust_x",
"event": "CANCEL",
"currentStep": "PHONE_NUMBER_SETUP",
"esVersion": "v4"
}

Schema:

{
"type": "object",
"properties": {
"portfolioId": {
"type": "string",
"description": "string · optional — the Business Portfolio this run is for, bm_... Use exactly one of this and customerEntityId"
},
"customerEntityId": {
"type": "string",
"description": "string · optional — customer entity ID, cust_... when onboarding was started for a customer; before authorization there is no Portfolio yet. Use exactly one of this and portfolioId"
},
"event": {
"type": "string",
"description": "string · required — the event value from the ES message event: FINISH* / CANCEL / ERROR"
},
"esVersion": {
"type": "string",
"description": "v2 | v3 | v4 · optional — the ES version used when starting"
},
"currentStep": {
"type": "string",
"description": "string · optional — the screen the customer was on when they abandoned, e.g. PHONE_NUMBER_SETUP"
},
"errorCode": {
"type": "string",
"description": "string · optional — the error code Meta gave when the customer self-reported an error during the flow"
},
"errorMessage": {
"type": "string",
"description": "string · optional — the corresponding error text shown to the customer"
},
"metaSessionId": {
"type": "string",
"description": "string · optional — Meta's session_id — required when contacting Meta support"
},
"timestamp": {
"type": "string",
"description": "integer · optional — the unix seconds Meta supplied (only present for error events)"
}
},
"required": [
"event"
],
"example": {
"customerEntityId": "cust_x",
"event": "CANCEL",
"currentStep": "PHONE_NUMBER_SETUP",
"esVersion": "v4"
}
}

Response​

StatusDescription
202Accepted
4xxClient error

For the common error envelope and how to handle it, see Error Codes.

Notes​

Why this endpoint exists​

Embedded Signup's session info logging (on by default from ES v3) appears only in a single browser message event — it cannot be queried from the Graph API afterwards. Two things are gone for good if this is lost: which screen the customer abandoned on (the only funnel data for onboarding), and the session_id from a customer self-reported error (the credential needed for Meta support).

This is diagnostic data, not a business write​

It always returns 202, does not validate business semantics, and a persistence failure is only logged. The front end should fire-and-forget: a failed report here must never surface as an error on the customer's screen. The request body is .strict(), so extra fields cause a 400 — in particular, never pass code in here, since that is a 30-second credential that does not belong in this table.