openapi: 3.1.0 info: title: Boom CDP Custom Objects Segments API version: 1.0.0 description: 'Boom''s public REST API — one uniform surface over every platform capability. CDP: upsert people and custom objects, define object and relationship types, link and unlink relationships, and record behavioral events — one record per request or up to 1000 per request via the `/batch` endpoints. Segments: read (list, read, membership) and full authoring — discover the filterable catalog, validate a filter, create and update segments, preview match counts, and trigger evaluation. Initiatives: create and configure outreach initiatives, link WhatsApp templates, drive the lifecycle (launch, cancel, archive), and read collected-data summaries. Participants: enroll people into an active initiative, track their status, read conversation transcripts, and stop outreach. Journeys: read-only access to always-on message flows and their metrics. WhatsApp templates: list your WhatsApp numbers and list, read, and create message templates. The same capabilities are exposed as MCP tools with identical schemas.' servers: - url: https://www.useboom.ai description: Production - url: https://dev.useboom.ai description: Development (sandbox — use a development organization API key) security: - bearerAuth: [] tags: - name: Segments paths: /api/v1/segments: get: operationId: segments_list summary: List segments description: List the organization's active segments, newest first. Archived segments are excluded. tags: - Segments parameters: - name: limit in: query required: false schema: $schema: https://json-schema.org/draft/2020-12/schema default: 100 description: Max items to return, 1-1000 (default 100). type: integer minimum: 1 maximum: 1000 - name: cursor in: query required: false schema: $schema: https://json-schema.org/draft/2020-12/schema description: Opaque pagination token from a previous response's `next_cursor`. Omit for the first page. type: string responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: data: type: array items: type: object properties: slug: type: string description: Unique identifier within your organization. name: type: string description: anyOf: - type: string - type: 'null' evaluationCadence: type: string enum: - REACTIVE_ONLY - HOURLY - DAILY description: How often the segment is re-evaluated. REACTIVE_ONLY segments only change when evaluated explicitly. memberCount: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Live count of currently active members. lastEvaluatedAt: anyOf: - type: string - type: 'null' description: ISO 8601 timestamp; null if the segment has never evaluated. createdAt: type: string description: ISO 8601 timestamp. required: - slug - name - description - evaluationCadence - memberCount - lastEvaluatedAt - createdAt additionalProperties: false next_cursor: anyOf: - type: string - type: 'null' description: Opaque cursor for the next page; null on the last page. required: - data - next_cursor additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error post: operationId: segments_create summary: Create a segment description: Create a segment from a filter expression. It starts empty until evaluated. Validate and preview the filter first. tags: - Segments requestBody: required: true content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: name: type: string minLength: 1 maxLength: 120 description: Display name. slug: type: string minLength: 1 maxLength: 64 pattern: ^[a-z0-9]+(-[a-z0-9]+)*$ description: Permanent identifier, lowercase-kebab-case, unique in your organization. Cannot be changed after creation. description: anyOf: - type: string maxLength: 1024 - type: 'null' filterExpression: description: 'The audience filter: a tree of predicates over person attributes, related data, and events. Discover valid `attr` tokens and operators with segments_catalog (GET /api/v1/segments/catalog).' type: object properties: kind: type: string const: person op: type: string enum: - AND - OR predicates: type: array items: oneOf: - type: object properties: kind: type: string const: has_relationship connector: type: string enum: - AND - OR customObjectType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op path: minItems: 1 maxItems: 3 type: array items: type: object properties: customObjectType: type: string minLength: 1 direction: type: string enum: - parent_to_child - child_to_parent relationshipType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - customObjectType - attributeFilters required: - kind - customObjectType - attributeFilters - type: object properties: kind: type: string const: person_attribute connector: type: string enum: - AND - OR attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - kind - attr - type - op - type: object properties: kind: type: string const: person_group connector: type: string enum: - AND - OR filters: minItems: 1 type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - kind - filters - type: object properties: kind: type: string const: event connector: type: string enum: - AND - OR eventName: type: string minLength: 1 occurred: type: boolean propertyFilters: minItems: 1 type: array items: type: object properties: key: type: string minLength: 1 path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - key - type - op window: type: object properties: op: type: string enum: - in_last_n - more_than_n_ago - between - before - after - 'on' value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - op required: - kind - eventName - occurred required: - kind - op - predicates evaluationCadence: default: REACTIVE_ONLY description: How often the segment re-evaluates. Defaults to REACTIVE_ONLY — evaluate on demand with segments_evaluate. type: string enum: - REACTIVE_ONLY - HOURLY - DAILY dailyEvaluationHour: description: 'For DAILY cadence: the hour (0-23, in your organization timezone) the segment evaluates.' anyOf: - type: integer minimum: 0 maximum: 23 - type: 'null' skipWeekendEvaluation: description: When true, the segment is not evaluated on weekends. type: boolean outputColumns: description: Optional extra columns to project for each member when the segment feeds downstream automations. type: object properties: person: type: object properties: columns: maxItems: 7 type: array items: type: string enum: - firstName - lastName - email - phoneNumber - externalId - status - createdAt attributes: maxItems: 64 type: array items: type: string minLength: 1 maxLength: 120 additionalProperties: false customObjects: maxItems: 16 type: array items: type: object properties: typeName: type: string minLength: 1 maxLength: 120 attributes: minItems: 1 maxItems: 64 type: array items: type: string minLength: 1 maxLength: 120 required: - typeName - attributes additionalProperties: false computed: maxItems: 32 type: array items: type: string minLength: 1 maxLength: 120 additionalProperties: false required: - name - slug - filterExpression responses: '201': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: slug: type: string description: Unique identifier within your organization. name: type: string description: anyOf: - type: string - type: 'null' evaluationCadence: type: string enum: - REACTIVE_ONLY - HOURLY - DAILY description: How often the segment is re-evaluated. REACTIVE_ONLY segments only change when evaluated explicitly. memberCount: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Live count of currently active members. lastEvaluatedAt: anyOf: - type: string - type: 'null' description: ISO 8601 timestamp; null if the segment has never evaluated. createdAt: type: string description: ISO 8601 timestamp. required: - slug - name - description - evaluationCadence - memberCount - lastEvaluatedAt - createdAt additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/{slug}: delete: operationId: segments_delete summary: Delete a segment description: Remove a segment. It disappears from all lists and its journey triggers are disconnected. Idempotent. tags: - Segments parameters: - name: slug in: path required: true schema: $schema: https://json-schema.org/draft/2020-12/schema type: string minLength: 1 description: The segment slug, as returned by segments_list. responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: removed: type: boolean description: True when this call removed the segment; false when it was already gone. required: - removed additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error get: operationId: segments_get summary: Get a segment description: Get one segment by slug, with a live member count. tags: - Segments parameters: - name: slug in: path required: true schema: $schema: https://json-schema.org/draft/2020-12/schema type: string minLength: 1 description: The segment slug, as returned by segments_list. responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: slug: type: string description: Unique identifier within your organization. name: type: string description: anyOf: - type: string - type: 'null' evaluationCadence: type: string enum: - REACTIVE_ONLY - HOURLY - DAILY description: How often the segment is re-evaluated. REACTIVE_ONLY segments only change when evaluated explicitly. memberCount: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Live count of currently active members. lastEvaluatedAt: anyOf: - type: string - type: 'null' description: ISO 8601 timestamp; null if the segment has never evaluated. createdAt: type: string description: ISO 8601 timestamp. required: - slug - name - description - evaluationCadence - memberCount - lastEvaluatedAt - createdAt additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error patch: operationId: segments_update summary: Update a segment description: Update a segment in place; the slug is permanent. Changing the filter doesn't re-evaluate membership until the next evaluation. tags: - Segments requestBody: required: true content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: name: description: Display name. type: string minLength: 1 maxLength: 120 description: anyOf: - type: string maxLength: 1024 - type: 'null' filterExpression: description: 'The audience filter: a tree of predicates over person attributes, related data, and events. Discover valid `attr` tokens and operators with segments_catalog (GET /api/v1/segments/catalog).' type: object properties: kind: type: string const: person op: type: string enum: - AND - OR predicates: type: array items: oneOf: - type: object properties: kind: type: string const: has_relationship connector: type: string enum: - AND - OR customObjectType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op path: minItems: 1 maxItems: 3 type: array items: type: object properties: customObjectType: type: string minLength: 1 direction: type: string enum: - parent_to_child - child_to_parent relationshipType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - customObjectType - attributeFilters required: - kind - customObjectType - attributeFilters - type: object properties: kind: type: string const: person_attribute connector: type: string enum: - AND - OR attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - kind - attr - type - op - type: object properties: kind: type: string const: person_group connector: type: string enum: - AND - OR filters: minItems: 1 type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - kind - filters - type: object properties: kind: type: string const: event connector: type: string enum: - AND - OR eventName: type: string minLength: 1 occurred: type: boolean propertyFilters: minItems: 1 type: array items: type: object properties: key: type: string minLength: 1 path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - key - type - op window: type: object properties: op: type: string enum: - in_last_n - more_than_n_ago - between - before - after - 'on' value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - op required: - kind - eventName - occurred required: - kind - op - predicates evaluationCadence: description: How often the segment re-evaluates. type: string enum: - REACTIVE_ONLY - HOURLY - DAILY dailyEvaluationHour: description: 'For DAILY cadence: the hour (0-23, in your organization timezone) the segment evaluates. Set null to clear.' anyOf: - type: integer minimum: 0 maximum: 23 - type: 'null' skipWeekendEvaluation: description: When true, the segment is not evaluated on weekends. type: boolean outputColumns: description: Optional extra columns to project for each member when the segment feeds downstream automations. type: object properties: person: type: object properties: columns: maxItems: 7 type: array items: type: string enum: - firstName - lastName - email - phoneNumber - externalId - status - createdAt attributes: maxItems: 64 type: array items: type: string minLength: 1 maxLength: 120 additionalProperties: false customObjects: maxItems: 16 type: array items: type: object properties: typeName: type: string minLength: 1 maxLength: 120 attributes: minItems: 1 maxItems: 64 type: array items: type: string minLength: 1 maxLength: 120 required: - typeName - attributes additionalProperties: false computed: maxItems: 32 type: array items: type: string minLength: 1 maxLength: 120 additionalProperties: false parameters: - name: slug in: path required: true schema: $schema: https://json-schema.org/draft/2020-12/schema type: string minLength: 1 description: The segment slug, as returned by segments_list. responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: slug: type: string description: Unique identifier within your organization. name: type: string description: anyOf: - type: string - type: 'null' evaluationCadence: type: string enum: - REACTIVE_ONLY - HOURLY - DAILY description: How often the segment is re-evaluated. REACTIVE_ONLY segments only change when evaluated explicitly. memberCount: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Live count of currently active members. lastEvaluatedAt: anyOf: - type: string - type: 'null' description: ISO 8601 timestamp; null if the segment has never evaluated. createdAt: type: string description: ISO 8601 timestamp. required: - slug - name - description - evaluationCadence - memberCount - lastEvaluatedAt - createdAt additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/{slug}/evaluate: post: operationId: segments_evaluate summary: Evaluate a segment now description: Re-evaluate a segment's membership now instead of waiting for its cadence. Runs synchronously; can take a while for large organizations. tags: - Segments parameters: - name: slug in: path required: true schema: $schema: https://json-schema.org/draft/2020-12/schema type: string minLength: 1 description: The segment slug, as returned by segments_list. responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: entrants: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: People added to the segment by this evaluation. leavers: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: People removed from the segment by this evaluation. total: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: Total active members after this evaluation. required: - entrants - leavers - total additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/{slug}/members: get: operationId: segments_members_list summary: List segment members description: List a segment's active members, newest first. tags: - Segments parameters: - name: slug in: path required: true schema: $schema: https://json-schema.org/draft/2020-12/schema type: string minLength: 1 description: The segment slug, as returned by segments_list. - name: limit in: query required: false schema: $schema: https://json-schema.org/draft/2020-12/schema default: 100 description: Max items to return, 1-1000 (default 100). type: integer minimum: 1 maximum: 1000 - name: cursor in: query required: false schema: $schema: https://json-schema.org/draft/2020-12/schema description: Opaque pagination token from a previous response's `next_cursor`. Omit for the first page. type: string responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: data: type: array items: type: object properties: name: type: string description: First and last name joined; empty string if unknown. phoneNumber: type: string description: E.164 phone number; empty string if none. externalId: type: string description: Your unique identifier for the person. email: type: string description: Empty string if none. enteredAt: type: string description: ISO 8601 timestamp of when the person entered the segment. required: - name - phoneNumber - externalId - email - enteredAt additionalProperties: false next_cursor: anyOf: - type: string - type: 'null' description: Opaque cursor for the next page; null on the last page. required: - data - next_cursor additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/catalog: get: operationId: segments_catalog summary: Get the segment filter catalog description: Everything filterable in your organization — person attributes, related data, and computed variables — with the token and operators to use for each. Read this first when building a filter. tags: - Segments responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: personAttributes: type: array items: type: object properties: attr: type: string description: The exact token to place in a predicate's `attr` field. type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY operators: type: array items: type: string description: Operators valid for this type. Empty for JSON/ARRAY containers — drill into a leaf with `path` first. description: anyOf: - type: string - type: 'null' required: - attr - type - operators - description additionalProperties: false description: Person columns and custom person attributes. computedVariables: type: array items: type: object properties: attr: type: string description: The exact token to place in a predicate's `attr` field. type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY operators: type: array items: type: string description: Operators valid for this type. Empty for JSON/ARRAY containers — drill into a leaf with `path` first. description: anyOf: - type: string - type: 'null' label: type: string description: Human-readable label. group: anyOf: - type: string - type: 'null' description: Grouping label for display. required: - attr - type - operators - description - label - group additionalProperties: false customObjectTypes: type: array items: type: object properties: name: type: string displayName: anyOf: - type: string - type: 'null' attributes: type: array items: type: object properties: attr: type: string description: The exact token to place in a predicate's `attr` field. type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY operators: type: array items: type: string description: Operators valid for this type. Empty for JSON/ARRAY containers — drill into a leaf with `path` first. description: anyOf: - type: string - type: 'null' required: - attr - type - operators - description additionalProperties: false required: - name - displayName - attributes additionalProperties: false reachableObjects: type: array items: type: object properties: typeName: type: string paths: type: array items: type: array items: type: object properties: customObjectType: type: string direction: type: string enum: - parent_to_child - child_to_parent relationshipType: type: string attributeFilters: type: array items: {} description: Conditions on this hop, in the same shape as a `has_relationship` `attributeFilters` entry. required: - customObjectType - attributeFilters additionalProperties: false required: - typeName - paths additionalProperties: false description: A related-data type reachable from a person, with every distinct hop-path to it. Use one of the paths as a `has_relationship` predicate `path`. operatorReference: type: array items: type: object properties: operator: type: string takesValue: type: boolean description: Whether the operator expects a `value`. valueShape: type: string enum: - none - scalar - list - date - dateRange - relativeWindow - dateOffset description: The shape the operator's `value` must take. description: type: string required: - operator - takesValue - valueShape - description additionalProperties: false required: - personAttributes - computedVariables - customObjectTypes - reachableObjects - operatorReference additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/preview: post: operationId: segments_preview summary: Preview a segment filter description: Count how many people currently match a filter, without saving. Use it to check the audience before saving a segment. tags: - Segments requestBody: required: true content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: filterExpression: description: 'The audience filter: a tree of predicates over person attributes, related data, and events. Discover valid `attr` tokens and operators with segments_catalog (GET /api/v1/segments/catalog).' type: object properties: kind: type: string const: person op: type: string enum: - AND - OR predicates: type: array items: oneOf: - type: object properties: kind: type: string const: has_relationship connector: type: string enum: - AND - OR customObjectType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op path: minItems: 1 maxItems: 3 type: array items: type: object properties: customObjectType: type: string minLength: 1 direction: type: string enum: - parent_to_child - child_to_parent relationshipType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - customObjectType - attributeFilters required: - kind - customObjectType - attributeFilters - type: object properties: kind: type: string const: person_attribute connector: type: string enum: - AND - OR attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - kind - attr - type - op - type: object properties: kind: type: string const: person_group connector: type: string enum: - AND - OR filters: minItems: 1 type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - kind - filters - type: object properties: kind: type: string const: event connector: type: string enum: - AND - OR eventName: type: string minLength: 1 occurred: type: boolean propertyFilters: minItems: 1 type: array items: type: object properties: key: type: string minLength: 1 path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - key - type - op window: type: object properties: op: type: string enum: - in_last_n - more_than_n_ago - between - before - after - 'on' value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - op required: - kind - eventName - occurred required: - kind - op - predicates required: - filterExpression responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: count: type: integer minimum: -9007199254740991 maximum: 9007199254740991 description: People currently matching the filter (capped when huge). required: - count additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error /api/v1/segments/validate: post: operationId: segments_validate summary: Validate a segment filter description: Dry-run a filter expression against your live catalog — nothing is saved. Returns whether it's valid, or the field to fix. tags: - Segments requestBody: required: true content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: filterExpression: description: 'The audience filter: a tree of predicates over person attributes, related data, and events. Discover valid `attr` tokens and operators with segments_catalog (GET /api/v1/segments/catalog).' type: object properties: kind: type: string const: person op: type: string enum: - AND - OR predicates: type: array items: oneOf: - type: object properties: kind: type: string const: has_relationship connector: type: string enum: - AND - OR customObjectType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op path: minItems: 1 maxItems: 3 type: array items: type: object properties: customObjectType: type: string minLength: 1 direction: type: string enum: - parent_to_child - child_to_parent relationshipType: type: string minLength: 1 attributeFilters: type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - customObjectType - attributeFilters required: - kind - customObjectType - attributeFilters - type: object properties: kind: type: string const: person_attribute connector: type: string enum: - AND - OR attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - kind - attr - type - op - type: object properties: kind: type: string const: person_group connector: type: string enum: - AND - OR filters: minItems: 1 type: array items: type: object properties: attr: type: string path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - attr - type - op required: - kind - filters - type: object properties: kind: type: string const: event connector: type: string enum: - AND - OR eventName: type: string minLength: 1 occurred: type: boolean propertyFilters: minItems: 1 type: array items: type: object properties: key: type: string minLength: 1 path: minItems: 1 maxItems: 5 type: array items: type: string pattern: ^[A-Za-z_][A-Za-z0-9_]*$ type: type: string enum: - STRING - NUMBER - BOOLEAN - DATE - JSON - ARRAY op: type: string enum: - eq - neq - in - not_in - contains - not_contains - starts_with - ends_with - gt - gte - lt - lte - 'on' - before - after - between - in_last_n - in_next_n - more_than_n_ago - more_than_n_from_now - exactly_n_from_today - is_null - is_not_null value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - key - type - op window: type: object properties: op: type: string enum: - in_last_n - more_than_n_ago - between - before - after - 'on' value: anyOf: - type: string - type: number - type: boolean - type: array items: anyOf: - type: string - type: number - type: object properties: from: type: string to: type: string required: - from - to - type: object properties: amount: type: integer minimum: 1 maximum: 9999 unit: type: string enum: - days - weeks - months required: - amount - unit - type: object properties: daysOffset: type: integer minimum: -9007199254740991 maximum: 9007199254740991 rollForward: type: object properties: fromDow: type: integer minimum: 0 maximum: 6 includeDows: minItems: 1 type: array items: type: integer minimum: 0 maximum: 6 required: - fromDow - includeDows required: - daysOffset required: - op required: - kind - eventName - occurred required: - kind - op - predicates required: - filterExpression responses: '200': description: Success content: application/json: schema: $schema: https://json-schema.org/draft/2020-12/schema type: object properties: valid: type: boolean description: Always true when the filter is valid. required: - valid additionalProperties: false '400': description: Validation failed or the request cannot proceed. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '401': description: Missing, malformed, or revoked API key. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '404': description: The resource does not exist in this organization. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '409': description: Conflicts with the current state (duplicates, wrong lifecycle state). content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '422': description: The request is well-formed but semantically invalid. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '429': description: Rate limit exceeded — retry after `Retry-After`. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '500': description: Internal server error. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error '503': description: Transient error — retry with a narrower request. content: application/json: schema: type: object properties: error: type: object properties: code: type: string description: Stable machine-readable error code (snake_case). message: type: string required: - code - message required: - error components: securitySchemes: bearerAuth: type: http scheme: bearer description: 'Organization API key, sent as `Authorization: Bearer boom_org_...`.'