openapi: 3.0.0
info:
version: 1.0.0
title: 'Encharge API'
description: 'The Encharge.io API'
license:
name: MIT
contact:
url: 'https://help.encharge.io'
name: unknown
tags:
-
name: Authentication
x-displayName: Authentication
description: "<SecurityDefinitions />\n"
-
name: enduser_model
x-displayName: 'EndUser (Person) Model'
description: "A EndUser (also called person) in your account in Encharge.\n<SchemaDefinition schemaRef=\"#/components/schemas/EndUser\" />\n"
-
name: person_fields_model
x-displayName: 'Person Field Model'
description: "Represents a field (i.e. property) of a person (EndUser).\n<SchemaDefinition schemaRef=\"#/components/schemas/IPersonField\" />\n"
-
name: Webhooks
x-displayName: Webhooks
description: "Subscribe to events happening in Encharge.\nCurrently supported events are:\n- `newUser`\n - Triggers when an enduser (person) is created in Encharge.\n\n- `updatedUser`\n - Triggers when an enduser (person) is updated in Encharge.\n\n- `unsubscribedUser`\n - Triggers when an enduser (person) has unsubscribed from receiving emails in Encharge.\n\n- `added-tag-{tag}`\n - Triggers when an enduser (person) is tagged.\n\n For example, event named `added-tag-signed-up` will trigger when a person is tagged with a tag called \"signed-up\".\n\n- `removed-tag-{tag}`\n - Triggers when an enduser (person) is untagged.\n\n For example, event named `removed-tag-demo` will trigger when a person is removed with a tag called \"demo\". \n\n- `native-form-submitted-{formId}`\n - Triggers when an Encharge native form is submitted.\n\n For example, event named `native-form-submitted-123` will trigger when a native form with ID 123 is submitted.\n\n- `newObject-{objectType}`\n - Triggers when an custom object or a company is created.\n\n For example, event named `newObject-company` will trigger when a new company is created. \n \n- `updatedObject-{objectType}`\n - Triggers when an custom object or a company is updated.\n\n For example, event named `updatedObject-invoice` will trigger when an invoice is updated.\n\n- `deletedObject-{objectType}`\n - Triggers when an custom object or a company is deleted.\n\n For example, event named `deletedObject-company` will trigger when a company is deleted.\n\n- `newAssociation-{associationId}`\n - Triggers when a new association with a specific ID is created.\n\n For example, event named `newAssociation-123` will trigger when a new association of ID 123 is created between objects.\n\n \n__Webhook payload__\n\n`url` will be posted with the data of the person performing the event, as follows:\n```\n{\n // endUserData is an array of people who performed the event.\n // Only supplied for events related to a person, e.g. `newUser`, `updatedUser`, `unsubscribedUser`, `added-tag-{tag}`, `removed-tag-{tag}`, `native-form-submitted-{formId}`.\n \"endUserData\": [\n {\n ... // See the Person Field Model for available properties.\n }\n ],\n \"eventPayload\": {\n ... // Any other data about the event. E.g. the tag applied to the user.\n }\n}\n```\n"
-
name: Account
-
name: People
-
name: Tags
components:
parameters:
PeopleQuery:
in: query
name: people
required: true
description: "People can be specified by any ID. \nFor example, for a person with an email `slav@encharge.io` use the following query: \n\n`?people[0][email]=slav@encharge.io`\n\nFor multiple people, pass multiple ids in the query like so:\n\n`?people[0][userId]=abc&people[1][userId]=xyz`. \n\nThis will specify people who have userId of `abc` and `xyz`.\n\nEmails, userIds and other IDs can used together in a single query.\n"
schema: {$ref: '#/components/schemas/EndUserIdentifiers'}
schemas:
EndUser:
type: object
description: 'This is the exposed EndUser class that proxies the unproxied one.'
properties: {id: {type: string}, email: {type: string}, userId: {type: string}, name: {type: string}, firstName: {type: string}, lastName: {type: string}}
additionalProperties: {description: 'See [Person Fields](#tag/PersonFields) for other available properties.'}
ABEmailTestVariantByEmail:
properties: {emailId: {type: number, format: double}, type: {type: string, enum: [email], nullable: false}, variantId: {type: string}}
required: [type]
type: object
ABEmailTestVariantByEmailDetails:
properties: {preheader: {type: string}, fromName: {type: string}, fromEmail: {type: string}, subject: {type: string}, type: {type: string, enum: [emailDetails], nullable: false}, variantId: {type: string}}
required: [type]
type: object
ABEmailTestVariant:
anyOf: [{$ref: '#/components/schemas/ABEmailTestVariantByEmail'}, {$ref: '#/components/schemas/ABEmailTestVariantByEmailDetails'}]
ABTestConfig:
properties: {enabled: {type: boolean}, variants: {items: {$ref: '#/components/schemas/ABEmailTestVariant'}, type: array}, pickWinner: {type: boolean}, pickWinnerBy: {type: string, enum: [open, click]}, waitBeforeWinnerPeriod: {type: number, format: double}, waitBeforeWinnerPeriodType: {type: string, enum: [hours, days]}, winner: {$ref: '#/components/schemas/ABEmailTestVariant'}, distribution: {items: {type: number, format: double}, type: array}, winnerPickedAt: {type: string}}
required: [enabled, variants, pickWinner]
type: object
additionalProperties: false
MetricCachedData:
properties: {delivered: {type: number, format: double}, click: {type: number, format: double}, open: {type: number, format: double}}
required: [delivered, click, open]
type: object
additionalProperties: false
CachedMetric:
properties: {updatedAt: {type: string, format: date-time}, data: {$ref: '#/components/schemas/MetricCachedData'}, isStale: {type: boolean}}
type: object
additionalProperties: false
Broadcast:
properties: {id: {type: number, format: double, description: 'Broadcast Id.'}, name: {type: string, description: 'Broadcast name.'}, status: {type: string, enum: [draft, scheduled, sending, sent, ab-testing, ab-test-sending-winner, canceled, failed], description: 'Broadcast status'}, audience: {properties: {segmentId: {type: number, format: double}, type: {type: string, enum: [segment], nullable: false}}, required: [segmentId, type], type: object, description: 'Audience to send the broadcast to. Currently, the only supported audience is a segment.'}, emailId: {type: number, format: double, description: 'Id of the email associated with this broadcast.'}, time: {properties: {useContactsTimezones: {type: boolean}}, type: object, description: 'Whether to send the broadcast in the contacts'' timezones.'}, sendAt: {type: string, format: date-time, description: 'Date and Time to begin sending the broadcast. Accepted format: ISO 8601 datetime.'}, followUp: {properties: {newSubjectLine: {type: string}, emailId: {type: number, format: double}, time: {properties: {period: {type: number, format: double}}, required: [period], type: object}, audience: {type: string, enum: [not-opened, not-clicked]}}, required: [time, audience], type: object, description: 'Not implemented.'}, abTest: {$ref: '#/components/schemas/ABTestConfig', description: 'Config for the A/B Test associated with this broadcast.'}, createdAt: {type: string, description: 'Date the broadcast was created.'}, updatedAt: {type: string, description: 'Date the broadcast was last updated.'}, accountId: {type: number, format: double, description: 'Id of the account this broadcast belongs to.'}, createdBy: {type: number, format: double, description: 'Not implemented. User that created the broadcast'}, integrationId: {type: number, format: double, nullable: true, description: 'Internal. Id of the flow used to send this broadcast.'}, trackReplies: {type: boolean, description: "Track replies to this broadcast. When on, the send step substitutes the\nReply-To with an Encharge address, forwards replies to the original sender,\nand records reply email-events attributed to this broadcast. Default off."}, cachedMetric: {$ref: '#/components/schemas/CachedMetric'}, sentEmailVersionId: {type: number, format: double, description: "Internal. Id of the email_content_versions row captured when the broadcast started sending.\nRecords which email version recipients actually received, even if emails.data is mutated later."}, peopleEntered: {type: number, format: double, description: 'Internal. Number of people who entered this broadcast.'}, peopleExited: {type: number, format: double, description: 'Internal. Number of people who exited this broadcast.'}}
required: [id, name, status, accountId, peopleEntered, peopleExited]
type: object
additionalProperties: false
CustomObject:
description: "This is the base unproxied enduser class.\nIt shouldn't be used without a proxy as defined below."
ICustomObjectCreatable:
properties: {externalId: {type: string}, id: {type: number, format: double}}
additionalProperties: {}
type: object
Exclude_JSONSchema6TypeName.object-or-array-or-null_:
type: string
enum: [string, number, boolean, integer, any]
description: 'Exclude from T those types that are assignable to U'
PersonFieldFormat:
type: string
enum: [date, date-time]
nullable: true
description: 'Format of the field. Applies to String fields only. JSON schema compatible'
FieldDisplayType:
type: string
enum: [text, textarea, date, datetime, number, select, multiselect, checkbox, radio, email, url, phone, integer, decimal, currency, currencyCents]
IPersonField:
description: 'Represents a field (i.e. property) of a person in Encharge.'
properties: {name: {type: string, description: "Unique ID of the field.\n\nUse this \"name\" to refer to this field in any API operations."}, title: {type: string, description: 'Human readable name of the field.'}, type: {$ref: '#/components/schemas/Exclude_JSONSchema6TypeName.object-or-array-or-null_', description: 'Type of the field. JSON schema compatible'}, format: {$ref: '#/components/schemas/PersonFieldFormat', description: 'Format of the field. Applies to String fields only. JSON schema compatible'}, displayType: {$ref: '#/components/schemas/FieldDisplayType', description: "Reserved for future use.\nHow to display the field in the UI. If empty, the display will be deduced from the field type and format."}, readOnly: {type: boolean, description: 'Whether this field can be changed by the user or via the API.'}, tooltip: {type: string, description: 'More information about this field (to be shown in a tooltip)'}, icon: {type: string, description: 'Field icon, if set.'}, array: {type: boolean, description: 'Whether this field holds an array of values.'}, enum: {items: {type: string}, type: array, description: 'Possible values for this field'}, enumNames: {items: {type: string}, type: array, description: 'Labels for enum values. If be omitted, the enum values will be used as enum labels.'}, allowNewEnumValues: {type: boolean, description: 'If we allow other values than the ones in the "enum" property.'}, canMapFrom: {type: boolean, description: Internal}, firstClassField: {type: boolean, description: Internal.}, createdBy: {type: string, description: 'Internal. Field creator.'}}
required: [name, type]
type: object
additionalProperties: false
CustomObjectField:
$ref: '#/components/schemas/IPersonField'
CustomObjectSchemaAssociation:
properties: {type: {type: string, enum: ['1:1', '1:M', 'M:M'], description: 'Type of the association. 1 to 1, 1 to many, many to many'}, name: {type: string, description: 'Optional name of the association. E.g. if defining a relation between a Person and a Company this can be "Employee", "Owner", "Manager", etc.'}, toObject: {type: string, description: 'The name of the custom object that''s the other side of this association. Associations are automatically defined as two-way. I.e. there is no need to associate from -> to and to -> from.'}, fromObject: {type: string, description: 'The name of the custom object that''s a side to this association. Associations are automatically defined as two-way. I.e. there is no need to associate from -> to and to -> from.'}, id: {type: number, format: double, description: 'Id of the association'}}
required: [type, toObject, fromObject, id]
type: object
CustomObjectSchema:
properties: {associations: {items: {$ref: '#/components/schemas/CustomObjectSchemaAssociation'}, type: array}, fields: {items: {$ref: '#/components/schemas/CustomObjectField'}, type: array, description: 'The fields of the custom object'}, secondaryFields: {items: {type: string}, type: array, description: 'Designate a list of secondary field used when displaying this object.'}, primaryField: {type: string, description: 'Designate a primary field used when displaying this object.'}, searchableFields: {items: {type: string}, type: array, description: 'Fields that will be indexed for searching.'}, displayNamePlural: {type: string, description: 'The display name of multiple instances the custom object. E.g. "Invoices"'}, displayNameSingular: {type: string, description: 'The display name of one instance the custom object. E.g. "Invoice"'}, description: {type: string, description: 'Description of the custom object'}, name: {type: string, description: 'The name of the custom object'}}
required: [displayNamePlural, displayNameSingular, name]
type: object
Pick_CustomObjectSchemaCreatable.Exclude_keyofCustomObjectSchemaCreatable.searchableFields__:
properties: {name: {type: string, description: 'The name of the custom object'}, description: {type: string, description: 'Description of the custom object'}, displayNameSingular: {type: string, description: 'The display name of one instance the custom object. E.g. "Invoice"'}, displayNamePlural: {type: string, description: 'The display name of multiple instances the custom object. E.g. "Invoices"'}, primaryField: {type: string, description: 'Designate a primary field used when displaying this object.'}, secondaryFields: {items: {type: string}, type: array, description: 'Designate a list of secondary field used when displaying this object.'}}
required: [name, displayNameSingular, displayNamePlural]
type: object
description: 'From T, pick a set of properties whose keys are in the union K'
Omit_CustomObjectSchemaCreatable.searchableFields_:
$ref: '#/components/schemas/Pick_CustomObjectSchemaCreatable.Exclude_keyofCustomObjectSchemaCreatable.searchableFields__'
description: 'Construct a type with the properties of T except for those in type K.'
Partial_Omit_CustomObjectSchema.fields-or-associations-or-name__:
properties: {description: {type: string, description: 'Description of the custom object'}, displayNameSingular: {type: string, description: 'The display name of one instance the custom object. E.g. "Invoice"'}, displayNamePlural: {type: string, description: 'The display name of multiple instances the custom object. E.g. "Invoices"'}, searchableFields: {items: {type: string}, type: array, description: 'Fields that will be indexed for searching.'}, primaryField: {type: string, description: 'Designate a primary field used when displaying this object.'}, secondaryFields: {items: {type: string}, type: array, description: 'Designate a list of secondary field used when displaying this object.'}}
type: object
description: 'Make all properties in T optional'
CustomObjectSchemaUpdatable:
$ref: '#/components/schemas/Partial_Omit_CustomObjectSchema.fields-or-associations-or-name__'
PersonField:
properties: {name: {type: string, description: "Unique ID of the field.\n\nUse this \"name\" to refer to this field in any API operations."}, title: {type: string, description: 'Human readable name of the field.'}, type: {$ref: '#/components/schemas/Exclude_JSONSchema6TypeName.object-or-array-or-null_', description: 'Type of the field. JSON schema compatible'}, format: {$ref: '#/components/schemas/PersonFieldFormat', description: 'Format of the field. Applies to String fields only. JSON schema compatible'}, displayType: {$ref: '#/components/schemas/FieldDisplayType', description: "Reserved for future use.\nHow to display the field in the UI. If empty, the display will be deduced from the field type and format."}, readOnly: {type: boolean, description: 'Whether this field can be changed by the user or via the API.'}, tooltip: {type: string, description: 'More information about this field (to be shown in a tooltip)'}, icon: {type: string, description: 'Field icon, if set.'}, array: {type: boolean, description: 'Whether this field holds an array of values.'}, enum: {items: {type: string}, type: array, description: 'Possible values for this field'}, enumNames: {items: {type: string}, type: array, description: 'Labels for enum values. If be omitted, the enum values will be used as enum labels.'}, allowNewEnumValues: {type: boolean, description: 'If we allow other values than the ones in the "enum" property.'}, canMapFrom: {type: boolean, description: Internal}, firstClassField: {type: boolean, description: Internal.}, createdBy: {type: string, description: 'Internal. Field creator.'}}
required: [name, type, title, format, readOnly, canMapFrom, firstClassField, array, createdBy]
type: object
additionalProperties: false
Partial_Pick_CustomObjectField.title-or-tooltip-or-displayType-or-icon-or-enumNames-or-enum-or-type-or-format__:
properties: {title: {type: string, description: 'Human readable name of the field.'}, tooltip: {type: string, description: 'More information about this field (to be shown in a tooltip)'}, displayType: {$ref: '#/components/schemas/FieldDisplayType', description: "Reserved for future use.\nHow to display the field in the UI. If empty, the display will be deduced from the field type and format."}, icon: {type: string, description: 'Field icon, if set.'}, enumNames: {items: {type: string}, type: array, description: 'Labels for enum values. If be omitted, the enum values will be used as enum labels.'}, enum: {items: {type: string}, type: array, description: 'Possible values for this field'}, type: {$ref: '#/components/schemas/Exclude_JSONSchema6TypeName.object-or-array-or-null_', description: 'Type of the field. JSON schema compatible'}, format: {$ref: '#/components/schemas/PersonFieldFormat', description: 'Format of the field. Applies to String fields only. JSON schema compatible'}}
type: object
description: 'Make all properties in T optional'
CustomObjectFieldEdit:
$ref: '#/components/schemas/Partial_Pick_CustomObjectField.title-or-tooltip-or-displayType-or-icon-or-enumNames-or-enum-or-type-or-format__'
Pick_CustomObjectSchemaAssociation.Exclude_keyofCustomObjectSchemaAssociation.id__:
properties: {name: {type: string, description: 'Optional name of the association. E.g. if defining a relation between a Person and a Company this can be "Employee", "Owner", "Manager", etc.'}, type: {type: string, enum: ['1:1', '1:M', 'M:M'], description: 'Type of the association. 1 to 1, 1 to many, many to many'}, fromObject: {type: string, description: 'The name of the custom object that''s a side to this association. Associations are automatically defined as two-way. I.e. there is no need to associate from -> to and to -> from.'}, toObject: {type: string, description: 'The name of the custom object that''s the other side of this association. Associations are automatically defined as two-way. I.e. there is no need to associate from -> to and to -> from.'}}
required: [type, fromObject, toObject]
type: object
description: 'From T, pick a set of properties whose keys are in the union K'
Omit_CustomObjectSchemaAssociation.id_:
$ref: '#/components/schemas/Pick_CustomObjectSchemaAssociation.Exclude_keyofCustomObjectSchemaAssociation.id__'
description: 'Construct a type with the properties of T except for those in type K.'
CustomObjectSchemaAssociationCreatable:
$ref: '#/components/schemas/Omit_CustomObjectSchemaAssociation.id_'
EmailDomainDNSRecordResponse:
description: 'DNS record for domain verification.'
properties: {type: {type: string, enum: [CNAME, TXT]}, host: {type: string}, data: {type: string}, valid: {type: boolean}, reason: {type: string}, optional: {type: boolean}}
required: [type, host, data, valid]
type: object
additionalProperties: false
EmailDomainResponse:
description: 'Email domain (verification status and DNS records).'
properties: {id: {type: number, format: double}, domain: {type: string}, status: {type: string}, dns: {items: {$ref: '#/components/schemas/EmailDomainDNSRecordResponse'}, type: array}, accountId: {type: number, format: double}, isSES: {type: boolean}, error: {type: string}, hasRestrictiveSubdomainPolicy: {type: boolean}, externalIds: {properties: {sendgridAccountName: {type: string}, sendgridDomainAuthentication: {type: number, format: double}}, type: object}, dnsRecordsExpiredAt: {type: string, nullable: true}, dnsRecordsExpiredCount: {type: number, format: double}, dontRecheckDNSRecords: {type: boolean}}
required: [id, domain, status, dns, accountId]
type: object
additionalProperties: false
EmailDomainCreateBody:
description: 'Request body for adding an email domain for verification.'
properties: {domain: {type: string, description: 'Domain name to verify (e.g. example.com)'}}
required: [domain]
type: object
additionalProperties: false
EmailContent: {}
EmailContentCreate:
properties: {name: {type: string, description: 'Name of the email template'}, subject: {type: string, description: 'Subject of the email.'}, fromEmail: {type: string, description: 'From address to send the email from'}, fromName: {type: string, description: 'Name that most inboxes use to display instead of the From email address.'}, replyEmail: {type: string, description: 'Address that recipients will reply to by default.'}, replyName: {type: string, description: 'Name that most inboxes use to display instead of the Reply email address.'}, type: {type: string, enum: [HTML, text], description: 'Type of the email. HTML or plain-text. Currently only HTML is supported.'}, html: {type: string, description: 'HTML content of the email.'}, editor: {description: 'Internal representation of the email template to enable editing in the Encharge UI.'}, previewImage: {type: string, description: 'Thumbnail of the email contents'}, preheader: {type: string, description: 'The preheader is a summary text that follows a subject line when the email is viewed in an inbox.'}, cc: {type: string, description: 'CC recipients of this email. Please note that using CC in mass emails is not advised, as it will quickly flood the CCed inbox.'}, bcc: {type: string, description: 'BCC recipients of this email. Please note that using BCC in mass emails is not advised, as it will quickly flood the BCCed inbox.'}, communicationCategoryId: {type: number, format: double, description: 'The category of this email template'}, mergeTags: {items: {properties: {label: {type: string}, value: {type: string}}, required: [value], type: object}, type: array, description: 'Custom merge tags for the email'}, isStandalone: {type: boolean, description: 'Whether this email template is standalone or part of a broadcast.'}, aiGenerated: {type: boolean, description: 'Whether this email template was generated by the AI assistant.'}}
required: [name, subject, fromEmail]
type: object
additionalProperties: false
EmailMergeTag:
properties: {value: {type: string}, label: {type: string}}
required: [value]
type: object
additionalProperties: false
EmailMergeTags:
items: {$ref: '#/components/schemas/EmailMergeTag'}
type: array
Partial_IEmailContent_:
properties: {id: {type: number, format: double}, archived: {type: boolean}, isStandalone: {type: boolean}, accountId: {type: number, format: double}, name: {type: string}, subject: {type: string}, fromEmail: {type: string}, fromName: {type: string}, replyName: {type: string}, replyEmail: {type: string}, type: {type: string, enum: [HTML, text]}, html: {type: string}, editor: {}, previewImage: {type: string}, preheader: {type: string}, cc: {type: string}, bcc: {type: string}, canSpamCompliance: {type: string, enum: [approved, pending, rejected, manually_approved]}, communicationCategoryId: {type: number, format: double}, mergeTags: {$ref: '#/components/schemas/EmailMergeTags'}, aiGenerated: {type: boolean}}
type: object
description: 'Make all properties in T optional'
EmailContentVersion: {}
CommonObjectsSegmentFolderType:
type: string
enum: [objects-company, objects-person, objects-invoice, objects-contact, objects-deal, objects-product, objects-opportunity, objects-lead, objects-account, objects-case, objects-task, objects-event]
ObjectsSegmentFolderType:
anyOf: [{$ref: '#/components/schemas/CommonObjectsSegmentFolderType'}, {type: string}]
FolderType:
anyOf: [{$ref: '#/components/schemas/ObjectsSegmentFolderType'}, {type: string, enum: [segments, emails, flows, personFields, broadcasts, tags, forms, eventManagement]}]
GenericFolderAPI:
properties: {type: {type: string, enum: [folder], nullable: false}, folderType: {$ref: '#/components/schemas/FolderType'}, id: {type: string}, root: {type: boolean}, name: {type: string}, expanded: {type: boolean}, childrenIds: {items: {anyOf: [{type: string}, {type: number, format: double}]}, type: array}, autoFolderType: {type: string, enum: [favorites], nullable: false}, color: {type: string}, createdAt: {type: string}, updatedAt: {type: string}}
required: [type, folderType, id, name]
type: object
additionalProperties: false
Partial_GenericFolderAPI_:
properties: {type: {type: string, enum: [folder], nullable: false}, folderType: {$ref: '#/components/schemas/FolderType'}, id: {type: string}, root: {type: boolean}, name: {type: string}, expanded: {type: boolean}, childrenIds: {items: {anyOf: [{type: string}, {type: number, format: double}]}, type: array}, autoFolderType: {type: string, enum: [favorites], nullable: false}, color: {type: string}, createdAt: {type: string}, updatedAt: {type: string}}
type: object
description: 'Make all properties in T optional'
ConditionPerformed:
type: string
enum: [has, 'has not']
SegmentEventConditionGroup:
properties: {type: {type: string, enum: [group], nullable: false}, operator: {type: string, enum: [and, or]}, conditions: {items: {anyOf: [{$ref: '#/components/schemas/SegmentEventConditionGroup'}, {$ref: '#/components/schemas/SegmentEventProperty'}]}, type: array}, system: {type: boolean}, uuid: {type: string}}
required: [type, operator, conditions]
type: object
additionalProperties: false
ConditionGeneric:
type: string
enum: [is, 'is not', 'is empty', 'is not empty', 'is any', 'is any of', 'is not any of']
ConditionText:
type: string
enum: [is, 'is not', 'is empty', 'is not empty', 'is any', 'is any of', 'is not any of', 'starts with', 'does not start with', 'ends with', 'does not end with', contains, 'does not contain']
ConditionNumber:
type: string
enum: [is, 'is not', 'is empty', 'is not empty', 'is any', 'is any of', 'is not any of', 'is more than', 'is less than', 'at least']
ConditionDateAbsolute:
type: string
enum: ['is empty', 'is not empty', 'is any', after, before, on]
EventPropertyConditionAll:
anyOf: [{$ref: '#/components/schemas/ConditionGeneric'}, {$ref: '#/components/schemas/ConditionText'}, {$ref: '#/components/schemas/ConditionNumber'}, {$ref: '#/components/schemas/ConditionDateAbsolute'}]
SegmentEventProperty:
properties: {uuid: {type: string}, value: {}, condition: {$ref: '#/components/schemas/EventPropertyConditionAll'}, field: {type: string}, type: {type: string, enum: [field], nullable: false}}
required: [condition, field, type]
type: object
ConditionNumberOnly:
type: string
enum: ['is more than', 'is less than', 'at least']
SegmentEventFrequencyCondition:
properties: {type: {type: string, enum: [frequencyCondition], nullable: false}, value: {type: number, format: double}, condition: {$ref: '#/components/schemas/ConditionNumberOnly'}}
required: [type, value, condition]
type: object
additionalProperties: false
ConditionDate:
type: string
enum: ['is empty', 'is not empty', 'is any', after, before, on, 'after period', 'before period', 'on period']
SegmentEventRecencyCondition:
properties: {type: {type: string, enum: [recencyCondition], nullable: false}, value: {anyOf: [{type: number, format: double}, {type: string}]}, condition: {$ref: '#/components/schemas/ConditionDate'}}
required: [type, value, condition]
type: object
additionalProperties: false
SegmentEventCondition:
properties: {type: {type: string, enum: [event], nullable: false}, condition: {$ref: '#/components/schemas/ConditionPerformed'}, systemConditions: {$ref: '#/components/schemas/SegmentEventConditionGroup', description: "System conditions are conditions that added to the segment by the system.\nThey are not editable by the user.\nFor example, for email conditions we automatically add a condition that the event type is \"email\"."}, propertiesConditions: {$ref: '#/components/schemas/SegmentEventConditionGroup'}, frequencyCondition: {$ref: '#/components/schemas/SegmentEventFrequencyCondition'}, recencyCondition: {$ref: '#/components/schemas/SegmentEventRecencyCondition'}}
required: [type, condition, systemConditions]
type: object
additionalProperties: false
SegmentTagCondition:
properties: {type: {type: string, enum: [tag], nullable: false}, value: {}, condition: {$ref: '#/components/schemas/ConditionPerformed'}}
required: [type, value, condition]
type: object
additionalProperties: false
ConditionAll:
anyOf: [{$ref: '#/components/schemas/ConditionGeneric'}, {$ref: '#/components/schemas/ConditionText'}, {$ref: '#/components/schemas/ConditionNumber'}, {$ref: '#/components/schemas/ConditionDate'}]
SegmentPropertyCondition:
properties: {type: {type: string, enum: [field], nullable: false}, field: {type: string}, condition: {$ref: '#/components/schemas/ConditionAll'}, value: {}}
required: [type, field, condition]
type: object
additionalProperties: false
ConditionNestedSegment:
type: string
enum: [in, 'not in']
SegmentNestedSegmentCondition:
properties: {type: {type: string, enum: [segment], nullable: false}, value: {type: number, format: double}, condition: {$ref: '#/components/schemas/ConditionNestedSegment'}}
required: [type, value, condition]
type: object
additionalProperties: false
SegmentConditionGroup:
properties: {type: {type: string, enum: [group], nullable: false}, operator: {type: string, enum: [and, or]}, conditions: {items: {$ref: '#/components/schemas/SegmentCondition'}, type: array}}
required: [type, operator, conditions]
type: object
additionalProperties: false
AssociationCondition:
properties: {type: {anyOf: [{$ref: '#/components/schemas/ConditionNumberOnly'}, {type: string, enum: [any, none, exactly]}]}, value: {type: number, format: double}}
required: [type]
type: object
additionalProperties: false
SegmentAssociationCondition:
properties: {type: {type: string, enum: [association], nullable: false}, condition: {$ref: '#/components/schemas/AssociationCondition'}, value: {type: number, format: double}, associationConditions: {$ref: '#/components/schemas/SegmentConditionGroup'}}
required: [type, condition, value]
type: object
additionalProperties: false
ConditionGoal:
type: string
enum: [in, 'not in']
SegmentGoalCondition:
properties: {type: {type: string, enum: [goal], nullable: false}, condition: {$ref: '#/components/schemas/ConditionGoal'}, value: {type: number, format: double}}
required: [type, condition, value]
type: object
additionalProperties: false
SegmentCondition:
allOf: [{anyOf: [{$ref: '#/components/schemas/SegmentEventCondition'}
# --- truncated at 32 KB (79 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/encharge/refs/heads/main/openapi/_original/encharge-openapi.yml