Skip to main content
POST
Create campaign engagement segment

Authorizations

Authorization
string
header
required

API key created in the organization settings.

Headers

Idempotency-Key
string

Unique key for the operation. Repeating the same key with the same body returns the original response instead of running it again.

Body

application/json
campaign_ids
string[]
required

WhatsApp Official campaign IDs (tcp_...), up to 50.

Required array length: 1 - 50 elements
Pattern: ^tcp_[A-Za-z0-9_-]+$
engagement
enum<string>
required

engaged: read the message or clicked one of its links. not_engaged: the message was delivered and they neither read nor clicked. received: the message was delivered.

Available options:
engaged,
not_engaged,
received
name
string
required

Segment name. If it is already taken, Bevits adds a number at the end.

Required string length: 1 - 200
purchases
enum<string>

Keeps customers with no (none) or at least one (any) completed purchase in the window. Requires purchases_from.

Available options:
none,
any
purchases_from
string<date-time>

Start of the purchase window (inclusive), in ISO 8601 with a timezone.

purchases_to
string<date-time>

End of the purchase window (exclusive), in ISO 8601 with a timezone. Without it, the window is open-ended.

only_site_base
boolean
default:true

If true (default), leaves out customers who belong only to physical units, as brand campaigns do.

description
string
Maximum string length: 1000
operation_id
string

Optional unique id for this call, such as a UUID. Reuse the same value only to retry the same call: the retry returns the first result instead of creating again. The same value with a different body is rejected with 409.

Required string length: 8 - 128

Response

Engagement segment created.

object
string
required
Allowed value: "campaign_engagement_segment"
segment
object
required
customers_added
integer
required
Required range: x >= 0
reachable_count
integer
required
Required range: x >= 0
breakdown
object
required
snapshot_at
string<date-time>
required
next_step
string
required