Record a webhook open or click
- Path
/webhooks/events- Auth
- Access token · browser or app
const url = 'https://releva.ai/api/v0/webhooks/events?userId=example&webhookId=example&source=webhook&campaignId=example&segmentId=example&segmentRunId=example&status=Open';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://releva.ai/api/v0/webhooks/events?userId=example&webhookId=example&source=webhook&campaignId=example&segmentId=example&segmentRunId=example&status=Open' \ --header 'Authorization: Bearer <token>'Records that a profile opened or clicked what your system sent after receiving a Releva webhook. Each profile in
a webhook payload carries ready-made webhookOpen and webhookClick URLs that call this endpoint with the access
token in the path; call them as they are rather than building the URL yourself.
Writes a webhookOpen or webhookClick event and attributes the profile to the workflow and step, so later
purchases count as assisted. Processing is asynchronous and every call writes another event (no deduplication).
A status other than Open or Click, or a campaignId that is not a numeric workflow id, is accepted with
202 but nothing is recorded. Works even when the shop is disabled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”Your customer id for the profile (the part after profile/<domainId>/ in profileId).
Id of the webhook. Not checked to exist.
Numeric id of the workflow. An empty or non-numeric value is accepted with 202 but nothing is recorded.
Id of the workflow’s segment. May be empty.
The workflow execution (source.segmentRunId of the payload). May be empty.
The workflow step (source.flowStepId of the payload). Used for step attribution.
Open records webhookOpen, Click records webhookClick. Case-sensitive; any other value is accepted and ignored.
Validated when not empty, otherwise ignored.
Responses
Section titled “Responses”Accepted for asynchronous processing. Empty body.
Authentication or validation error. Several validation messages are joined with a space.
object
Human-readable error. Several validation errors are joined with a space.
Examples
{ "message": "The 'userId' field is required. The 'source' field is required. The 'campaignId' field is required. The 'segmentId' field is required. The 'segmentRunId' field is required. The 'status' field is required. The 'webhookId' field is required."}{ "message": "The 'source' field value 'webhook' does not match any of the allowed values."}{ "message": "The 'email' field must be a valid e-mail."}{ "message": "The 'userId' field must be a string."}{ "message": "Authorization header is missing, and accessToken url parameters is also missing. At least one of them is required."}{ "message": "Authorization header is malformed. It should look like `Bearer <string>`."}{ "message": "The access token you provided is invalid."}{ "message": "Domain with the provided access token cannot be found."}{ "message": "We do not support non-HTTPS requests."}Unexpected server error.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An internal error occurred."}