Preview segment
https://whatsapp.paaltech.org/api/v1/businesses/{external_id}/segments/preview
Token ability:
contacts.read
ยท Authentication
How many contacts match conditions (saved or not), with five of them.
Path parameters
external_id
string
required
Your own ID for the business (Multi-SKUUL - the tenant ID).
Max 191 characters. Pattern ^[A-Za-z0-9._:-]+$.
Body parameters
conditions
object
required
{"all": [...]} or {"any": [...]} of conditions {"field", "op", "value"} or nested groups (3 levels, 30 conditions). Fields: name, phone, email, locale, timezone, external_id, created_at, tag (has, not_has), consent.<category> (eq granted|revoked|none), last_incoming_at (within_days, older_than_days), custom.<key> (by the field's type). Ops: eq, neq, gt, gte, lt, lte, contains, starts_with, in, exists, not_exists, within_days, older_than_days.
Example {"all":[{"field":"custom.class","op":"eq","value":"SHS 2"},{"field":"custom.fee_balance","op":"gt","value":0}]}.
Responses
The count and a sample.
unauthenticated - missing, invalid, revoked or expired token
missing_ability, product_suspended or product_token_required
not_found - not yours, or does not exist
validation_failed - fields are invalid; see errors.
rate_limited - over 300 requests/minute for this product
Errors always look like {"error": {"code", "message"}} - see Errors and status codes.