Skip to content

Track an event for a signed widget user ​

Browser requests must use an allowed widget Origin. Server-side SDK requests may omit Origin when they send the site public key as an Authorization Bearer token and a valid site-secret-signed X-User-Token header.

Request preparation ​

Send a POST request to /widget/track on the appropriate server. Check the API overview for base URL guidance and the server information in the interactive reference. Replace path placeholders with identifiers from the intended account or site; a similarly named record in another workspace is not interchangeable.

The declared request parameters are:

  • Authorization (header, required): Bearer site public key
  • X-User-Token (header, required): Customer JWT signed with the site secret

This operation defines a required request body. Documented media types: application/json. Review required fields, nested objects, and allowed values in the request schema. Keep identifiers and field types intact when replacing example data with your own values.

Authentication and scope ​

The specification lists these security alternatives: BearerAuth, AccessToken. Read any operation-specific restrictions as well: browser-session, account-role, and signed-user requirements may impose additional conditions. See authentication before choosing a credential.

Keep credentials in the appropriate private configuration and remove secrets from shared logs. Confirm the target resource belongs to the intended workflow before issuing a request. Authentication alone should not be treated as confirmation that a supplied account, site, or customer identifier is correct.

Response handling ​

The documented responses for Track an event for a signed widget user are:

  • 200: Tracked
  • 401: Site key or signed user token missing or invalid
  • 403: Browser origin missing or not allowed

Exercise this operation with controlled test data before enabling it in an automated workflow. Validate the request against the schema and inspect the response before updating local state. Do not assume that a successful response means background processing has finished; follow any documented status or follow-up operation when the action queues additional work.

If a connection fails after submission, investigate the current server state before repeating an action whose outcome is uncertain. When requesting support, retain the method, route, response status, and sanitized error message. The interactive reference below provides the detailed schemas and examples for this specific operation.

Track an event for a signed widget user​

POST
/widget/track

Browser requests must use an allowed widget Origin. Server-side SDK requests may omit Origin when they send the site public key as an Authorization Bearer token and a valid site-secret-signed X-User-Token header.

Authorizations​

BearerAuth

JWT token from login

Type
HTTP (bearer)
or
AccessToken

Personal access token. Value: Token <your-token>

Type
API Key (header: Authorization)

Parameters​

Header Parameters

Authorization*

Bearer site public key

Type
string
Required
X-User-Token*

Customer JWT signed with the site secret

Type
string
Required

Request Body​

application/json
JSON
{
  
"event": "string",
  
"page": "string",
  
"metadata": {
  
},
  
"app_instance": "string",
  
"app_version": "string",
  
"app_location": "string",
  
"plan": "string"
}

Responses​

Tracked

application/json
JSON
{
  
"survey": "string"
}

Playground​

Authorization
Headers
Body

Samples​

Powered by VitePress OpenAPI