SegmentsCreateManualSegmentRequest
{
"type": "object",
"required": [
"segment"
],
"properties": {
"segment": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"example": "Manual Segment 1",
"description": "The name of the segment."
},
"description": {
"type": "string",
"example": "My first manual segment",
"description": "A description for the segment. This can help you understand the purpose of the segment when you encounter it in other requests or in the UI."
}
}
}
}
}
SegmentsCreateManualSegmentResponse
{
"type": "object",
"properties": {
"segment": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 7,
"description": "The identifier for a segment."
},
"name": {
"type": "string",
"example": "Manual Segment 1",
"description": "The name of the segment."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": null,
"nullable": true,
"description": "The tags assigned to the segment, if any. Tags may help you sort through your segments."
},
"type": {
"enum": [
"dynamic",
"manual"
],
"type": "string",
"example": "manual",
"description": "The type of segment."
},
"state": {
"enum": [
"finished"
],
"type": "string",
"description": "The state of the segment. \n"
},
"progress": {
"type": "integer",
"example": null,
"nullable": true,
"description": "If Customer.io has not finished processing the segment, this indicates the percentage complete. Otherwise, this key is null."
},
"description": {
"type": "string",
"example": "My first manual segment",
"description": "A description for the segment. This can help you understand the purpose of the segment when you encounter it in other requests or in the UI."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
}
}
}
}
}
SegmentsGetCustomerCountResponse
{
"type": "object",
"properties": {
"count": {
"type": "integer",
"description": "The total number of customers in the segment."
}
}
}
SegmentsGetDependenciesResponse
{
"type": "object",
"properties": {
"used_by": {
"type": "object",
"properties": {
"campaigns": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The campaigns that use this segment."
},
"sent_newsletters": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The newsletters that you've sent that uses this segment."
},
"draft_newsletters": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The newsletters that are still in a draft state that reference this segment."
}
}
}
}
}
SegmentsGetSegmentInfoResponse
{
"type": "object",
"properties": {
"segment": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 7,
"description": "The identifier for a segment."
},
"name": {
"type": "string",
"example": "Manual Segment 1",
"description": "The name of the segment."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": null,
"nullable": true,
"description": "The tags assigned to the segment, if any. Tags may help you sort through your segments."
},
"type": {
"enum": [
"dynamic",
"manual"
],
"type": "string",
"example": "manual",
"description": "The type of segment."
},
"state": {
"enum": [
"finished"
],
"type": "string",
"description": "The state of the segment. \n"
},
"progress": {
"type": "integer",
"example": null,
"nullable": true,
"description": "If Customer.io has not finished processing the segment, this indicates the percentage complete. Otherwise, this key is null."
},
"description": {
"type": "string",
"example": "My first manual segment",
"description": "A description for the segment. This can help you understand the purpose of the segment when you encounter it in other requests or in the UI."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
}
}
}
}
}
SegmentsListMembershipResponse
{
"oneOf": [
{
"type": "object",
"title": "email or id",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "The customers that belong to this segment."
},
"next": {
"type": "string",
"description": "Indicates the next page of results. Add `?start=<next_value>` to the request to get the next page of results."
},
"identifiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"email",
"id",
"cio_id"
],
"properties": {
"id": {
"type": "string",
"example": 2,
"nullable": true,
"description": "A person's unique ID, if set. This is the same as the `customer_id` if present."
},
"email": {
"type": "string",
"format": "email",
"example": "test@example.com",
"nullable": true,
"description": "A person's email address, if set."
},
"cio_id": {
"type": "string",
"example": "a3000001",
"description": "A unique identifier set by Customer.io, used to reference a person if you want to update their identifiers."
}
},
"description": "Contains identifiers for the person represented in a response—`id`, `cio_id`, and `email` (if your workspace uses the *Email or ID* setting). If the person's `id` or `email` is not set, the value will be null.\n\nWe recommend that you use this object rather than the less descriptive `customer_id`.\n"
},
"description": "The customers that belong to this segment."
}
}
},
{
"type": "object",
"title": "id only",
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "The customers that belong to this segment."
},
"next": {
"type": "string",
"description": "Indicates the next page of results. Add `?start=<next_value>` to the request to get the next page of results."
},
"identifiers": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"cio_id"
],
"properties": {
"id": {
"type": "string",
"example": 2,
"description": "A person's unique ID. This matches a value in `ids`."
},
"cio_id": {
"type": "string",
"example": "a3000001",
"description": "A unique identifier set by Customer.io, used to reference a person if you want to update their identifiers."
}
},
"description": "Contains `id` and `cio_id` identifiers for a person in a workspace that doesn't use email as an identifier.\n"
},
"description": "The customers that belong to this segment."
}
}
}
]
}
SegmentsListResponse
{
"type": "object",
"properties": {
"segments": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 7,
"description": "The identifier for a segment."
},
"name": {
"type": "string",
"example": "Manual Segment 1",
"description": "The name of the segment."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": null,
"nullable": true,
"description": "The tags assigned to the segment, if any. Tags may help you sort through your segments."
},
"type": {
"enum": [
"dynamic",
"manual"
],
"type": "string",
"example": "manual",
"description": "The type of segment."
},
"state": {
"enum": [
"finished"
],
"type": "string",
"description": "The state of the segment. \n"
},
"progress": {
"type": "integer",
"example": null,
"nullable": true,
"description": "If Customer.io has not finished processing the segment, this indicates the percentage complete. Otherwise, this key is null."
},
"description": {
"type": "string",
"example": "My first manual segment",
"description": "A description for the segment. This can help you understand the purpose of the segment when you encounter it in other requests or in the UI."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
}
}
}
}
}
}
SendMessagesTransactionalEmail400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Describes the error that caused your request to fail."
}
},
"description": "Contains errors."
}
}
}
SendMessagesTransactionalEmailRequest
{
"oneOf": [
{
"allOf": [
{
"type": "object",
"required": [
"transactional_message_id"
],
"properties": {
"transactional_message_id": {
"oneOf": [
{
"type": "integer",
"title": "ID (integer)",
"example": 44,
"description": "The ID of the transactional message you want to send."
},
{
"type": "string",
"title": "Trigger Name (string)",
"example": "pwdreset",
"description": "The name of trigger for the transactional message you want to send; you set the trigger name in the *Configure Settings* step when setting up your message. This is case insensitive."
}
],
"description": "The transactional message template that you want to use for your message. You can call the template by its numerical ID or by the *Trigger Name* that you assigned the template (case insensitive)."
}
}
},
{
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The HTML body of your message. This overrides the body of the transactional template (referenced by `transactional_message_id`). If you send an AMP-enabled email (with `body_amp`), and the recipient's email client doesn't support AMP, this is the fallback email."
},
"from": {
"type": "string",
"example": "support@example.com",
"description": "The address that your email is from. This address must be verified by Customer.io. This overrides the from address set within the transactional template (referenced by `transactional_message_id`). You can include a display/friendly name in your from address, but we recommend that you use quotation marks around the friendly name to avoid potential issues with special characters, e.g. `\\\"Person\\\" <person@example.com>`."
},
"subject": {
"type": "string",
"description": "The subject line for your message. This overrides the subject of the transactional template (referenced by `transactional_message_id`)."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"language": {
"type": "string",
"description": "Overrides language preferences for the person you want to send your transactional message to. Use one of our [supported two- or four-letter language codes](https://customer.io/docs/api/app/)."
},
"body_plain": {
"type": "string",
"description": "The plaintext body of your message. This overrides the body of your transactional template (referenced by `transactional_message_id`)."
}
}
},
{
"type": "object",
"required": [
"to",
"identifiers"
],
"properties": {
"send_at": {
"type": "integer",
"description": "A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately."
},
"identifiers": {
"oneOf": [
{
"type": "object",
"title": "id",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"example": 12345,
"description": "The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.\n"
}
}
},
{
"type": "object",
"title": "email",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"example": "cool.person@example.com",
"description": "The identifier for the person represented by the transactional message. Use this option if your workspace identifies people by email rather than by `id`."
}
}
},
{
"type": "object",
"title": "cio_id",
"required": [
"cio_id"
],
"properties": {
"cio_id": {
"type": "string",
"example": 3000001,
"description": "A unique, immutable identifier for a person, set by Customer.io when you add a person."
}
}
}
],
"description": "Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`."
},
"queue_draft": {
"type": "boolean",
"default": false,
"description": "If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message."
},
"message_data": {
"type": "object",
"example": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"description": "An object containing the key-value pairs referenced using liquid in your message.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Liquid Data"
}
},
"send_to_unsubscribed": {
"type": "boolean",
"default": true,
"description": "If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your `transactional_message_id`."
},
"disable_message_retention": {
"type": "boolean",
"default": false,
"description": "If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your `transactional_message_id`."
}
}
},
{
"type": "object",
"properties": {
"to": {
"type": "string",
"example": "cool.person@example.com",
"description": "The message recipient(s). Supports multiple addresses separated by commas. Your request can contain up to 15 total recipients between the `to` and `bcc` keys.\n\nYou can include a display or \"friendly\" name in \"to\" address, but we recommend that you use quotation marks around the friendly name to avoid potential issues with special characters, e.g. `\\\"Person\\\" <person@example.com>`. \n"
},
"bcc": {
"type": "string",
"example": "bcc@example.com",
"description": "Blind copy message recipients. Supports multiple addresses separated by commas. Your request can contain up to 15 total recipients between the `to` and `bcc` keys."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"tracked": {
"type": "boolean",
"default": true,
"description": "If true, Customer.io tracks opens and link clicks in your message."
},
"fake_bcc": {
"type": "boolean",
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"description": "The address that recipients can reply to, if different from the `from` address."
},
"preheader": {
"type": "string",
"description": "Also known as \"preview text\", this is the block block of text that users see next to, or underneath, the subject line in their inbox."
},
"body_plain": {
"type": "string",
"description": "By default, we generate a plaintext version of your message body for each delivery. Use this key to override the default plain text body."
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "base64",
"x-doNotRender": true,
"x-additionalPropertiesName": "Attachment Names"
}
},
"description": "A dictionary of attachments where the filename is the key and the value is the base64-encoded contents. The total size of all attachments must be less than 2 MB. Some filetype extensions are restricted.\n"
},
"disable_css_preprocessing": {
"type": "boolean",
"default": false,
"example": false,
"description": "Set to `true` to disable CSS preprocessing. This setting overrides the CSS preprocessing setting on the `transactional_message_id` as set in the user interface. Transactional emails have CSS preprocessing enabled by default."
}
}
}
],
"title": "With template",
"example": {
"to": "cool.person@example.com",
"bcc": "bcc@example.com",
"from": "override-templated-address@example.com",
"subject": "Did you really login from a new location?",
"tracked": true,
"identifiers": {
"email": "cool.person@example.com"
},
"queue_draft": false,
"message_data": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"send_to_unsubscribed": true,
"transactional_message_id": 44,
"disable_css_preprocessing": true,
"disable_message_retention": false
},
"description": "Send a transactional message using a template that you set up in Customer.io."
},
{
"allOf": [
{
"type": "object",
"required": [
"body",
"subject",
"from"
],
"properties": {
"body": {
"type": "string",
"example": "Your temporary password is {{message_data.password_reset_token}}",
"description": "The body of your message."
},
"from": {
"type": "string",
"example": "support@example.com",
"description": "The address that your email is from. This address must be verified by Customer.io. You can include a display/friendly name in your from address in the format `Person <person@example.com>`."
},
"subject": {
"type": "string",
"example": "Reset your password!",
"description": "The subject line for your message."
}
}
},
{
"type": "object",
"required": [
"to",
"identifiers"
],
"properties": {
"send_at": {
"type": "integer",
"description": "A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately."
},
"identifiers": {
"oneOf": [
{
"type": "object",
"title": "id",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"example": 12345,
"description": "The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.\n"
}
}
},
{
"type": "object",
"title": "email",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"example": "cool.person@example.com",
"description": "The identifier for the person represented by the transactional message. Use this option if your workspace identifies people by email rather than by `id`."
}
}
},
{
"type": "object",
"title": "cio_id",
"required": [
"cio_id"
],
"properties": {
"cio_id": {
"type": "string",
"example": 3000001,
"description": "A unique, immutable identifier for a person, set by Customer.io when you add a person."
}
}
}
],
"description": "Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`."
},
"queue_draft": {
"type": "boolean",
"default": false,
"description": "If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message."
},
"message_data": {
"type": "object",
"example": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"description": "An object containing the key-value pairs referenced using liquid in your message.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Liquid Data"
}
},
"send_to_unsubscribed": {
"type": "boolean",
"default": true,
"description": "If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your `transactional_message_id`."
},
"disable_message_retention": {
"type": "boolean",
"default": false,
"description": "If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your `transactional_message_id`."
}
}
},
{
"type": "object",
"properties": {
"to": {
"type": "string",
"example": "cool.person@example.com",
"description": "The message recipient(s). Supports multiple addresses separated by commas. Your request can contain up to 15 total recipients between the `to` and `bcc` keys.\n\nYou can include a display or \"friendly\" name in \"to\" address, but we recommend that you use quotation marks around the friendly name to avoid potential issues with special characters, e.g. `\\\"Person\\\" <person@example.com>`. \n"
},
"bcc": {
"type": "string",
"example": "bcc@example.com",
"description": "Blind copy message recipients. Supports multiple addresses separated by commas. Your request can contain up to 15 total recipients between the `to` and `bcc` keys."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"tracked": {
"type": "boolean",
"default": true,
"description": "If true, Customer.io tracks opens and link clicks in your message."
},
"fake_bcc": {
"type": "boolean",
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"description": "The address that recipients can reply to, if different from the `from` address."
},
"preheader": {
"type": "string",
"description": "Also known as \"preview text\", this is the block block of text that users see next to, or underneath, the subject line in their inbox."
},
"body_plain": {
"type": "string",
"description": "By default, we generate a plaintext version of your message body for each delivery. Use this key to override the default plain text body."
},
"attachments": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"type": "string",
"format": "base64",
"x-doNotRender": true,
"x-additionalPropertiesName": "Attachment Names"
}
},
"description": "A dictionary of attachments where the filename is the key and the value is the base64-encoded contents. The total size of all attachments must be less than 2 MB. Some filetype extensions are restricted.\n"
},
"disable_css_preprocessing": {
"type": "boolean",
"default": false,
"example": false,
"description": "Set to `true` to disable CSS preprocessing. This setting overrides the CSS preprocessing setting on the `transactional_message_id` as set in the user interface. Transactional emails have CSS preprocessing enabled by default."
}
}
}
],
"title": "Without template",
"example": {
"to": "cool.person@example.com",
"bcc": "bcc@example.com",
"body": "Your temporary password is {{message_data.password_reset_token}}",
"from": "Support <support@example.com>",
"subject": "Your password reset request!",
"tracked": true,
"identifiers": {
"id": 12345
},
"queue_draft": false,
"message_data": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"send_to_unsubscribed": true,
"disable_css_preprocessing": true,
"disable_message_retention": false
},
"description": "Create your own message from scratch."
}
],
"description": "The payload of a transactional message."
}
SendMessagesTransactionalEmailResponse
{
"type": "object",
"properties": {
"queued_at": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the message is sent."
},
"delivery_id": {
"type": "string",
"description": "A unique identifier for the message."
}
}
}
SendMessagesTransactionalPush400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Describes the error that caused your request to fail."
}
},
"description": "Contains errors."
}
}
}
SendMessagesTransactionalPushRequest
{
"allOf": [
{
"type": "object",
"required": [
"transactional_message_id"
],
"properties": {
"transactional_message_id": {
"oneOf": [
{
"type": "integer",
"title": "ID (integer)",
"example": 44,
"description": "The ID of the transactional message you want to send."
},
{
"type": "string",
"title": "Trigger Name (string)",
"example": "pwdreset",
"description": "The name of trigger for the transactional message you want to send; you set the trigger name in the *Configure Settings* step when setting up your message. This is case insensitive."
}
],
"description": "The transactional message template that you want to use for your message. You can call the template by its numerical ID or by the *Trigger Name* that you assigned the template (case insensitive)."
}
}
},
{
"type": "object",
"properties": {
"to": {
"enum": [
"all",
"last_used",
"$device_token"
],
"type": "string",
"default": "all",
"description": "The person's device(s) you want to send this push to. One of `all`, `last_used`, or a custom device token which belongs to the profile from the Identifiers block. Defaults to 'all'. This overrides To from the transactional template (referenced by `transactional_message_id`)."
},
"link": {
"type": "string",
"description": "A deep link to open when the push is tapped. This overrides Link from the transactional template (referenced by `transactional_message_id`)."
},
"sound": {
"enum": [
"default",
"none"
],
"type": "string",
"default": "default",
"description": "**For iOS Only**: your notification can alert users with the device's default notification sound or play no sound at all. \n"
},
"title": {
"type": "string",
"description": "The title for your notification. This overrides the title of the transactional template (referenced by `transactional_message_id`)."
},
"message": {
"type": "string",
"description": "The message body for your notification. This overrides the notification body of the transactional template (referenced by `transactional_message_id`)."
},
"language": {
"type": "string",
"description": "Overrides language preferences for the person you want to send your transactional message to. Use one of our [supported two- or four-letter language codes](https://customer.io/docs/api/app/)."
},
"image_url": {
"type": "string",
"description": "An image URL to show in the push. This overrides Image from the transactional template (referenced by `transactional_message_id`)."
},
"custom_data": {
"type": "object",
"description": "An optional list of key/value pairs to attach to the push payload. Due to a Firebase limitation we only support sending string key value pairs. This overrides Custom Data from the transactional template (referenced by `transactional_message_id`)."
},
"custom_device": {
"allOf": [
{
"type": "object",
"required": [
"token"
],
"properties": {
"token": {
"type": "string",
"description": "The device token."
}
}
},
{
"type": "object",
"required": [
"platform"
],
"properties": {
"platform": {
"enum": [
"ios",
"android"
],
"type": "string",
"description": "The device/messaging platform."
},
"last_used": {
"type": "integer",
"format": "unix timestamp",
"description": "The `timestamp` when you last identified this device. If you don't pass a timestamp when you add or update a device, we use the time of the request itself. Our SDKs identify a device when a person launches their app."
},
"attributes": {
"type": "object",
"properties": {
"device_os": {
"type": "string",
"description": "The operating system, including the version, on the device."
},
"app_version": {
"type": "string",
"description": "The version of your app that a customer uses. You might target app versions to let people know when they need to update, or expose them to new features when they do."
},
"_last_status": {
"enum": [
"",
"bounced",
"sent",
"suppressed"
],
"type": "string",
"readOnly": true,
"description": "The delivery status of the last message sent to the device—sent, bounced, or suppressed. An empty string indicates that that the device hasn't received a push yet."
},
"device_model": {
"type": "string",
"description": "The model of the device a person uses."
},
"push_enabled": {
"enum": [
"true",
"false"
],
"type": "string",
"description": "If `\"true\"`, the device is opted-in and can receive push notifications."
},
"device_locale": {
"type": "string",
"description": "The four-letter [IETF language code](https://customer.io/docs/api/app/) for the device. For example, `en-MX` (indicating an app in Spanish formatted for a user in Mexico) or `es-ES` (indicating an app in Spanish formatted for a user in Spain)."
},
"cio_sdk_version": {
"type": "string",
"description": "The version of the Customer.io SDK in the app."
}
},
"description": "Attributes that you can reference to segment your audience—like a person's attributes, but specific to a device. These can be either the attributes defined below or custom key-value attributes.",
"additionalProperties": {
"type": "string",
"description": "Custom properties that you want to associate with the device.",
"x-additionalPropertiesName": "Custom Device Attributes"
}
}
},
"description": "Device information common to the v1 and v2 APIs."
}
],
"description": "A device to perform an upsert operation at the time of send. The device will be added/updated on the profile from the Identifiers block."
},
"custom_payload": {
"type": "object",
"properties": {
"ios": {
"oneOf": [
{
"type": "object",
"title": "FCM",
"required": [
"message"
],
"properties": {
"message": {
"type": "object",
"required": [
"apns"
],
"properties": {
"apns": {
"type": "object",
"required": [
"payload"
],
"properties": {
"headers": {
"type": "object",
"description": "Headers defined by [Apple's payload reference](https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns) that you want to pass through FCM."
},
"payload": {
"type": "object",
"properties": {
"CIO": {
"type": "object",
"required": [
"push"
],
"properties": {
"push": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The body of your push notification."
},
"link": {
"type": "string",
"description": "A deep link (to a page in your app), or a link to a web page."
},
"image": {
"type": "string",
"description": "The URL of an HTTPS image that you want to use for your message."
},
"title": {
"type": "string",
"description": "The title of your push notification."
}
},
"description": "A push payload for the iOS SDK."
}
},
"description": "Contains properties interpreted by the Customer.io iOS SDK."
},
"aps": {
"type": "object",
"properties": {
"alert": {
"oneOf": [
{
"type": "string",
"title": "Simple alert",
"description": "A simple alert message."
},
{
"type": "object",
"title": "Complex alert",
"properties": {
"body": {
"type": "string",
"description": "The body of your push notification."
},
"title": {
"type": "string",
"description": "The title of your push notification."
},
"loc-key": {
"type": "string",
"description": "The key for a localized message string in your app’s Localizable.strings file."
},
"loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your message text. Each %@ character in the loc-key is replaced by a value from this array, in the order they appear in the message body."
},
"subtitle": {
"type": "string",
"description": "Additional information that explains the purpose of the notification."
},
"launch-image": {
"type": "string",
"description": "The name of the launch image file you want to display. When a user launches your app, they'll see this image or storyboard file rather than your app’s normal launch image."
},
"title-loc-key": {
"type": "string",
"description": "The key for a localized title string in your app’s Localizable.strings files."
},
"title-loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your title string. Each %@ character in the title-loc-key is replaced by a value from this array, in the order they appear in the title string."
},
"subtitle-loc-key": {
"type": "string",
"description": "The key for a localized subtitle string in your app’s Localizable.strings file."
},
"subtitle-loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your subtitle string. Each %@ character in the subtitle-loc-key is replaced by a value from this array, in the order they appear in the subtitle string."
}
}
}
]
},
"badge": {
"type": "integer",
"description": "The number you want to display on your app's icon. Set to 0 to remove the current badge, if any."
},
"sound": {
"oneOf": [
{
"type": "string",
"title": "Regular alert",
"description": "The name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s container directory. Use “default” to play the system sound. For critical alerts, you'll pass an object instead."
},
{
"type": "object",
"title": "Critical alert",
"properties": {
"name": {
"type": "string",
"description": "The name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s container directory. Use “default” to play the system sound."
},
"volume": {
"type": "number",
"description": "The volume for a critical alert between 0 and 1, where 0 is silent and 1 is full volume."
},
"critical": {
"type": "integer",
"description": "1 indicates critical. 0 is not critical."
}
}
}
]
},
"category": {
"type": "string",
"description": "The notification’s type. This string must correspond to the identifier of one of the `UNNotificationCategory` objects you register at launch time."
},
"thread-id": {
"type": "string",
"description": "An identifier to group related notifications."
},
"mutable-content": {
"type": "integer",
"description": "The notification service app extension flag. If the value is 1, your notification is passed to your notification service app extension before delivery. Use your extension to modify the notification’s content."
},
"relevance-score": {
"type": "number",
"description": "A number between 0 and 1. The highest score is considered the \"most relevant\" and is featured in the notification summary."
},
"content-available": {
"type": "integer",
"description": "The background notification flag. Use `1` without an `alert` to perform a silent update. `0` indicates a normal push notification."
},
"target-content-id": {
"type": "string",
"description": "The identifier of the window brought forward."
},
"interruption-level": {
"enum": [
"passive",
"active",
"time-sensitive",
"critical"
],
"type": "string",
"description": "Indicates the importance and delivery timing of a notification."
}
},
"description": "A push payload intended for an iOS device."
}
},
"description": "Contains a push payload.",
"additionalProperties": {
"description": "Additional properties that you've set up your app to interpret outside of the Customer.io SDK.",
"x-additionalPropertiesName": "Custom key-value pairs"
}
}
},
"description": "Defines a payload for iOS devices sent through Firebase Cloud Messaging (FCM)."
}
},
"description": "The base object for all FCM payloads."
}
}
},
{
"type": "object",
"title": "APNS",
"properties": {
"CIO": {
"type": "object",
"required": [
"push"
],
"properties": {
"push": {
"type": "object",
"properties": {
"link": {
"type": "string",
"description": "A deep link (to a page in your app), or a link to a web page."
},
"image": {
"type": "string",
"description": "The URL of an HTTPS image that you want to use for your message."
}
},
"description": "Describes push notification options supported by the CIO SDK."
}
},
"description": "Contains options supported by the Customer.io SDK."
},
"aps": {
"type": "object",
"properties": {
"alert": {
"oneOf": [
{
"type": "string",
"title": "Simple alert",
"description": "A simple alert message."
},
{
"type": "object",
"title": "Complex alert",
"properties": {
"body": {
"type": "string",
"description": "The body of your push notification."
},
"title": {
"type": "string",
"description": "The title of your push notification."
},
"loc-key": {
"type": "string",
"description": "The key for a localized message string in your app’s Localizable.strings file."
},
"loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your message text. Each %@ character in the loc-key is replaced by a value from this array, in the order they appear in the message body."
},
"subtitle": {
"type": "string",
"description": "Additional information that explains the purpose of the notification."
},
"launch-image": {
"type": "string",
"description": "The name of the launch image file you want to display. When a user launches your app, they'll see this image or storyboard file rather than your app’s normal launch image."
},
"title-loc-key": {
"type": "string",
"description": "The key for a localized title string in your app’s Localizable.strings files."
},
"title-loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your title string. Each %@ character in the title-loc-key is replaced by a value from this array, in the order they appear in the title string."
},
"subtitle-loc-key": {
"type": "string",
"description": "The key for a localized subtitle string in your app’s Localizable.strings file."
},
"subtitle-loc-args": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of replacement value strings for variables in your subtitle string. Each %@ character in the subtitle-loc-key is replaced by a value from this array, in the order they appear in the subtitle string."
}
}
}
]
},
"badge": {
"type": "integer",
"description": "The number you want to display on your app's icon. Set to 0 to remove the current badge, if any."
},
"sound": {
"oneOf": [
{
"type": "string",
"title": "Regular alert",
"description": "The name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s container directory. Use “default” to play the system sound. For critical alerts, you'll pass an object instead."
},
{
"type": "object",
"title": "Critical alert",
"properties": {
"name": {
"type": "string",
"description": "The name of a sound file in your app’s main bundle or in the Library/Sounds folder of your app’s container directory. Use “default” to play the system sound."
},
"volume": {
"type": "number",
"description": "The volume for a critical alert between 0 and 1, where 0 is silent and 1 is full volume."
},
"critical": {
"type": "integer",
"description": "1 indicates critical. 0 is not critical."
}
}
}
]
},
"category": {
"type": "string",
"description": "The notification’s type. This string must correspond to the identifier of one of the `UNNotificationCategory` objects you register at launch time."
},
"thread-id": {
"type": "string",
"description": "An identifier to group related notifications."
},
"mutable-content": {
"type": "integer",
"description": "The notification service app extension flag. If the value is 1, your notification is passed to your notification service app extension before delivery. Use your extension to modify the notification’s content."
},
"relevance-score": {
"type": "number",
"description": "A number between 0 and 1. The highest score is considered the \"most relevant\" and is featured in the notification summary."
},
"content-available": {
"type": "integer",
"description": "The background notification flag. Use `1` without an `alert` to perform a silent update. `0` indicates a normal push notification."
},
"target-content-id": {
"type": "string",
"description": "The identifier of the window brought forward."
},
"interruption-level": {
"enum": [
"passive",
"active",
"time-sensitive",
"critical"
],
"type": "string",
"description": "Indicates the importance and delivery timing of a notification."
}
},
"description": "A push payload intended for an iOS device."
}
}
}
],
"description": "Your payload changes depending on whether you send to iOS devices through Google's Firebase Cloud Messaging (FCM) or Apple's Push Notification service (APNs)."
},
"android": {
"type": "object",
"required": [
"message"
],
"properties": {
"message": {
"type": "object",
"properties": {
"data": {
"type": "object",
"description": "Contains key-value pairs that your app interprets.",
"additionalProperties": {
"type": "string",
"x-doNotRender": true,
"x-additionalPropertiesName": "Attachment Names"
}
},
"android": {
"type": "object",
"properties": {
"notification": {
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Identifier to replace existing notifications in the notification drawer. If empty, each request creates a new notification.\n\nIf you specify a tag, and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. \n"
},
"icon": {
"type": "string",
"description": "Sets the notification icon to `myicon` for drawable resource `myicon`. If you don't send this key, FCM displays the launcher icon from your app manifest."
},
"color": {
"type": "string",
"description": "The notification's icon color in `#rrggbb` format."
},
"sound": {
"type": "string",
"description": "The sound that plays when the device receives the notification. Supports `\"default\"` or the filename of a sound resource bundled in your app. Sound files must reside in `/res/raw/`."
},
"body_loc_arg": {
"type": "string",
"description": "Variable string values used in place of the format specifiers in `body_loc_key` to localize the body text to the user's current localization. See Formatting and Styling for more information."
},
"body_loc_key": {
"type": "string",
"description": "The key to the body string in the app's string resources that you want to use to localize the body text to the user's current localization. See [String Resources](https://developer.android.com/guide/topics/resources/string-resource/) for more information."
},
"click_action": {
"type": "string",
"description": "The action that occurs when a user taps on the notification. Launches an activity with a matching intent filter when a person taps the notification."
},
"title_loc_arg": {
"type": "string",
"description": "Variable string values used in place of the format specifiers in `title_loc_key` to localize the title text to the user's current localization. See Formatting and Styling for more information."
},
"title_loc_key": {
"type": "string",
"description": "The key to the title string in the app's string resources that you want to use to localize the title text to the user's current localization. See [String Resources](https://developer.android.com/guide/topics/resources/string-resource/) for more information."
}
},
"description": "Properties supported specifically by Android on FCM."
}
},
"description": "Contains custom push options for your notification."
},
"notification": {
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The body of your push notification."
},
"title": {
"type": "string",
"description": "The title of your push notification."
}
},
"description": "Contains the push body and title."
}
},
"description": "The parent object for Android custom push payloads."
}
},
"description": "A custom push payload for Android devices."
}
},
"description": "An optional list of key/value pairs to attach to the push payload. Due to a Firebase limitation we only support sending string key value pairs. This overrides every other parameter, including any Custom Payload from the transactional template (referenced by `transactional_message_id`)."
}
}
},
{
"type": "object",
"required": [
"to",
"identifiers"
],
"properties": {
"send_at": {
"type": "integer",
"description": "A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately."
},
"identifiers": {
"oneOf": [
{
"type": "object",
"title": "id",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"example": 12345,
"description": "The identifier for the person represented by the transactional message. **NOTE**: If your workspace identifies people by email, use the `email` identifier instead.\n"
}
}
},
{
"type": "object",
"title": "email",
"required": [
"email"
],
"properties": {
"email": {
"type": "string",
"example": "cool.person@example.com",
"description": "The identifier for the person represented by the transactional message. Use this option if your workspace identifies people by email rather than by `id`."
}
}
},
{
"type": "object",
"title": "cio_id",
"required": [
"cio_id"
],
"properties": {
"cio_id": {
"type": "string",
"example": 3000001,
"description": "A unique, immutable identifier for a person, set by Customer.io when you add a person."
}
}
}
],
"description": "Identifies the person represented by your transactional message by one of, and only one of, `id`, `email`, or `cio_id`."
},
"queue_draft": {
"type": "boolean",
"default": false,
"description": "If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message."
},
"message_data": {
"type": "object",
"example": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"description": "An object containing the key-value pairs referenced using liquid in your message.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Liquid Data"
}
},
"send_to_unsubscribed": {
"type": "boolean",
"default": true,
"description": "If false, your message is not sent to unsubscribed recipients. Setting this value overrides the value set in the settings of your `transactional_message_id`."
},
"disable_message_retention": {
"type": "boolean",
"default": false,
"description": "If true, the message body is not retained in delivery history. Setting this value overrides the value set in the settings of your `transactional_message_id`."
}
}
}
],
"example": {
"title": "Did you really login from a new location?",
"identifiers": {
"id": 12345
},
"message_data": {
"account_id": "123dj",
"password_reset_token": "abcde-12345-fghij-d888"
},
"transactional_message_id": 44
},
"description": "The payload of a transactional push message."
}
SendMessagesTransactionalPushResponse
{
"type": "object",
"properties": {
"queued_at": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the message is sent."
},
"delivery_id": {
"type": "string",
"description": "A unique identifier for the message."
}
}
}
SendMessagesTriggerBroadcast422Response
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"detail": {
"type": "string",
"example": "Errors were found while processing per user data (ids, emails or json data). More detail available from the errors endpoint for trigger 12\"",
"description": "Describes the error and provides the trigger ID you can use to look up more information."
},
"source": {
"type": "object",
"properties": {
"pointer": {
"type": "string",
"example": "/data/attributes/per_user_data",
"description": "Points to the key in your payload that contained validation errors."
}
}
},
"status": {
"enum": [
"422"
],
"type": "string",
"example": "422",
"description": "The error code."
}
}
},
"description": "Contains one or more validation errors found in your request payload."
}
}
}
SendMessagesTriggerBroadcastRequest
{
"oneOf": [
{
"type": "object",
"title": "Default audience",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
},
"description": "Send your broadcast to the default set of recipients defined in the UI."
},
{
"allOf": [
{
"type": "object",
"required": [
"recipients"
],
"properties": {
"recipients": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"type": "object",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *any* conditions."
},
"not": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
},
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"type": "object",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *all* conditions."
},
"not": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
},
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
},
"description": "Match *any* condition to return results."
}
}
},
{
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"type": "object",
"title": "People Filter",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *any* conditions."
},
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *all* conditions."
},
"not": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
},
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "When filtering for people, you can use `and` and `or` arrays to determine the logic for a group of filter conditions. `not` reverses the filter condition and matches when the condition is false. `segment` and `attribute` represent the individual conditions you can filter a group of people for."
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"type": "object",
"title": "People Filter",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *any* conditions."
},
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *all* conditions."
},
"not": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
},
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "When filtering for people, you can use `and` and `or` arrays to determine the logic for a group of filter conditions. `not` reverses the filter condition and matches when the condition is false. `segment` and `attribute` represent the individual conditions you can filter a group of people for."
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"title": "not",
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
],
"title": "Audience Filter",
"description": "A filter defining the group of people that you want send the broadcast to."
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
}
}
],
"title": "Custom recipients",
"example": {
"data": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"recipients": {
"and": [
{
"segment": {
"id": 3
}
},
{
"or": [
{
"attribute": {
"field": "interest",
"value": "roadrunners",
"operator": "eq"
}
},
{
"attribute": {
"field": "state",
"value": "NM",
"operator": "eq"
}
},
{
"not": {
"attribute": {
"field": "species",
"value": "roadrunners",
"operator": "eq"
}
}
}
]
}
]
}
},
"description": "Send your broadcast to a group of people defined by a set of filters."
},
{
"allOf": [
{
"type": "object",
"required": [
"emails"
],
"properties": {
"emails": {
"type": "array",
"items": {
"type": "string",
"format": "email"
},
"example": [
"recipient1@example.com",
"anotherRecipient@example.com"
],
"description": "An array of email addresses you want to send the broadcast to. These addresses must already exist; your request cannot create a new person."
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
}
}
],
"title": "Emails",
"description": "An array of emails you want to send the broadcast to. These addresses must already exist; your request cannot create a new person."
},
{
"allOf": [
{
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"id1",
"id4"
],
"maxItems": 10000,
"description": "An array of IDs you want to send a broadcast to. **NOTE**: If your workspace identifies people by `email`, don't use this option. Identify your audience by `emails` instead.\n"
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
}
}
],
"title": "IDs",
"description": "An array of customer ids that you want to send the broadcast to. These IDs must already exist; your request cannot create a new person."
},
{
"allOf": [
{
"type": "object",
"required": [
"per_user_data"
],
"properties": {
"per_user_data": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"title": "ids",
"required": [
"id"
],
"properties": {
"id": {
"type": "string",
"example": 1,
"description": "The ID of the recipient."
},
"data": {
"type": "object",
"example": {
"lastName": "Mann",
"purchase": "shoes",
"firstName": "Hugh"
},
"description": "Merge data associated with the recipient.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Liquid merge data"
}
}
}
},
{
"type": "object",
"title": "emails",
"required": [
"email"
],
"properties": {
"data": {
"type": "object",
"example": {
"lastName": "Mann",
"purchase": "shoes",
"firstName": "Hugh"
},
"description": "Merge data associated with the recipient.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Liquid merge data"
}
},
"email": {
"type": "string",
"example": "recipient1@example.com",
"description": "The email address of the recipient. This address must be unique in your workspace. If more than one person has the same `email` attribute, your request will produce an error."
}
}
}
]
},
"example": [
{
"id": "wiley_coyoteX",
"data": {
"voucher_code": "FESwYm"
}
},
{
"data": {
"voucher_code": "cYm6XJ"
},
"email": "road@runner.net"
}
],
"maxItems": 10000,
"description": "An array of people you want to send a broadcast to and custom data for each person. Each object in the array represents a person, with additional data you want to use to personalize their message. **When you trigger a broadcast, the people in your request must already exist in your workspace.** Requests to trigger a broadcast cannot create new people. \n\n**Remove line-breaks from `per_user_data`**. We've added line breaks in examples to make the code easy to read, but you must remove line breaks (collapsing/uglifying your payload) to prevent errors.\n"
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
}
}
],
"title": "User Maps",
"description": "An array of JSON objects containing `id` or `email` keys and a `data` key. Each object represents a person you want to send the broadcast to and data you want to personalize their message with using liquid."
},
{
"allOf": [
{
"type": "object",
"required": [
"data_file_url"
],
"properties": {
"data_file_url": {
"type": "string",
"format": "url",
"example": "https://myFile.example.com",
"description": "The URL of a data file containing per-user data. Each line is a single object representing a person: either a json map of `id` and `data` or `email` and `data` keys. For example, `{\"email\":\"road@runner.net\",\"data\":{\"voucher_code\": \"coyote\"}}`.\n\nThe IDs or emails in your data file must already exist in your workspace. Your broadcast cannot add new people to your workspace and won't send messages for IDs or email addresses that don't match a person in your workspace.\n"
}
}
},
{
"type": "object",
"properties": {
"data": {
"type": "object",
"example": {
"date": 1511315635,
"text": "We received reports of a roadrunner in your immediate area! Head to your dashboard to view more information!",
"headline": "Roadrunner spotted in Albuquerque!"
},
"description": "Contains information you want to use to populate your broadcast.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in your message here.",
"x-additionalPropertiesName": "Broadcast liquid data"
}
},
"id_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false, a missing customer ID is an error."
},
"email_add_duplicates": {
"type": "boolean",
"default": false,
"description": "an email address associated with more than one profile id is an error."
},
"email_ignore_missing": {
"type": "boolean",
"default": false,
"description": "If false a missing email address is an error."
}
}
}
],
"title": "Data file URL",
"description": "The URL of a data file containing per-user data, each line containing a json map with either `id` and `data` or `email` and `data` keys. **When you trigger a broadcast, the people represented by `id` and `email` must already exist in your workspace.** Requests to trigger a broadcast cannot create new people.\n"
}
]
}
SendMessagesTriggerBroadcastResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 3,
"description": "The `trigger_id` for this operation. You can use this ID to get the status of your broadcast or [check for errors](https://customer.io/docs/api/app/)."
}
}
}
SenderIdentitiesGetSenderInfoResponse
{
"type": "object",
"properties": {
"sender_identity": {
"type": "object",
"example": {
"id": 4534,
"name": "Cher Ami",
"email": "test@example.com",
"address": "Cher Ami <test@example.com>",
"template_type": "email",
"auto_generated": false,
"deduplicate_id": "4534:1478035647"
},
"properties": {
"id": {
"type": "integer",
"description": "The identifier of a sender."
},
"name": {
"type": "string",
"description": "The name of the sender."
},
"email": {
"type": "string",
"description": "The email address of the sender."
},
"address": {
"type": "string",
"description": "The sender name and email address in the format `name <name@example.com>`."
},
"template_type": {
"enum": [
"email",
"phone"
],
"type": "string",
"description": "The type of sender."
},
"auto_generated": {
"type": "boolean",
"description": "If true, the sender is automatically generated by Customer.io."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
}
},
"description": "Information about a sender."
}
}
}
SenderIdentitiesGetUsageDataResponse
{
"type": "object",
"properties": {
"campaigns": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The campaigns that use the sender."
},
"sent_newsletters": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The newsletters you've sent that used the sender."
},
"draft_newsletters": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The newsletter drafts that are set up using the sender."
}
}
}
SenderIdentitiesListResponse
{
"type": "object",
"properties": {
"sender_identities": {
"type": "array",
"items": {
"type": "object",
"example": {
"id": 4534,
"name": "Cher Ami",
"email": "test@example.com",
"address": "Cher Ami <test@example.com>",
"template_type": "email",
"auto_generated": false,
"deduplicate_id": "4534:1478035647"
},
"properties": {
"id": {
"type": "integer",
"description": "The identifier of a sender."
},
"name": {
"type": "string",
"description": "The name of the sender."
},
"email": {
"type": "string",
"description": "The email address of the sender."
},
"address": {
"type": "string",
"description": "The sender name and email address in the format `name <name@example.com>`."
},
"template_type": {
"enum": [
"email",
"phone"
],
"type": "string",
"description": "The type of sender."
},
"auto_generated": {
"type": "boolean",
"description": "If true, the sender is automatically generated by Customer.io."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
}
},
"description": "Information about a sender."
}
}
}
}
SnippetsCreateOrUpdateRequest
{
"type": "object",
"example": {
"name": "address",
"value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111",
"updated_at": 1582500000
},
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the snippet, must be unique."
},
"value": {
"type": "string",
"description": "The contents of the snippet."
},
"updated_at": {
"type": "integer",
"format": "unix timestamp",
"readOnly": true,
"description": "The last date-time the snippet was updated."
}
},
"description": "describes a piece of reusable content. You must provide a name for the snippet and the `value`—the content that appears in messages that use the snippet."
}
SnippetsCreateOrUpdateResponse
{
"type": "object",
"properties": {
"snippet": {
"type": "object",
"example": {
"name": "address",
"value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111",
"updated_at": 1582500000
},
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the snippet, must be unique."
},
"value": {
"type": "string",
"description": "The contents of the snippet."
},
"updated_at": {
"type": "integer",
"format": "unix timestamp",
"readOnly": true,
"description": "The last date-time the snippet was updated."
}
},
"description": "describes a piece of reusable content. You must provide a name for the snippet and the `value`—the content that appears in messages that use the snippet."
}
}
}
SnippetsListResponse
{
"type": "object",
"properties": {
"snippets": {
"type": "array",
"items": {
"type": "object",
"example": {
"name": "address",
"value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111",
"updated_at": 1582500000
},
"required": [
"name",
"value"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the snippet, must be unique."
},
"value": {
"type": "string",
"description": "The contents of the snippet."
},
"updated_at": {
"type": "integer",
"format": "unix timestamp",
"readOnly": true,
"description": "The last date-time the snippet was updated."
}
},
"description": "describes a piece of reusable content. You must provide a name for the snippet and the `value`—the content that appears in messages that use the snippet."
}
}
}
}
SnippetsRemoveSnippetResponse
{
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"detail": {
"type": "string",
"example": "unable to delete snippet in use",
"description": "Describes the error."
},
"status": {
"type": "string",
"example": "400",
"description": "The HTTP status code."
}
}
},
"description": "Contains an array of error objects."
}
}
}
SubscriptionCenterListTopicsResponse
{
"type": "object",
"properties": {
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The system-generated id for the subscription topic. Also located on the subscription center landing page. These increment up by 1, starting with 1."
},
"name": {
"type": "string",
"example": "Product Updates",
"description": "The name of the subscription topic."
},
"identifier": {
"type": "string",
"example": "topic_4",
"description": "The key associated with the subscription topic. The format is `topic_<id>`."
},
"description": {
"type": "string",
"example": "For people who want updates on product releases.",
"description": "A description of the topic that you provided when you created the topic in the UI."
},
"subscribed_by_default": {
"type": "boolean",
"example": false,
"description": "If false, a person is opted-out by default. If true, a person is opted-in by default."
}
}
}
}
}
}
TransactionalGetMessageDeliveriesResponse
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"example": {
"id": "ag1q6QWq6QUBAAF4_CGoeVX7mFkDbRFu7ek=X",
"type": "email",
"created": 1619137767,
"metrics": {
"sent": 1619137768,
"delivered": 1619137768
},
"subject": "Did you get that thing I sent you?",
"action_id": 215,
"forgotten": false,
"recipient": "person@example.com",
"content_id": null,
"campaign_id": 23,
"customer_id": null,
"broadcast_id": null,
"newsletter_id": null,
"deduplicate_id": "ag1q6QWq6QUBAAF4_CGoeVX7mFkDbRFu7ek=:1619137768",
"failure_message": null,
"msg_template_id": 43,
"parent_action_id": null,
"trigger_event_id": null
},
"properties": {
"id": {
"type": "string",
"example": "dgOq6QWq6QUBAAF4_CGoeVX7mFkDbRFu7ek=",
"readOnly": true,
"description": "The identifier for a delivery—the instance of a message intended for an individual recipient."
},
"type": {
"enum": [
"email",
"webhook",
"twilio",
"slack",
"push"
],
"type": "string",
"example": "email",
"readOnly": true,
"description": "The type of message/action."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"metrics": {
"type": "object",
"properties": {
"sent": {
"type": "integer",
"description": "The timestamp when the message was `sent`."
},
"failed": {
"type": "integer",
"description": "The timestamp when the message `failed`."
},
"opened": {
"type": "integer",
"description": "The timestamp when the message was `opened`."
},
"bounced": {
"type": "integer",
"description": "The timestamp when the message `bounced`."
},
"clicked": {
"type": "integer",
"description": "The timestamp when the message was `clicked`."
},
"created": {
"type": "integer",
"description": "The timestamp when the message was `created`."
},
"drafted": {
"type": "integer",
"description": "The timestamp when the message was `drafted`."
},
"dropped": {
"type": "integer",
"description": "The timestamp when the message was `dropped`."
},
"spammed": {
"type": "integer",
"description": "The timestamp when the message was marked as spam."
},
"converted": {
"type": "integer",
"description": "The timestamp when the message was `converted`."
},
"delivered": {
"type": "integer",
"description": "The timestamp when the message was `delivered`."
},
"unsubscribed": {
"type": "integer",
"description": "The timestamp when a person unsubscribed based on this message."
},
"undeliverable": {
"type": "integer",
"description": "The timestamp when the message became `undeliverable`."
}
},
"description": "Metrics for an individual instance of a message; each item in the object represents the timestamp when a message achieved a particular metric. This object only contains metrics that have been recorded."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"action_id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"forgotten": {
"type": "boolean",
"description": "If true message contents are not retained by Customer.io."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"description": "The recipient address for an action."
},
"content_id": {
"type": "integer",
"example": 1,
"nullable": true,
"readOnly": true,
"description": "The identifier for a newsletter variant."
},
"campaign_id": {
"type": "integer",
"example": 5,
"nullable": true,
"description": "The identifier for a campaign."
},
"customer_id": {
"type": "string",
"example": "42",
"nullable": true,
"description": "The ID of a customer profile, analogous to a \"person\" in the UI. If your workspace supports multiple identifiers (email and ID), this value can be null."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"nullable": true,
"description": "The identifier for a broadcast."
},
"newsletter_id": {
"type": "integer",
"example": 10,
"nullable": true,
"description": "The identifier for a newsletter."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
},
"failure_message": {
"type": "string",
"nullable": true,
"description": "Explains why a message failed, if applicable."
},
"parent_action_id": {
"type": "integer",
"example": 1,
"readOnly": true,
"description": "The ID of the parent action, if the action occurred within a campaign and has a parent (like a randomized split, etc)."
},
"trigger_event_id": {
"type": "string",
"example": "21E4C3CT6YDC7Y4N7FE1GWWABC",
"nullable": true,
"description": "The id of the event that triggered an event-triggered campaign (not an API-triggered broadcast)."
},
"message_template_id": {
"type": "integer",
"readOnly": true,
"deprecated": true,
"description": "The identifier of the message template used to create a message."
},
"customer_identifiers": {
"type": "object",
"required": [
"email",
"id",
"cio_id"
],
"properties": {
"id": {
"type": "string",
"example": 2,
"nullable": true,
"description": "A person's unique ID, if set. This is the same as the `customer_id` if present."
},
"email": {
"type": "string",
"format": "email",
"example": "test@example.com",
"nullable": true,
"description": "A person's email address, if set."
},
"cio_id": {
"type": "string",
"example": "a3000001",
"description": "A unique identifier set by Customer.io, used to reference a person if you want to update their identifiers."
}
},
"description": "Contains identifiers for the person represented in a response—`id`, `cio_id`, and `email` (if your workspace uses the *Email or ID* setting). If the person's `id` or `email` is not set, the value will be null.\n\nWe recommend that you use this object rather than the less descriptive `customer_id`.\n"
}
},
"description": "Describes an individual message delivery. The object contains keys for all possible parents of the message (`newsletter_id`, `broadcast_id`, etc) but only the parents of the delivery are populated. Other parent IDs are null."
},
"example": [
{
"id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=X",
"type": "email|push",
"created": 1609957805,
"metrics": {
"sent": 1609957832,
"delivered": 1609957872
},
"subject": "Reset your password",
"action_id": null,
"forgotten": false,
"recipient": "person@example.com",
"content_id": null,
"campaign_id": null,
"customer_id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7d",
"identifiers": {
"id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7dX",
"email": "person@example.com",
"cio_id": 786433
},
"broadcast_id": null,
"newsletter_id": null,
"deduplicate_id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=:1609957872",
"failure_message": null,
"msg_template_id": 589
}
]
}
}
}
TransactionalGetMessageInfoResponse
{
"type": "object",
"properties": {
"message": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 2,
"description": "The identifier Customer.io assigned to the transactional message"
},
"name": {
"type": "string",
"example": "password reset",
"description": "The name you set for the transactional message."
},
"created_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"description": {
"type": "string",
"example": "sends a temporary password and lets the customer reset their password.",
"description": "A description of the transactional message."
},
"queue_drafts": {
"type": "boolean",
"description": "If true, messages do not send automatically, and queue as drafts instead. You must send drafts through the *Deliveries & Drafts* page in the user interface."
},
"link_tracking": {
"type": "boolean",
"description": "If true, link tracking is enabled for this message."
},
"open_tracking": {
"type": "boolean",
"description": "If true, open-tracking is enabled for this message."
},
"hide_message_body": {
"type": "boolean",
"description": "If true, message contents are not retained in delivery history—you cannot recall the exact contents of the message."
},
"send_to_unsubscribed": {
"type": "boolean",
"description": "If true, people with an `unsubscribed` attribute set to `true` can trigger the message."
}
},
"description": "Contains information about a transactional message."
}
}
}
TransactionalGetMessageLinkMetricsResponse
{
"type": "object",
"properties": {
"links": {
"type": "array",
"items": {
"type": "object",
"properties": {
"link": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1234,
"description": "The ID of the link."
},
"href": {
"type": "string",
"example": "https://customer.io/docs",
"description": "The link destination—a URL, mailto, etc."
}
}
},
"metric": {
"type": "object",
"properties": {
"series": {
"type": "object",
"properties": {
"clicked": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
1,
3,
5,
7
],
"description": "An array of results from oldest to newest, where each result indicates a period."
}
}
}
},
"description": "Contains metrics for the link."
}
}
}
}
}
}
TransactionalGetMessageMetricsResponse
{
"type": "object",
"properties": {
"metric": {
"type": "object",
"properties": {
"series": {
"type": "object",
"properties": {
"sent": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of sent messages."
},
"failed": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `failed` messages."
},
"opened": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `opened` messages."
},
"bounced": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `bounced` messages."
},
"clicked": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `clicked` messages."
},
"created": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `created` messages."
},
"drafted": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `drafted` messages."
},
"spammed": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of spam complaints."
},
"deferred": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `deferred` messages."
},
"attempted": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `attempted` messages."
},
"converted": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `converted` messages."
},
"delivered": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `delivered` messages."
},
"suppressed": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `suppressed` messages."
},
"unsubscribed": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of unsubscribes attributed to the campaign or message."
},
"undeliverable": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of `undeliverable` messages."
},
"topic_unsubscribed": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The number of topic unsubscribes in a given period."
}
},
"description": "Returns metrics in accordance with the `period` you requested. Each property in this object is an array and each entry in the array represents a metric period, i.e. if your `period` is days `[0, 1]` would represent 0 metrics for the first day, 1 for the second, etc."
}
}
}
}
}
TransactionalGetMessageTranslationResponse
{
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
},
"description": "The object represents a variant."
}
}
}
TransactionalListContentVariants400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Describes the error that caused your request to fail."
}
},
"description": "Contains errors."
}
}
}
TransactionalListContentVariantsResponse
{
"type": "object",
"properties": {
"contents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
},
"description": "Each object represents one of the variants."
}
}
}
TransactionalListMessagesResponse
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 2,
"description": "The identifier Customer.io assigned to the transactional message"
},
"name": {
"type": "string",
"example": "password reset",
"description": "The name you set for the transactional message."
},
"created_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"description": {
"type": "string",
"example": "sends a temporary password and lets the customer reset their password.",
"description": "A description of the transactional message."
},
"queue_drafts": {
"type": "boolean",
"description": "If true, messages do not send automatically, and queue as drafts instead. You must send drafts through the *Deliveries & Drafts* page in the user interface."
},
"link_tracking": {
"type": "boolean",
"description": "If true, link tracking is enabled for this message."
},
"open_tracking": {
"type": "boolean",
"description": "If true, open-tracking is enabled for this message."
},
"hide_message_body": {
"type": "boolean",
"description": "If true, message contents are not retained in delivery history—you cannot recall the exact contents of the message."
},
"send_to_unsubscribed": {
"type": "boolean",
"description": "If true, people with an `unsubscribed` attribute set to `true` can trigger the message."
}
},
"description": "Contains information about a transactional message."
}
}
}
}
TransactionalUpdateMessageContent400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Describes the error that caused your request to fail."
}
},
"description": "Contains errors."
}
}
}
TransactionalUpdateMessageContentRequest
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
}
TransactionalUpdateMessageContentResponse
{
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
},
"description": "The object includes the transactional message content and metadata."
}
}
}
TransactionalUpdateTranslation400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Describes the error that caused your request to fail."
}
},
"description": "Contains errors."
}
}
}
TransactionalUpdateTranslationRequest
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
}
TransactionalUpdateTranslationResponse
{
"type": "object",
"properties": {
"content": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Receipt",
"readOnly": true,
"description": "The name of the transactional message."
},
"type": {
"enum": [
"email",
"push"
],
"type": "string",
"readOnly": true,
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"readOnly": true,
"description": "The recipient address for an action."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
}
}
},
"description": "Each object represents one of the variants."
}
}
}
WorkspacesListWorkspacesResponse
{
"type": "object",
"properties": {
"workspaces": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 13,
"description": "The id of the workspace."
},
"name": {
"type": "string",
"example": "Workspace 1",
"description": "The name of the workspace."
},
"people": {
"type": "integer",
"example": 25666,
"description": "The current count of people profiles in the workspace. Updates roughly every hour."
},
"objects": {
"type": "integer",
"example": 10,
"description": "The current count of object profiles in the workspace. Updates roughly every hour."
},
"object_types": {
"type": "integer",
"example": 4,
"description": "The current count of object types in the workspace. Updates roughly every hour."
},
"messages_sent": {
"type": "integer",
"example": 100202,
"description": "The count of [messages sent](https://customer.io/docs/api/app/) via any channel (email, SMS, in-app, push, slack) in the current billing period."
},
"billable_messages_sent": {
"type": "integer",
"example": 75124,
"description": "The count of [emails sent](https://customer.io/docs/api/app/) that are considered for billing in your current billing period. Ultimately, we only bill for the overages on your plan."
}
},
"description": "Contains workspace properties including the count of messages, people, and objects. Customer.io caches these counts, so your data may be up to two hours old."
}
}
}
}
actionObject
{
"oneOf": [
{
"type": "object",
"title": "Email / message",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"bcc": {
"type": "string",
"readOnly": true,
"description": "The blind-copy address(es) for this action."
},
"body": {
"type": "string",
"description": "The body of the action. For emails, this is the HTML-body of a message. You cannot modify the body if you created it with our drag-and-drop editor."
},
"from": {
"type": "string",
"example": "sentFrom@example.com",
"readOnly": true,
"description": "The address that the message is from, relevant if the action `type` is `email`."
},
"name": {
"type": "string",
"example": "Opening Message",
"readOnly": true,
"description": "The name of the action, if it exists."
},
"type": {
"enum": [
"email",
"in_app",
"push",
"twilio",
"slack"
],
"type": "string",
"readOnly": true,
"description": "The type of action."
},
"layout": {
"type": "string",
"readOnly": true,
"description": "The layout used for the action, if it exists."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"from_id": {
"type": "integer",
"example": 1,
"description": "The identifier of the `from` address, commonly known as the \"sender\". You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"subject": {
"type": "string",
"example": "Did you get that thing I sent you?",
"description": "The subject line for an `email` action."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"body_amp": {
"type": "string",
"description": "If your message is an email, this is the AMP-enabled body of your message. If your recipient's email client doesn't support AMP, the `body` represents your fallback message."
},
"fake_bcc": {
"type": "boolean",
"readOnly": true,
"description": "If true, rather than sending true copies to BCC addresses, Customer.io sends a copy of the message with the subject line containing the recipient address(es).\n"
},
"language": {
"type": "string",
"example": "fr",
"readOnly": true,
"description": "The language variant for your message. If you don't use our [localization feature](https://customer.io/docs/api/app/), or this is the default message, this value is an empty string."
},
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"readOnly": true,
"description": "The address that receives replies for the message, if applicable."
},
"recipient": {
"type": "string",
"example": "{{customer.email}}",
"description": "The recipient address for an action."
},
"campaign_id": {
"type": "integer",
"example": 5,
"readOnly": true,
"description": "The identifier for a campaign."
},
"reply_to_id": {
"type": "integer",
"example": 38,
"nullable": true,
"description": "The identifier for the `reply_to` address, if applicable. You can [list your sender identities](https://customer.io/docs/api/app/) to match the ID to a specific address."
},
"preprocessor": {
"enum": [
"premailer"
],
"type": "string",
"readOnly": true,
"description": "By default, we process CSS before emails leave Customer.io using Premailer. If your message included CSS and pre-processing is not disabled, this key indicates the pre-processor."
},
"sending_state": {
"enum": [
"automatic",
"draft",
"off"
],
"type": "string",
"description": "Determines the sending behavior for the action. `automatic` sends the action automatically when triggered; `draft` queues drafts when the action is triggered; or `off` to disable the action."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
},
"preheader_text": {
"type": "string",
"description": "Also known as \"preview text\", this specifies the small block of text shown in an end-user's email inbox, next to, or underneath, the subject line."
},
"parent_action_id": {
"type": "integer",
"example": 1,
"readOnly": true,
"description": "The ID of the parent action, if the action occurred within a campaign and has a parent (like a randomized split, etc)."
}
}
},
{
"type": "object",
"title": "Webhook",
"properties": {
"id": {
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
},
"url": {
"type": "string",
"example": "https://my.example.com/webhook",
"description": "The URL to send a webhook to, applies to `webhook` type actions."
},
"body": {
"type": "string",
"example": "{\"attribute\":\"cool-webhook\"}",
"description": "The payload for your webhook."
},
"name": {
"type": "string",
"example": "Set attribute",
"readOnly": true,
"description": "The name of the action, if it exists."
},
"type": {
"enum": [
"webhook"
],
"type": "string",
"readOnly": true,
"description": "The type of action."
},
"layout": {
"type": "string",
"readOnly": true,
"description": "The layout used for the action, if it exists."
},
"method": {
"enum": [
"get",
"post",
"put",
"delete",
"patch"
],
"type": "string",
"example": "post",
"description": "The HTTP method for your webhook."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"headers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"example": "X-Mailgun-Tag",
"description": "name of header"
},
"value": {
"type": "string",
"example": "tag-name-for-tracking",
"description": "value of header"
}
}
},
"description": "Headers must be strings and cannot contain any non-ASCII characters or empty spaces. Some headers are reserved and cannot be overwritten."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"campaign_id": {
"type": "integer",
"example": 5,
"description": "The identifier for a campaign."
},
"sending_state": {
"enum": [
"automatic",
"draft",
"off"
],
"type": "string",
"description": "Determines the sending behavior for the action. `automatic` sends the action automatically when triggered; `draft` queues drafts when the action is triggered; or `off` to disable the action."
},
"deduplicate_id": {
"type": "string",
"example": "15:1492548073",
"readOnly": true,
"description": "An identifier in the format `id:timestamp` where the id is the id of the object you are working with (Campaigns, Deliveries, Exports, Identities, Newsletters, Segments, and Templates), and the timestamp is the last time the object was updated."
},
"parent_action_id": {
"type": "integer",
"example": 1,
"readOnly": true,
"description": "The ID of the parent action, if the action occurred within a campaign and has a parent (like a randomized split, etc)."
}
}
}
]
}
actionWidget
{
"type": "object",
"required": [
"type",
"component",
"action"
],
"properties": {
"type": {
"enum": [
"actionWidget"
],
"type": "string",
"description": "Defines the widget type."
},
"action": {
"type": "string",
"description": "The link or place you want to send a person. This is either a deep link in your app, a web address, a `mailto` link, or a way to close the message (`gist://close`)."
},
"behaviour": {
"enum": [
"push",
"system",
"back",
"retain"
],
"type": "string",
"description": "* `push`: pushes a new route into the navigation stack.\n* `system`: offloads the action onto the operating system. Actions like `mailto:support@bourbon.sh` will open the default email client.\n* `back`: pops the navigation stack one step back.\n* `retain`: retain replaces the current view with a new route.\n"
},
"component": {
"type": "object",
"description": "The component a person taps to perform the action defined in this widget."
}
},
"description": "An action is either a link or a way to dismiss your message. The `behaviour` property determines how your app treats the action."
}
action_id
{
"type": "integer",
"example": 96,
"nullable": true,
"readOnly": true,
"description": "The identifier for an action."
}
action_id_webhook
{
"type": "integer",
"example": 96,
"readOnly": true,
"description": "The identifier for an action."
}
activityObject
{
"type": "object",
"properties": {
"id": {
"type": "string",
"example": "01AK4N8V8G8KVA4HN8Y50CCZ59",
"description": "The identifier for the action."
},
"data": {
"oneOf": [
{
"type": "object",
"title": "Message delivery",
"example": {
"opened": null,
"delivered": null,
"delivery_id": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ=="
},
"properties": {
"opened": {
"type": "boolean",
"nullable": true,
"description": "Indicates whether or not a customer opened a message, if the message was delivered."
},
"delivered": {
"type": "integer",
"format": "unix timestamp",
"nullable": true,
"description": "The date-time when the message was delivered, if applicable."
},
"delivery_id": {
"type": "string",
"description": "The message ID."
}
}
},
{
"type": "object",
"title": "Attribute change",
"example": {
"email": {
"to": "newPerson@customer.io",
"from": "newPerson@example.com"
}
},
"description": "The name of the object is the attribute that changed.",
"additionalProperties": {
"type": "object",
"properties": {
"to": {
"type": "string",
"description": "The new attribute value."
},
"from": {
"type": "string",
"description": "The old attribute value. If empty, the customer probably didn't bear the attribute before this action."
}
},
"x-additionalPropertyName": "Attribute Name"
}
}
]
},
"type": {
"enum": [
"attempted_action",
"attribute_change",
"failed_attribute_change",
"failed_batch_update",
"skipped_update",
"failed_query_collection",
"event",
"failed_event",
"page",
"drafted_email",
"attempted_email",
"sent_email",
"delivered_email",
"opened_email",
"clicked_email",
"converted_email",
"bounced_email",
"failed_email",
"unsubscribed_email",
"topic_unsubscribed_email",
"spammed_email",
"dropped_email",
"undeliverable_email",
"drafted_action",
"delivered_action",
"bounced_action",
"sent_action",
"opened_action",
"clicked_action",
"failed_action",
"converted_action",
"device_change",
"deferred_email",
"unsubscribed_action",
"dropped_action",
"undeliverable_action",
"deferred_action",
"profile_create",
"profile_delete",
"profile_merge",
"anon_merge",
"screen",
"webhook_event",
"add_relationship",
"delete_relationship",
"_o:<object_type_id>:create",
"_o:<object_type_id>:attribute_change",
"_o:<object_type_id>:failed_attribute_change",
"_o:<object_type_id>:delete",
"_o:<object_type_id>:add_relationship",
"_o:<object_type_id>:delete_relationship",
"_r:<object_type_id>:attribute_change",
"_r:<object_type_id>:failed_attribute_change",
"failed_object_journeys"
],
"type": "string",
"example": "sent_email",
"description": "The type of activity. Types with `_o:<object_type_id>` are for objects and types with `_r:<object_type_id>` are for relationships."
},
"timestamp": {
"type": "integer",
"format": "unix timestamp",
"example": 1397566226,
"description": "The date and time when the action occurred."
},
"customer_id": {
"type": "string",
"example": "42",
"nullable": true,
"description": "The ID of a customer profile, analogous to a \"person\" in the UI. If your workspace supports multiple identifiers (email and ID), this value can be null."
},
"delivery_id": {
"type": "string",
"example": "ZAIAAVTJVG0QcCok0-0ZKj6yiQ==",
"description": "The message ID."
},
"delivery_type": {
"enum": [
"ios",
"android",
"email",
"phone"
],
"type": "string",
"example": "email",
"description": "The recipient device, if applicable."
},
"customer_identifiers": {
"type": "object",
"required": [
"email",
"id",
"cio_id"
],
"properties": {
"id": {
"type": "string",
"example": 2,
"nullable": true,
"description": "A person's unique ID, if set. This is the same as the `customer_id` if present."
},
"email": {
"type": "string",
"format": "email",
"example": "test@example.com",
"nullable": true,
"description": "A person's email address, if set."
},
"cio_id": {
"type": "string",
"example": "a3000001",
"description": "A unique identifier set by Customer.io, used to reference a person if you want to update their identifiers."
}
},
"description": "Contains identifiers for the person represented in a response—`id`, `cio_id`, and `email` (if your workspace uses the *Email or ID* setting). If the person's `id` or `email` is not set, the value will be null.\n\nWe recommend that you use this object rather than the less descriptive `customer_id`.\n"
}
}
}
activityTypes
{
"enum": [
"attempted_action",
"attribute_change",
"failed_attribute_change",
"failed_batch_update",
"skipped_update",
"failed_query_collection",
"event",
"failed_event",
"page",
"drafted_email",
"attempted_email",
"sent_email",
"delivered_email",
"opened_email",
"clicked_email",
"converted_email",
"bounced_email",
"failed_email",
"unsubscribed_email",
"topic_unsubscribed_email",
"spammed_email",
"dropped_email",
"undeliverable_email",
"drafted_action",
"delivered_action",
"bounced_action",
"sent_action",
"opened_action",
"clicked_action",
"failed_action",
"converted_action",
"device_change",
"deferred_email",
"unsubscribed_action",
"dropped_action",
"undeliverable_action",
"deferred_action",
"profile_create",
"profile_delete",
"profile_merge",
"anon_merge",
"screen",
"webhook_event",
"add_relationship",
"delete_relationship",
"_o:<object_type_id>:create",
"_o:<object_type_id>:attribute_change",
"_o:<object_type_id>:failed_attribute_change",
"_o:<object_type_id>:delete",
"_o:<object_type_id>:add_relationship",
"_o:<object_type_id>:delete_relationship",
"_r:<object_type_id>:attribute_change",
"_r:<object_type_id>:failed_attribute_change",
"failed_object_journeys"
],
"type": "string",
"example": "sent_email",
"description": "The type of activity. Types with `_o:<object_type_id>` are for objects and types with `_r:<object_type_id>` are for relationships."
}
allAndroidProps
{
"allOf": [
{
"type": "object",
"properties": {
"body": {
"type": "string",
"description": "The body of your push notification."
},
"title": {
"type": "string",
"description": "The title of your push notification."
}
}
},
{
"type": "object",
"properties": {
"tag": {
"type": "string",
"description": "Identifier to replace existing notifications in the notification drawer. If empty, each request creates a new notification.\n\nIf you specify a tag, and a notification with the same tag is already being shown, the new notification replaces the existing one in the notification drawer. \n"
},
"icon": {
"type": "string",
"description": "Sets the notification icon to `myicon` for drawable resource `myicon`. If you don't send this key, FCM displays the launcher icon from your app manifest."
},
"color": {
"type": "string",
"description": "The notification's icon color in `#rrggbb` format."
},
"sound": {
"type": "string",
"description": "The sound that plays when the device receives the notification. Supports `\"default\"` or the filename of a sound resource bundled in your app. Sound files must reside in `/res/raw/`."
},
"body_loc_arg": {
"type": "string",
"description": "Variable string values used in place of the format specifiers in `body_loc_key` to localize the body text to the user's current localization. See Formatting and Styling for more information."
},
"body_loc_key": {
"type": "string",
"description": "The key to the body string in the app's string resources that you want to use to localize the body text to the user's current localization. See [String Resources](https://developer.android.com/guide/topics/resources/string-resource/) for more information."
},
"click_action": {
"type": "string",
"description": "The action that occurs when a user taps on the notification. Launches an activity with a matching intent filter when a person taps the notification."
},
"title_loc_arg": {
"type": "string",
"description": "Variable string values used in place of the format specifiers in `title_loc_key` to localize the title text to the user's current localization. See Formatting and Styling for more information."
},
"title_loc_key": {
"type": "string",
"description": "The key to the title string in the app's string resources that you want to use to localize the title text to the user's current localization. See [String Resources](https://developer.android.com/guide/topics/resources/string-resource/) for more information."
}
},
"description": "Properties supported specifically by Android on FCM."
}
]
}
andAudienceFilter
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"type": "object",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Returns results matching *any* conditions."
},
"not": {
"oneOf": [
{
"type": "object",
"title": "and",
"properties": {
"and": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *all* conditions to return results."
}
}
},
{
"type": "object",
"title": "or",
"properties": {
"or": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
},
"description": "Filter for people who belong to a segment."
},
{
"type": "object",
"title": "audience",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
},
"description": "filter for people who have an attribute or an attribute value."
}
]
},
"description": "Match *any* condition to return results."
}
}
},
{
"type": "object",
"title": "segment",
"properties": {
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
}
}
},
{
"type": "object",
"title": "attribute",
"properties": {
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
}
],
"description": "Returns results if a condition is false. While and/or support an array of items, `not` supports a single filter object."
},
"segment": {
"type": "object",
"title": "segment",
"properties": {
"id": {
"type": "integer",
"example": 4,
"description": "The ID of the segment you want to return people from."
}
},
"description": "Provide the `id` of a segment containing people you want to search for."
},
"attribute": {
"type": "object",
"title": "attribute",
"example": {
"field": "unsubscribed",
"value": true,
"operator": "eq"
},
"required": [
"field",
"operator"
],
"properties": {
"field": {
"type": "string",
"example": "first_name",
"description": "The name of the attribute you want to filter against."
},
"value": {
"type": "string",
"description": "The value you want to match for this attribute. You must include a value if you use the `eq` operator."
},
"operator": {
"enum": [
"eq",
"exists"
],
"type": "string",
"description": "Determine how to evaluate criteria against the field—`exists` returns results if a person in the audience has the attribute; `eq` returns results if the audience has the attribute and the attribute has the `value` you specify."
}
},
"description": "Filter your audience by attribute."
}
}
},
"description": "Match *all* conditions to return results."
}
}
}
anonymousEventsRequest
{
"oneOf": [
{
"type": "object",
"title": "Standard anonymous event",
"example": {
"data": {
"video": "intro-to-platform"
},
"name": "watched_video",
"anonymous_id": "abc123"
},
"required": [
"name"
],
"properties": {
"id": {
"type": "string",
"format": "ulid",
"description": "An identifier used to deduplicate events. This value must be a [ULID](https://github.com/ulid/spec). If an event has the same value as an event we previously received, we won't show or process the duplicate. Note - our Python and Ruby libraries do not pass this id."
},
"data": {
"type": "object",
"properties": {
"reply_to": {
"type": "string",
"example": "replyto@example.com",
"description": "The address that receives replies for the message, if applicable."
},
"from_address": {
"type": "string",
"format": "email",
"description": "The address you want to trigger messages from, overriding the `from` field in emails triggered by the event."
}
},
"description": "Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`). You can include `from_address` and `reply_to`, but the event can only trigger a campaign if it is associated with a person within 72 hours of its timestamp.",
"additionalProperties": {
"description": "Insert key-values that you want to reference in messages or convert to attributes if/when you associate this event with a person.",
"x-additionalPropertiesName": "liquid merge data"
}
},
"name": {
"type": "string",
"description": "The name of the event. This is how you'll reference the event in campaigns or segments."
},
"type": {
"enum": [
"event",
"page",
"screen"
],
"type": "string",
"description": "Sets the event type. If your event isn't a `page` or `screen` type event, we automatically set this property to `event`."
},
"timestamp": {
"type": "integer",
"format": "unix timestamp",
"description": "The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.\n"
},
"anonymous_id": {
"type": "string",
"description": "An identifier for an anonymous event, like a cookie. If set as an attribute on a person, any events bearing the same anonymous value are associated with this person. This value must be unique and is not reusable."
}
}
},
{
"type": "object",
"title": "Page view",
"example": {
"data": {
"first_name": "Person"
},
"name": "https://mysite.com/page",
"type": "page",
"anonymous_id": "abc123"
},
"required": [
"name",
"type"
],
"properties": {
"id": {
"type": "string",
"format": "ulid",
"description": "An identifier used to deduplicate events. This value must be a [ULID](https://github.com/ulid/spec). If an event has the same value as an event we previously received, we won't show or process the duplicate. Note - our Python and Ruby libraries do not pass this id."
},
"data": {
"type": "object",
"description": "Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`).",
"additionalProperties": {
"description": "Insert key-values that you want to reference in messages or convert to attributes if/when you associate this event with a person.",
"x-additionalPropertiesName": "liquid merge data"
}
},
"name": {
"type": "string",
"description": "The name of the event. In general, this should be the URL of the page a person visited, making it easy to segment your audience or trigger campaigns using this event. Make sure you trim leading and trailing spaces from this field."
},
"type": {
"enum": [
"page"
],
"type": "string",
"description": "Indicates that the event represents a page view. See [\"page view\" events](https://customer.io/docs/api/app/), for more information."
},
"timestamp": {
"type": "integer",
"format": "unix timestamp",
"description": "The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.\n"
},
"anonymous_id": {
"type": "string",
"description": "An identifier for an anonymous event, like a cookie. If set as an attribute on a person, any events bearing the same anonymous value are associated with this person. This value must be unique and is not reusable."
}
}
},
{
"type": "object",
"title": "Mobile screen view",
"example": {
"name": "homepage",
"type": "screen",
"anonymous_id": "abc123"
},
"required": [
"name",
"type"
],
"properties": {
"id": {
"type": "string",
"format": "ulid",
"description": "An identifier used to deduplicate events. This value must be a [ULID](https://github.com/ulid/spec). If an event has the same value as an event we previously received, we won't show or process the duplicate. Note - our Python and Ruby libraries do not pass this id."
},
"data": {
"type": "object",
"description": "Additional information that you might want to reference in a message using liquid or use to set attributes on your customer (referenced by `customer_id`).",
"additionalProperties": {
"description": "Insert key-values that you want to reference in messages or convert to attributes if/when you associate this event with a person.",
"x-additionalPropertiesName": "liquid merge data"
}
},
"name": {
"type": "string",
"description": "The name of the event. In general, this should be the name of the screen or deep link path that a person viewed, making it easy to segment your audience or trigger campaigns using this event. Make sure you trim leading and trailing spaces from this field."
},
"type": {
"enum": [
"screen"
],
"type": "string",
"description": "Indicates that the event represents a mobile screen view. You can also capture screen events directly with [our iOS SDK](https://customer.io/docs/api/app/)."
},
"timestamp": {
"type": "integer",
"format": "unix timestamp",
"description": "The unix timestamp when the event took place. If you don't provide this value, we use the date-time when we receive the event.\n"
},
"anonymous_id": {
"type": "string",
"description": "An identifier for an anonymous event, like a cookie. If set as an attribute on a person, any events bearing the same anonymous value are associated with this person. This value must be unique and is not reusable."
}
}
}
],
"description": "An event attributed to an unknown person. If you provide an `anonymous_id` with the event, you can associate the event with a person later (using the anonymous ID)."
}
anonymous_id
{
"type": "string",
"description": "An identifier for an anonymous event, like a cookie. If set as an attribute on a person, any events bearing the same anonymous value are associated with this person. This value must be unique and is not reusable."
}
anyType
{
"description": "Can be any type of value."
}