Customer API

Public Marketing Signup

Record email or SMS opt-ins from a website without a customer login.

POST https://edge.tiquo.app/api/client/v1/marketing/subscribe

This endpoint needs an enabled Website SDK integration, its public key, and an allowed browser Origin. It does not require a bearer token, email code, or completed customer profile.

Request

Supply the public key as X-Public-Key or publicKey in the JSON body. A browser supplies its own Origin header; add the website to the integration's allowed domains in Tiquo.

curl 'https://edge.tiquo.app/api/client/v1/marketing/subscribe'   -H 'Content-Type: application/json'   -H 'Origin: https://www.example.com'   -H 'X-Public-Key: YOUR_PUBLIC_KEY'   -d '{"email":"alex@example.com","emailOptIn":true}'
FieldRequirement
emailRequired email address, up to 254 characters
emailOptInOptional boolean for email consent
smsOptInOptional boolean for messaging consent
firstName, lastNameOptional, up to 100 characters each; used for new profiles
phoneOptional, up to 64 characters; E.164 or national format with phoneCountry; used for new profiles
phoneCountryOptional two-letter ISO country code
honeypotOptional hidden field, up to 500 characters; real visitors leave it empty
publicKeyUp to 256 characters when supplied in the body

Only an explicit true applies an opt-in. A false or omitted value does not unsubscribe an existing customer. SMS consent can be recorded without a phone, but message delivery still needs an eligible destination.

An existing customer's other details remain unchanged. A new signup can create a customer profile, but it creates no enquiry and does not recreate a deleted profile.

Response and limits

An accepted request returns { "success": true } without customer data or a customer ID. The same generic response can be returned for screened spam without profile changes. Do not use it to confirm that an address exists or belongs to the visitor. The public key and Origin checks do not verify identity.

The body limit is 8 KiB. Per organisation, the ten-minute rate limits are 60 requests in total, 20 per IP, and five per normalised email or submitted phone. A 429 response includes Retry-After; wait before retrying.

StatusMeaning
400Invalid input or missing public key
403Invalid Origin, public key, or disabled integration
413Body exceeds 8 KiB
429Rate limit reached
500Signup temporarily unavailable

For editing an authenticated customer's existing preferences, use PATCH /profile. See DOM Package signup and Hosted Package signup for browser helpers and form examples.

En esta página