Send search events
- Path
/search- Auth
- Secret key · server only
const url = 'https://releva.ai/api/v0/search';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"events":[{"email":"maria@example.com","locale":"en","timestamp":"2026-10-21T09:30:00.000Z","products":[{"id":"DEMO-1001"},{"id":"DEMO-1002"}],"filter":{"operator":"and","nested":[{"key":"categories","operator":"eq","action":"include","value":"Summer"},{"key":"price","operator":"lte","action":"include","value":"50"},{"key":"custom.string.brand","operator":"eq","action":"boost","value":"Demo Basics","weight":2}]},"tags":["filter-panel"],"custom":{"string":[{"key":"sort","values":["price-asc"]}]}}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://releva.ai/api/v0/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "events": [ { "email": "maria@example.com", "locale": "en", "timestamp": "2026-10-21T09:30:00.000Z", "products": [ { "id": "DEMO-1001" }, { "id": "DEMO-1002" } ], "filter": { "operator": "and", "nested": [ { "key": "categories", "operator": "eq", "action": "include", "value": "Summer" }, { "key": "price", "operator": "lte", "action": "include", "value": "50" }, { "key": "custom.string.brand", "operator": "eq", "action": "boost", "value": "Demo Basics", "weight": 2 } ] }, "tags": [ "filter-panel" ], "custom": { "string": [ { "key": "sort", "values": [ "price-asc" ] } ] } } ] }'Records searches performed on your backend as search events on the profile with the given email
(created if missing). Only the first 10 products of each event are stored; they are enriched from the
catalog. The search text cannot be sent (there is no query field). Asynchronous.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
The only accepted identifier.
Results shown. Only the first 10 are stored.
object
object
object
Product field (price, categories) or custom.<string|numeric|date>.<key>.
Always a string
Orders several boost/bury conditions.
ISO-8601 date-time with seconds and a timezone offset (Z, +0300 or +03:00), optional milliseconds.
Custom attributes, usable in segments.
object
object
object
object
Example
{ "events": [ { "email": "maria@example.com", "locale": "en", "timestamp": "2026-10-21T09:30:00.000Z", "products": [ { "id": "DEMO-1001" }, { "id": "DEMO-1002" } ], "filter": { "operator": "and", "nested": [ { "key": "categories", "operator": "eq", "action": "include", "value": "Summer" }, { "key": "price", "operator": "lte", "action": "include", "value": "50" }, { "key": "custom.string.brand", "operator": "eq", "action": "boost", "value": "Demo Basics", "weight": 2 } ] }, "tags": [ "filter-panel" ], "custom": { "string": [ { "key": "sort", "values": [ "price-asc" ] } ] } } ]}Responses
Section titled “Responses”Accepted for asynchronous processing.
object
Example
{}Authentication or validation error.
object
Human-readable error. Several validation errors are joined with a space.
Examples
{ "message": "The 'events[0].email' field is required."}{ "message": "The object 'events[0]' contains forbidden keys: 'phoneNumber'."}{ "message": "The object 'events[0]' contains forbidden keys: 'query'."}{ "message": "The 'operator' field does not match any of the allowed values."}{ "message": "The 'nested' field must be an array."}{ "message": "The 'value' field must be a string."}The domain is disabled.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "Domain is disabled. Please reach out to support@releva.ai to enable it."}Request body larger than 800 KB.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "request entity too large"}Unexpected server error.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An internal error occurred."}