Create Client Event
POST {{baseUrl}}/client/events/?company_id={{companyId}}
Create a new event to track a profile's activity.
This endpoint is specifically designed to be called from publicly-browseable, client-side environments only. To create events from server-based applications, please use POST /api/events
Note that to update a profile's existing identifiers (e.g., email), you must use a server-side endpoint authenticated by a private API key. Attempts to do so via client-side endpoints will return a 202, however the identifier field(s) will not be updated.
Rate limits:
Burst: 350/s
Steady: 3500/m
Scopes:
events:write
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
company_id | string | (Required) Your Public API Key / Site ID. See this article for more details. |
Request Body
{"data"=>{"type"=>"event", "attributes"=>{"metric"=>{"data"=>{"type"=>"metric", "attributes"=>{"name"=>"<string>", "service"=>"<string>"}}}, "profile"=>{"data"=>{"type"=>"profile", "attributes"=>{"phone_number"=>"<string>", "external_id"=>"<string>", "anonymous_id"=>"<string>", "_kx"=>"<string>", "first_name"=>"<string>", "last_name"=>"<string>", "organization"=>"<string>", "title"=>"<string>", "image"=>"<string>", "location"=>{"address1"=>"<string>", "address2"=>"<string>", "city"=>"<string>", "country"=>"<string>", "latitude"=>"<string>", "longitude"=>"<string>", "region"=>"<string>", "zip"=>"<string>", "timezone"=>"<string>", "ip"=>"<string>"}, "meta"=>{"patch_properties"=>{"unset"=>"<string>"}}, "email"=>"<string>"}, "id"=>"<string>"}}, "time"=>"<dateTime>", "value"=>"<number>", "value_currency"=>"<string>", "unique_id"=>"<string>"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
revision | string | (Required) API endpoint revision (format: YYYY-MM-DD[.suffix]) | |
Content-Type | string | ||
Accept | string |