Record a webhook open or click (token in the path)
- Path
/webhooks/events/{accessToken}- Auth
- Access token · in the URL path
const url = 'https://releva.ai/api/v0/webhooks/events/YOUR_ACCESS_TOKEN?userId=example&webhookId=example&source=webhook&campaignId=example&segmentId=example&segmentRunId=example&status=Open';const options = {method: 'GET'};
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/YOUR_ACCESS_TOKEN?userId=example&webhookId=example&source=webhook&campaignId=example&segmentId=example&segmentRunId=example&status=Open'Same as GET /webhooks/events, with the access token as the last path segment instead of the authorization
header. This is the form used by the webhookOpen and webhookClick URLs in webhook payloads. If an
authorization header is also sent, the header is used.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The shop’s public access token (UUID). Not the secret key.
Example
YOUR_ACCESS_TOKENQuery 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."}