Record a registration
- Path
/register- Auth
- Secret key · server only
const url = 'https://releva.ai/api/v0/register';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"id":"DEMO-CUST-1001","email":"maria@example.com","firstName":"Maria","lastName":"Example","tags":["registered-online"],"birthday":"1990-05-17"}'};
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/register \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "id": "DEMO-CUST-1001", "email": "maria@example.com", "firstName": "Maria", "lastName": "Example", "tags": [ "registered-online" ], "birthday": "1990-05-17" }'Call when a customer completes sign-up. Creates or updates the profile and sets registeredAt to the
current time (every call re-stamps it). tags replaces the profile’s tags. Consent is not changed.
Unknown fields are ignored.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”At least one of id, email or phoneNumber is required. Unknown fields are ignored.
object
International form (+359888000101) or national form (0888000101). National numbers and values with
spaces or dashes (5-15 characters) are converted to +<digits> with the dialling code of the domain’s country
before validation. The result must match ^\+\d{1,31}$.
Replaces the profile’s tags.
YYYY-MM-DD only.
Example
{ "id": "DEMO-CUST-1001", "email": "maria@example.com", "firstName": "Maria", "lastName": "Example", "tags": [ "registered-online" ], "birthday": "1990-05-17"}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": "At least one of (id", "email": null, "phoneNumber) is required!": null}{ "message": "The 'email' field must be a valid e-mail."}{ "message": "The 'tags' field must be an array."}{ "message": "phoneNumber must be a valid telephone number starting with + and international code, e.g. +1. Got abc instead."}{ "message": "Authorization header is missing."}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."}