Query structured spec data via REST or MCP. Get exactly what your agent needs.
https://api.customer.io
/v1/broadcasts/{broadcast_id}/actions/{action_id}
Update the contents of a broadcast action, including the body of messages or HTTP requests.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| broadcast_id | path | required | integer | The identifier of a broadcast. |
| action_id | path | required | integer | The action you want to lookup or act on. |
application/json
BroadcastsUpdateActionContentsRequest
Returns the updated broadcast action.
The language does not exist for this action.
The broadcast or action does not exist.
Your request is over the 10-per-second limit.
PUT /v1/broadcasts/{broadcast_id}/actions/{action_id}
/v1/broadcasts/{broadcast_id}/actions/{action_id}/language/{language}
Update a translation of a specific broadcast action, including the body of messages or HTTP requests.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| broadcast_id | path | required | integer | The identifier of a broadcast. |
| action_id | path | required | integer | The action you want to lookup or act on. |
| language | path | optional | string | A language tag of a language variant. If you don’t provide a language, we target your default template. If the language variant does not exist, we throw an error. |
application/json
BroadcastsUpdateTranslationRequest
Returns the updated broadcast action.
The language does not exist for this action.
The broadcast or action does not exist.
Your request is over the 10-per-second limit.
PUT /v1/broadcasts/{broadcast_id}/actions/{action_id}/language/{language}
/v1/campaigns/{campaign_id}/actions/{action_id}
Update the contents of a campaign action, including the body of messages and HTTP requests.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| campaign_id | path | required | integer | The ID of the campaign that you want to trigger or return information about. |
| action_id | path | required | integer | The action you want to lookup or act on. |
application/json
CampaignsUpdateActionContentsRequest
Returns the updated campaign action.
The language does not exist for this action.
The campaign or action does not exist.
Your request is over the 10-per-second limit.
PUT /v1/campaigns/{campaign_id}/actions/{action_id}
/v1/campaigns/{campaign_id}/actions/{action_id}/language/{language}
Update the contents of a language variant of a campaign action, including the body of the messages and HTTP requests.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| campaign_id | path | required | integer | The ID of the campaign that you want to trigger or return information about. |
| action_id | path | required | integer | The action you want to lookup or act on. |
| language | path | optional | string | A language tag of a language variant. If you don’t provide a language, we target your default template. If the language variant does not exist, we throw an error. |
application/json
CampaignsUpdateTranslationRequest
Returns the updated campaign action.
The language does not exist for this action.
The campaign or action does not exist.
Your request is over the 10-per-second limit.
PUT /v1/campaigns/{campaign_id}/actions/{action_id}/language/{language}
/v1/collections/{collection_id}
Update the name or replace the contents of a collection. Updating the data or url for your collection fully replaces the contents of the collection.
Note:
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| collection_id | path | required | integer | The identifier for a collection. |
application/json
CollectionsUpdateCollectionRequest
The collection was created successfully.
Your request was malformed.
Your request is over the 10-per-second limit.
PUT /v1/collections/{collection_id}
/v1/collections/{collection_id}/content
Replace the contents of a collection (the data from when you created or updated a collection). The request is a free-form object containing the keys you want to reference from the collection and the corresponding values. This request replaces the current contents of the collection entirely.
If you don’t want to update the contents directly—you want to change the name or data url for your collection, use the update a collection endpoint.
Note: A collection cannot be more than 10 MB in size. No individual row in the collection can be more than 10 KB.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| collection_id | path | required | integer | The identifier for a collection. |
Your request is a free form object representing the contents of your collection. This request replaces the contents of the collection entirely, so include all contents that you want to remain in the collection—whether they change or not.
application/json
CollectionsUpdateContentsRequest
Returns your collection metadata and the updated schema.
The collection id does not exist.
Your request is over the 10-per-second limit.
PUT /v1/collections/{collection_id}/content
/v1/newsletters/{newsletter_id}/contents/{content_id}
Update the contents of a newsletter variant (a specific language of your message or a part of an A/B test), including the body of a newsletter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| content_id | path | required | integer | The identifier of a newsletter variant—a language in a multi-language message or an individual test in an A/B test. You can list your newsletter’s variants to find your newsletter’s variants. |
application/json
NewslettersUpdateVariantContentsRequest
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| bcc | string | optional |
| body | string | optional |
| from | string | optional |
| name | string | optional |
| type | string | optional |
| layout | string | optional |
| from_id | integer | optional |
| headers | array | optional |
| └ name | string | optional |
| └ value | string | optional |
| subject | string | optional |
| body_amp | string | optional |
| fake_bcc | boolean | optional |
| language | string | optional |
| reply_to | string | optional |
| recipient | string | optional |
| reply_to_id | integer | optional |
| preprocessor | string | optional |
| newsletter_id | integer | optional |
| deduplicate_id | string | optional |
| preheader_text | string | optional |
Returns the updated newsletter variant.
The request is malformed.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
PUT /v1/newsletters/{newsletter_id}/contents/{content_id}
/v1/newsletters/{newsletter_id}/language/{language}
Update the translation of a newsletter variant. If your newsletter includes A/B tests, use Update a translation in a newsletter test group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| language | path | optional | string | A language tag of a language variant. If you don’t provide a language, we target your default template. If the language variant does not exist, we throw an error. |
application/json
NewslettersUpdateTranslationRequest
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| bcc | string | optional |
| body | string | optional |
| from | string | optional |
| name | string | optional |
| type | string | optional |
| layout | string | optional |
| from_id | integer | optional |
| headers | array | optional |
| └ name | string | optional |
| └ value | string | optional |
| subject | string | optional |
| body_amp | string | optional |
| fake_bcc | boolean | optional |
| language | string | optional |
| reply_to | string | optional |
| recipient | string | optional |
| reply_to_id | integer | optional |
| preprocessor | string | optional |
| newsletter_id | integer | optional |
| deduplicate_id | string | optional |
| preheader_text | string | optional |
Returns the updated newsletter variant.
The language does not exist.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
PUT /v1/newsletters/{newsletter_id}/language/{language}
/v1/newsletters/{newsletter_id}/test_group/{test_group_id}/language/{language}
Update the translation of a newsletter variant in an A/B test. You can retrieve a list of test_group_ids from Get variants in a newsletter test group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| test_group_id | path | required | string | The ID of the A/B test group. |
| language | path | optional | string | A language tag of a language variant. If you don’t provide a language, we target your default template. If the language variant does not exist, we throw an error. |
application/json
NewslettersUpdateTranslationRequest1
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| bcc | string | optional |
| body | string | optional |
| from | string | optional |
| name | string | optional |
| type | string | optional |
| layout | string | optional |
| from_id | integer | optional |
| headers | array | optional |
| └ name | string | optional |
| └ value | string | optional |
| subject | string | optional |
| body_amp | string | optional |
| fake_bcc | boolean | optional |
| language | string | optional |
| reply_to | string | optional |
| recipient | string | optional |
| reply_to_id | integer | optional |
| preprocessor | string | optional |
| newsletter_id | integer | optional |
| deduplicate_id | string | optional |
| preheader_text | string | optional |
Returns the updated newsletter variant.
The language does not exist.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
PUT /v1/newsletters/{newsletter_id}/test_group/{test_group_id}/language/{language}
/v1/reporting_webhooks/{webhook_id}
Update the configuration of a reporting webhook. Turn events on or off, change the webhook URL, etc.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| webhook_id | path | required | integer | The identifier of a webhook. |
application/json
ReportingWebhooksUpdateConfigurationRequest
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| name | string | required |
| events | array | required |
| disabled | boolean | optional |
| endpoint | string | required |
| with_content | boolean | optional |
| full_resolution | boolean | optional |
Returns your webhook configuration and the ID of the webhook.
The request was malformed.
The webhook ID does not exist.
Your request is over the 10-per-second limit.
PUT /v1/reporting_webhooks/{webhook_id}
/v1/snippets
In your payload, you’ll pass a name and value. Snippet names are unique. If the snippet name does not exist, we’ll create a new snippet. If the name exists, we’ll update the existing snippet.
application/json
SnippetsCreateOrUpdateRequest
| Property | Type | Required |
|---|---|---|
| name | string | required |
| value | string | required |
| updated_at | integer | optional |
Returns an array of snippets.
The request is malformed.
Your request is over the 10-per-second limit.
PUT /v1/snippets
/v1/transactional/{transactional_id}/content/{content_id}
Update the body of a transactional email. This fully overwrites your existing transactional message. We’ll use your updated content for any future transactional requests (/v1/send/email), so make sure that you test your message before you update it.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| transactional_id | path | required | integer | The identifier of your transactional message. You’ll find this in the UI or URL of your transactional message. For example, if this is the path of a transactional message URL - |
| content_id | path | required | integer | The content variant of your transactional message. You’ll find the id in the URL of your transactional message. For example, if this is the path of a transactional message URL - |
application/json
TransactionalUpdateMessageContentRequest
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| bcc | string | optional |
| body | string | optional |
| from | string | optional |
| name | string | optional |
| type | string | optional |
| created | integer | optional |
| from_id | integer | optional |
| headers | array | optional |
| └ name | string | optional |
| └ value | string | optional |
| subject | string | optional |
| updated | integer | optional |
| body_amp | string | optional |
| fake_bcc | boolean | optional |
| language | string | optional |
| reply_to | string | optional |
| recipient | string | optional |
| reply_to_id | integer | optional |
| preprocessor | string | optional |
| preheader_text | string | optional |
Returns the updated transactional message.
The request was malformed.
The transactional_id or content_id in your request do not exist
PUT /v1/transactional/{transactional_id}/content/{content_id}
/v1/transactional/{transactional_id}/language/{language}
Update the body and other data of a specific language variant for a transactional message. This fully overwrites this specific translation of your existing transactional message.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| transactional_id | path | required | integer | The identifier of your transactional message. You’ll find this in the UI or URL of your transactional message. For example, if this is the path of a transactional message URL - |
| language | path | optional | string | A language tag of a language variant. If you don’t provide a language, we target your default template. If the language variant does not exist, we throw an error. |
application/json
TransactionalUpdateTranslationRequest
| Property | Type | Required |
|---|---|---|
| id | integer | optional |
| bcc | string | optional |
| body | string | optional |
| from | string | optional |
| name | string | optional |
| type | string | optional |
| created | integer | optional |
| from_id | integer | optional |
| headers | array | optional |
| └ name | string | optional |
| └ value | string | optional |
| subject | string | optional |
| updated | integer | optional |
| body_amp | string | optional |
| fake_bcc | boolean | optional |
| language | string | optional |
| reply_to | string | optional |
| recipient | string | optional |
| reply_to_id | integer | optional |
| preprocessor | string | optional |
| preheader_text | string | optional |
Returns the updated variant of the transactional message.
The language in your request does not exist.
PUT /v1/transactional/{transactional_id}/language/{language}
ActivitiesListResponse
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Indicates the next page of results. Add `?start=<next_value>` to the request to get the next page of results."
},
"activities": {
"type": "array",
"items": {
"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"
}
}
}
}
}
}
BroadcastsGetActionDetailsResponse
{
"type": "object",
"properties": {
"action": {
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
}
}
BroadcastsGetActionLinkMetricsResponse
{
"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."
}
}
},
"description": "Each object in the array represents a link in your broadcast variant."
}
}
}
BroadcastsGetActionMetricsResponse
{
"type": "object",
"properties": {
"metric": {
"type": "object",
"properties": {
"series": {
"allOf": [
{
"type": "object",
"properties": {
"2xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "2xx responses by period, representative of webhook performance."
},
"3xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "3xx responses by period, representative of webhook performance."
},
"4xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "4xx responses by period, representative of webhook performance."
},
"5xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "5xx responses by period, representative of webhook performance."
}
},
"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."
},
{
"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."
}
]
}
}
}
}
}
BroadcastsGetActionsResponse
{
"type": "object",
"properties": {
"actions": {
"type": "array",
"items": {
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
}
}
}
BroadcastsGetBroadcastErrorsResponse
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Indicates the next page of results. Add `?start=<next_value>` to the request to get the next page of results."
},
"errors": {
"type": "array",
"items": {
"type": "string"
},
"description": "A list of errors in the format `line <x>: <error text>` to help you troubleshoot errors associated with your audience or data file."
}
}
}
BroadcastsGetLinkMetricsResponse
{
"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."
}
}
}
}
}
}
BroadcastsGetMessagesResponse
{
"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=",
"type": "email",
"created": 1609957805,
"metrics": {
"sent": 1609957832,
"delivered": 1609957872
},
"subject": "Did you get that thing I sent you?",
"action_id": 196,
"forgotten": false,
"recipient": "person@example.com",
"content_id": null,
"campaign_id": null,
"customer_id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7d",
"broadcast_id": 94,
"newsletter_id": null,
"deduplicate_id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=:1609957872",
"failure_message": null,
"msg_template_id": 0,
"customer_identifiers": {
"id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7d",
"email": "person@example.com",
"cio_id": 786433
}
}
]
}
}
}
BroadcastsGetMetadataResponse
{
"type": "object",
"properties": {
"broadcast": {
"type": "object",
"example": {
"id": 2,
"name": "basic",
"tags": "nil",
"type": "triggered_broadcast",
"active": true,
"actions": [
{
"id": 3,
"type": "email"
},
{
"id": 4
},
{
"type": "webhook"
}
],
"created": 1520467200,
"updated": 1520467200,
"created_by": "ExamplePerson",
"first_started": 1520467200,
"deduplicate_id": "2:1520467200"
},
"properties": {
"id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the broadcast."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of tags you set on this broadcast."
},
"active": {
"type": "boolean",
"description": "If true, the broadcast is active."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the action."
},
"type": {
"enum": [
"email",
"webhook",
"push",
"sms",
"slack"
],
"type": "string",
"description": "The type of action."
}
}
},
"description": "A list of actions used by the broadcast."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"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."
},
"msg_template_ids": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the template."
},
"type": {
"enum": [
"email",
"webhook",
"push",
"sms",
"slack"
],
"type": "string",
"description": "The type of template."
}
}
},
"deprecated": true,
"description": "Indicates the message template(s) used in this broadcast."
}
}
}
}
}
BroadcastsGetMetricsResponse
{
"type": "object",
"properties": {
"metric": {
"type": "object",
"properties": {
"series": {
"allOf": [
{
"type": "object",
"properties": {
"2xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "2xx responses by period, representative of webhook performance."
},
"3xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "3xx responses by period, representative of webhook performance."
},
"4xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "4xx responses by period, representative of webhook performance."
},
"5xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "5xx responses by period, representative of webhook performance."
}
},
"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."
},
{
"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."
}
]
}
}
}
}
}
BroadcastsGetStatusResponse
{
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for a broadcast trigger."
},
"created_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"processed_at": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when Customer.io processed the trigger."
}
},
"description": "You can get triggers to know when you triggered a broadcast and whether or not it's been processed."
}
BroadcastsGetTranslationMessageResponse
{
"type": "object",
"properties": {
"action": {
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
}
}
BroadcastsGetTriggersResponse
{
"type": "object",
"properties": {
"triggers": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for a broadcast trigger."
},
"created_at": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"processed_at": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when Customer.io processed the trigger."
}
},
"description": "You can get triggers to know when you triggered a broadcast and whether or not it's been processed."
},
"description": "Each object in the array represents a time that your broadcast was triggered/sent."
}
}
}
BroadcastsListResponse
{
"type": "object",
"properties": {
"broadcasts": {
"type": "array",
"items": {
"type": "object",
"example": {
"id": 2,
"name": "basic",
"tags": "nil",
"type": "triggered_broadcast",
"active": true,
"actions": [
{
"id": 3,
"type": "email"
},
{
"id": 4
},
{
"type": "webhook"
}
],
"created": 1520467200,
"updated": 1520467200,
"created_by": "ExamplePerson",
"first_started": 1520467200,
"deduplicate_id": "2:1520467200"
},
"properties": {
"id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the broadcast."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of tags you set on this broadcast."
},
"active": {
"type": "boolean",
"description": "If true, the broadcast is active."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the action."
},
"type": {
"enum": [
"email",
"webhook",
"push",
"sms",
"slack"
],
"type": "string",
"description": "The type of action."
}
}
},
"description": "A list of actions used by the broadcast."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"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."
},
"msg_template_ids": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the template."
},
"type": {
"enum": [
"email",
"webhook",
"push",
"sms",
"slack"
],
"type": "string",
"description": "The type of template."
}
}
},
"deprecated": true,
"description": "Indicates the message template(s) used in this broadcast."
}
}
}
}
}
}
BroadcastsUpdateActionContentsRequest
{
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
BroadcastsUpdateActionContentsResponse
{
"type": "object",
"properties": {
"action": {
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
}
}
BroadcastsUpdateTranslationRequest
{
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
BroadcastsUpdateTranslationResponse
{
"type": "object",
"properties": {
"action": {
"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. 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."
},
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"readOnly": true,
"description": "The identifier for a broadcast."
},
"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."
}
}
},
{
"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",
"description": "The body of the action. You cannot modify the body if you created it with our drag-and-drop editor."
},
"name": {
"type": "string",
"example": "Opening Message",
"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."
},
"broadcast_id": {
"type": "integer",
"example": 2,
"description": "The identifier for a broadcast."
},
"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."
}
}
}
]
}
}
}
CampaignsGetActionInfoResponse
{
"type": "object",
"properties": {
"action": {
"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)."
}
}
}
]
}
}
}
CampaignsGetActionMetricsResponse
{
"type": "object",
"properties": {
"metric": {
"type": "object",
"properties": {
"series": {
"allOf": [
{
"type": "object",
"properties": {
"2xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "2xx responses by period, representative of webhook performance."
},
"3xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "3xx responses by period, representative of webhook performance."
},
"4xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "4xx responses by period, representative of webhook performance."
},
"5xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "5xx responses by period, representative of webhook performance."
}
},
"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."
},
{
"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."
}
]
}
}
}
}
}
CampaignsGetJourneyMetricsResponse
{
"type": "object",
"properties": {
"journey_metric": {
"type": "object",
"properties": {
"started": {
"type": "array",
"items": {
"type": "integer"
},
"description": "The total number of people who meet the trigger criteria for a journey. This count occurs before filters are applied."
},
"finished": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who finished the journey."
},
"messaged": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who experienced at least one non-delay action in the journey. This metric typically represents journeys in progress."
},
"activated": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who started a journey and were not filtered out before they experienced an action."
},
"converted": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who met the conversion goal (entered a segment) for the campaign."
},
"exited_early": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who started a journey but stopped meeting the campaign trigger/filter criteria following a delay or grace period."
},
"never_activated": {
"type": "array",
"items": {
"type": "integer"
},
"description": "People who started a journey but were filtered out before they could experience any of the actions in the journey."
}
}
}
}
}
CampaignsGetLinkMetricsForActionResponse
{
"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."
}
}
},
"description": "Each object in the array represents a link in your action."
}
}
}
CampaignsGetLinkMetricsResponse
{
"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."
}
}
}
}
}
}
CampaignsGetListResponse
{
"type": "object",
"properties": {
"campaigns": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 5,
"description": "The identifier for a campaign."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the campaign."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"new",
"welcome"
],
"description": "An array of tags you set on this campaign."
},
"type": {
"enum": [
"segment"
],
"type": "string",
"description": "The type of campaign."
},
"active": {
"type": "boolean",
"description": "If true, the campaign is active and can still send messages."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the action."
},
"type": {
"enum": [
"email",
"sms",
"push",
"slack",
"webhook"
],
"type": "string",
"description": "The message type actions resulting from the campaign."
}
}
},
"description": "An array of actions contained within the campaign."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"created_by": {
"type": "string",
"format": "email",
"example": "hugh.mann@example.com",
"description": "The email address of the person who created the campaign."
},
"first_started": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"description": "The date and time when you first started the campaign and it first became eligible to be triggered."
},
"msg_templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the template."
},
"type": {
"enum": [
"email",
"sms",
"push",
"slack"
],
"type": "string",
"description": "The message type the template represents."
}
}
},
"deprecated": true,
"description": "Indicates the message templates used in this campaign."
},
"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."
},
"filter_segment_ids": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
21,
42
],
"description": "A list of segments used in the campaign filter, returned if the campaign audience was filtered on one or more segments."
},
"trigger_segment_ids": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
90
],
"description": "A list of segments used in the campaign trigger, returned if the campaign trigger included one or more segment conditions."
}
}
}
}
}
}
CampaignsGetMessageMetadataResponse
{
"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",
"created": 1609957805,
"metrics": {
"sent": 1609957832,
"delivered": 1609957872
},
"subject": "Did you get that thing I sent you?",
"action_id": 196,
"forgotten": false,
"recipient": "person@email.com",
"content_id": null,
"campaign_id": 89,
"customer_id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7d",
"broadcast_id": null,
"newsletter_id": null,
"deduplicate_id": "dgOq6QWq6QUDAAF22PaOyFVqVxHY3rI5fsg=:1609957872",
"failure_message": null,
"msg_template_id": 0,
"customer_identifiers": {
"id": "1a55d8d1-b13d-4f1f-858f-a93ef21e3a7dX",
"email": "person@example.com",
"cio_id": 786433
}
}
]
}
}
}
CampaignsGetMessageTranslationResponse
{
"type": "object",
"properties": {
"action": {
"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)."
}
}
}
]
}
}
}
CampaignsGetMetadataResponse
{
"type": "object",
"properties": {
"campaign": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 5,
"description": "The identifier for a campaign."
},
"name": {
"type": "string",
"readOnly": true,
"description": "The name of the campaign."
},
"tags": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"new",
"welcome"
],
"description": "An array of tags you set on this campaign."
},
"type": {
"enum": [
"segment"
],
"type": "string",
"description": "The type of campaign."
},
"active": {
"type": "boolean",
"description": "If true, the campaign is active and can still send messages."
},
"actions": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the action."
},
"type": {
"enum": [
"email",
"sms",
"push",
"slack",
"webhook"
],
"type": "string",
"description": "The message type actions resulting from the campaign."
}
}
},
"description": "An array of actions contained within the campaign."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was created."
},
"updated": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"readOnly": true,
"description": "The date time when the referenced ID was last updated."
},
"created_by": {
"type": "string",
"format": "email",
"example": "hugh.mann@example.com",
"description": "The email address of the person who created the campaign."
},
"first_started": {
"type": "integer",
"format": "unix timestamp",
"example": 1552341937,
"description": "The date and time when you first started the campaign and it first became eligible to be triggered."
},
"msg_templates": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "The identifier for the template."
},
"type": {
"enum": [
"email",
"sms",
"push",
"slack"
],
"type": "string",
"description": "The message type the template represents."
}
}
},
"deprecated": true,
"description": "Indicates the message templates used in this campaign."
},
"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."
},
"filter_segment_ids": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
21,
42
],
"description": "A list of segments used in the campaign filter, returned if the campaign audience was filtered on one or more segments."
},
"trigger_segment_ids": {
"type": "array",
"items": {
"type": "integer"
},
"example": [
90
],
"description": "A list of segments used in the campaign trigger, returned if the campaign trigger included one or more segment conditions."
}
}
}
}
}
CampaignsGetMetricsResponse
{
"type": "object",
"properties": {
"metric": {
"type": "object",
"properties": {
"series": {
"allOf": [
{
"type": "object",
"properties": {
"2xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "2xx responses by period, representative of webhook performance."
},
"3xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "3xx responses by period, representative of webhook performance."
},
"4xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "4xx responses by period, representative of webhook performance."
},
"5xx": {
"type": "array",
"items": {
"type": "integer"
},
"description": "5xx responses by period, representative of webhook performance."
}
},
"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."
},
{
"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."
}
]
}
}
}
}
}
CampaignsListActionsResponse
{
"type": "object",
"properties": {
"next": {
"type": "string",
"description": "Indicates the next page of results. Add `?start=<next_value>` to the request to get the next page of results."
},
"actions": {
"type": "array",
"items": {
"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)."
}
}
}
]
},
"maxItems": 10,
"description": "Each object in the array represents an action in your campaign."
}
}
}
CampaignsUpdateActionContentsRequest
{
"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)."
}
}
}
]
}
CampaignsUpdateActionContentsResponse
{
"type": "object",
"properties": {
"action": {
"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)."
}
}
}
]
}
}
}
CampaignsUpdateTranslationRequest
{
"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)."
}
}
}
]
}
CampaignsUpdateTranslationResponse
{
"type": "object",
"properties": {
"action": {
"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)."
}
}
}
]
}
}
}
CollectionsCreateNewRequest
{
"oneOf": [
{
"type": "object",
"title": "Local data",
"required": [
"name",
"data"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"x-additionalPropertiesName": "collection data"
}
},
"description": "An array of data objects that you want to reference in this collection."
},
"name": {
"type": "string",
"description": "The name of the collection. This is how you'll reference your collection in messages—`{{collection_name.data-property}}`."
}
}
},
{
"type": "object",
"title": "Data by URL",
"required": [
"name",
"url"
],
"properties": {
"url": {
"type": "string",
"format": "url",
"description": "The URL for your CSV or JSON data. If your URL does not return a `Content-Type`, we use the file extension; otherwise, Customer.io assumes your data is JSON.\n"
},
"name": {
"type": "string",
"description": "The name of the collection. This is how you'll reference your collection in messages—`{{collection_name.data-property}}`."
}
}
}
]
}
CollectionsCreateNewResponse
{
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"description": "The identifier for the collection. This is how you'll reference the collection from the API."
},
"name": {
"type": "string",
"example": "upcoming events",
"description": "The name of the collection. This is how you'll reference the collection in liquid, e.g. `{{collection_name.data_property}}`."
},
"rows": {
"type": "integer",
"example": 2,
"description": "Represents the number of objects in the `data` array or CSV rows in your collection schema."
},
"bytes": {
"type": "integer",
"example": 296,
"description": "The size of the collection in bytes."
},
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"eventDate",
"eventName",
"presents"
],
"description": "Lists the top-level keys that you can reference within this collection. Customer.io does not enforce any of these keys as required from your `data`."
},
"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."
}
}
}
}
}
CollectionsGetContentsResponse
{
"type": "object",
"additionalProperties": {
"x-additionalPropertiesName": "collection data"
}
}
CollectionsGetDetailsResponse
{
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"description": "The identifier for the collection. This is how you'll reference the collection from the API."
},
"name": {
"type": "string",
"example": "upcoming events",
"description": "The name of the collection. This is how you'll reference the collection in liquid, e.g. `{{collection_name.data_property}}`."
},
"rows": {
"type": "integer",
"example": 2,
"description": "Represents the number of objects in the `data` array or CSV rows in your collection schema."
},
"bytes": {
"type": "integer",
"example": 296,
"description": "The size of the collection in bytes."
},
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"eventDate",
"eventName",
"presents"
],
"description": "Lists the top-level keys that you can reference within this collection. Customer.io does not enforce any of these keys as required from your `data`."
},
"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."
}
}
}
}
}
CollectionsListResponse
{
"type": "object",
"properties": {
"collections": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"description": "The identifier for the collection. This is how you'll reference the collection from the API."
},
"name": {
"type": "string",
"example": "upcoming events",
"description": "The name of the collection. This is how you'll reference the collection in liquid, e.g. `{{collection_name.data_property}}`."
},
"rows": {
"type": "integer",
"example": 2,
"description": "Represents the number of objects in the `data` array or CSV rows in your collection schema."
},
"bytes": {
"type": "integer",
"example": 296,
"description": "The size of the collection in bytes."
},
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"eventDate",
"eventName",
"presents"
],
"description": "Lists the top-level keys that you can reference within this collection. Customer.io does not enforce any of these keys as required from your `data`."
},
"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."
}
}
}
}
}
}
CollectionsUpdateCollectionRequest
{
"oneOf": [
{
"type": "object",
"title": "Local data",
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": {
"x-additionalPropertiesName": "collection data"
}
},
"description": "An array of data objects that you want to reference in this collection."
},
"name": {
"type": "string",
"description": "The name of the collection. This is how you'll reference your collection in messages—`{{collection_name.data-property}}`."
}
}
},
{
"type": "object",
"title": "Data by URL",
"properties": {
"url": {
"type": "string",
"format": "url",
"description": "The URL for your CSV or JSON data. If your URL does not return a `Content-Type`, we use the file extension; otherwise, Customer.io assumes your data is JSON.\n"
},
"name": {
"type": "string",
"description": "The name of the collection. This is how you'll reference your collection in messages—`{{collection_name.data-property}}`."
}
}
}
]
}
CollectionsUpdateCollectionResponse
{
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"description": "The identifier for the collection. This is how you'll reference the collection from the API."
},
"name": {
"type": "string",
"example": "upcoming events",
"description": "The name of the collection. This is how you'll reference the collection in liquid, e.g. `{{collection_name.data_property}}`."
},
"rows": {
"type": "integer",
"example": 2,
"description": "Represents the number of objects in the `data` array or CSV rows in your collection schema."
},
"bytes": {
"type": "integer",
"example": 296,
"description": "The size of the collection in bytes."
},
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"eventDate",
"eventName",
"presents"
],
"description": "Lists the top-level keys that you can reference within this collection. Customer.io does not enforce any of these keys as required from your `data`."
},
"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."
}
}
}
}
}
CollectionsUpdateContentsRequest
{
"type": "object",
"additionalProperties": {
"x-additionalPropertiesName": "collection contents"
}
}
CollectionsUpdateContentsResponse
{
"type": "object",
"properties": {
"collection": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 1,
"description": "The identifier for the collection. This is how you'll reference the collection from the API."
},
"name": {
"type": "string",
"example": "upcoming events",
"description": "The name of the collection. This is how you'll reference the collection in liquid, e.g. `{{collection_name.data_property}}`."
},
"rows": {
"type": "integer",
"example": 2,
"description": "Represents the number of objects in the `data` array or CSV rows in your collection schema."
},
"bytes": {
"type": "integer",
"example": 296,
"description": "The size of the collection in bytes."
},
"schema": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"eventDate",
"eventName",
"presents"
],
"description": "Lists the top-level keys that you can reference within this collection. Customer.io does not enforce any of these keys as required from your `data`."
},
"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."
}
}
}
}
}
CustomersFindByEmailResponse
{
"type": "object",
"properties": {
"results": {
"type": "array",
"items": {
"type": "object",
"required": [
"cio_id",
"id",
"email"
],
"properties": {
"id": {
"type": "string",
"example": 2,
"nullable": true,
"description": "A person's unique ID, if set."
},
"email": {
"type": "string",
"format": "email",
"example": "hugh.mann@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": "A list of customers matching the email address in your query."
}
}
}
CustomersGetActivitiesResponse
{
"type": "object",
"properties": {
"activities": {
"type": "array",
"items": {
"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"
}
}
}
}
}
}
CustomersGetAttributesResponse
{
"type": "object",
"example": {
"customer": {
"id": "1X",
"devices": [
{
"id": "my_android_device_idX",
"platform": "android",
"last_used": 1514764800
},
{
"id": "my_ios_device_idX",
"platform": "ios",
"last_used": 1514764800
}
],
"attributes": {
"id": "1X",
"email": "test@example.com",
"title": "tester",
"cio_id": "03000001",
"created_at": "1489014595",
"department": "qa",
"_last_emailed": "1528932553",
"cio_subscription_preferences": "{\"topics\":{\"topic_7\":false,\"topic_8\":false}}",
"_cio_subscription_preferences_computed": "{\"topics\":{\"topic_6\":false,\"topic_7\":false,\"topic_8\":false}}"
},
"timestamps": {
"id": 1489014595,
"email": 1508932553,
"title": 1508932553,
"cio_id": 1489014595,
"created_at": 1489014595,
"department": 1508932553,
"_last_emailed": 1528932553,
"cio_subscription_preferences": 1673987303,
"_cio_subscription_preferences_computed": 0
},
"unsubscribed": false
}
},
"properties": {
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The customer ID referenced in the request."
},
"devices": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"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": "The properties representing an individual device. [Our SDK's](https://customer.io/docs/api/app/) gather all the properties defined below automatically, unless you disable the `autoTrackDeviceAttributes` setting. You can reference the properties outside the `attributes` object in segments or in Liquid."
},
"description": "Lists the devices associated with the customer profile."
},
"attributes": {
"type": "object",
"properties": {
"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."
},
"email": {
"type": "string",
"example": "test@example.com",
"nullable": true,
"description": "The email address of the customer."
},
"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."
},
"cio_subscription_preferences": {
"type": "string",
"description": "A person's stringified subscription preferences. These are preferences that a person set through the subscription center or attributes that you set on a person. A person who hasn't set their subscription preferences has computed preferences based on the nature of your topics (opt-in or opt-out). See the `_cio_subscription_preferences_computed` attribute for computed preferences.\n"
},
"_cio_subscription_preferences_computed": {
"type": "string",
"description": "Returns the computed subscription preferences for a person—any subscription preferences set on a person and the defaults for any subscription preferences _not_ set on a person—as stringified JSON. For example, if you have an \"opt-in\" topic that a person hasn't set a preference for, that topic would show `false`—even though a person doesn't have that attribute on their profile. [Learn more about topics](https://customer.io/docs/api/app/). \n"
}
},
"description": "Contains attributes assigned to this profile, including your workspace's people-identifiers (by default, these are `id`, `email`, and `cio_id`). Attributes are all stored as strings.",
"additionalProperties": {
"type": "string",
"description": "Non-identifier attributes assigned to this person.",
"x-additionalPropertiesName": "additional attributes"
}
},
"timestamps": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person's ID was generated."
},
"email": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person's email address was added."
},
"cio_id": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when `cio_id` was assigned."
},
"unsubscribed": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person unsubscribed."
},
"_last_emailed": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when you last emailed a person."
},
"additionalProperties": {
"format": "unix timestamp",
"description": "Timestamps when attributes assigned to the person were set.",
"x-additionalPropertiesName": "additional attribute timestamps"
},
"cio_subscription_preferences": {
"type": "integer",
"format": "unix timestamp",
"description": "The datetime when a person's subscription preferences were last updated."
},
"_cio_subscription_preferences_computed": {
"type": "integer",
"description": "Because this value is computed and not actually set on a person, this value is always 0"
}
},
"description": "The epoch timestamps when corresponding attributes were set on the customer profile."
},
"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"
},
"unsubscribed": {
"type": "boolean",
"description": "If true, the person is unsubscribed from messages."
}
},
"description": "The profile you referenced by ID in the request."
}
}
}
CustomersGetMessagesResponse
{
"type": "object",
"properties": {
"messages": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The message identifier."
},
"type": {
"enum": [
"email",
"webhook",
"twilio",
"slack",
"push"
],
"type": "string",
"description": "The type of message."
},
"created": {
"type": "integer",
"format": "unix timestamp",
"description": "The date and time when the message was created."
},
"metrics": {
"type": "object",
"properties": {
"sent": {
"type": "integer",
"format": "unix timestamp",
"description": "The date and time when the message was sent."
},
"delivered": {
"type": "integer",
"format": "unix timestamp",
"description": "The date and time when the customer received the message."
}
},
"description": "Contains information about the send and delivery time of the message."
},
"subject": {
"type": "string",
"description": "The subject line of the message."
},
"action_id": {
"type": "integer",
"description": "The identifier for the message action within the campaign or broadcast the message belonged to."
},
"forgotten": {
"type": "boolean",
"description": "If true, the message content was forgotten."
},
"recipient": {
"type": "string",
"description": "The address of the recipient. May be an email address, MSISDN, or a device UUID."
},
"content_id": {
"type": "integer",
"nullable": true,
"description": "The newsletter variant for the message, if applicable."
},
"campaign_id": {
"type": "integer",
"description": "The campaign the message belongs to."
},
"customer_id": {
"type": "string",
"description": "The customer the message was sent to."
},
"broadcast_id": {
"type": "integer",
"nullable": true,
"description": "The broadcast the message was sent as a part of, if applicable."
},
"newsletter_id": {
"type": "integer",
"nullable": true,
"description": "The newsletter that the message was sent as a part of, if applicable."
},
"deduplicate_id": {
"type": "string",
"description": "A group identifier to deduplicate messages (useful if a customer may have received multiple messages of the same type)."
},
"failure_message": {
"type": "string",
"nullable": true,
"description": "An error, if the message did not make it to the customer."
},
"msg_template_id": {
"type": "string",
"deprecated": true,
"description": "The message template the message was created from."
}
}
}
}
}
}
CustomersGetSubscriptionPreferences400Response
{
"type": "object",
"properties": {
"meta": {
"type": "object",
"properties": {
"errors": {
"type": "array",
"items": {
"type": "string",
"description": "Error descriptions."
},
"description": "An array of errors."
}
}
}
}
}
CustomersGetSubscriptionPreferencesResponse
{
"type": "object",
"properties": {
"customer": {
"type": "object",
"properties": {
"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."
},
"header": {
"type": "object",
"properties": {
"title": {
"type": "string",
"description": "The header of the subscription preferences page."
},
"subtitle": {
"type": "string",
"description": "The subtitle or headline beneath the header of the subscription preferences page."
}
}
},
"topics": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "System-generated ID of the topic."
},
"name": {
"type": "string",
"description": "The name of the subscription topic."
},
"subscribed": {
"type": "boolean",
"description": "If true, the customer is subscribed to the topic. If false, the customer is unsubscribed from the topic."
},
"description": {
"type": "string",
"description": "The (optional) description of the topic."
}
}
},
"description": "A list of all subscription preferences for the 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"
},
"unsubscribed": {
"type": "boolean",
"description": "If true, the customer is unsubscribed from all messaging. If false, the customer is subscribed according to their topic preferences."
}
},
"description": "The profile you referenced by ID in the request."
}
}
}
CustomersListAttributesDevicesRequest
{
"type": "object",
"required": [
"ids"
],
"properties": {
"ids": {
"type": "array",
"items": {
"type": "string"
},
"maxItems": 100,
"minItems": 1,
"description": "An array of up to 100 customer IDs."
}
}
}
CustomersListAttributesDevicesResponse
{
"type": "object",
"properties": {
"customers": {
"type": "array",
"items": {
"type": "object",
"example": {
"customer": {
"id": "1X",
"devices": [
{
"id": "my_android_device_idX",
"platform": "android",
"last_used": 1514764800
},
{
"id": "my_ios_device_idX",
"platform": "ios",
"last_used": 1514764800
}
],
"attributes": {
"id": "1X",
"email": "test@example.com",
"title": "tester",
"cio_id": "03000001",
"created_at": "1489014595",
"department": "qa",
"_last_emailed": "1528932553",
"cio_subscription_preferences": "{\"topics\":{\"topic_7\":false,\"topic_8\":false}}",
"_cio_subscription_preferences_computed": "{\"topics\":{\"topic_6\":false,\"topic_7\":false,\"topic_8\":false}}"
},
"timestamps": {
"id": 1489014595,
"email": 1508932553,
"title": 1508932553,
"cio_id": 1489014595,
"created_at": 1489014595,
"department": 1508932553,
"_last_emailed": 1528932553,
"cio_subscription_preferences": 1673987303,
"_cio_subscription_preferences_computed": 0
},
"unsubscribed": false
}
},
"properties": {
"customer": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "The customer ID referenced in the request."
},
"devices": {
"type": "array",
"items": {
"allOf": [
{
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"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": "The properties representing an individual device. [Our SDK's](https://customer.io/docs/api/app/) gather all the properties defined below automatically, unless you disable the `autoTrackDeviceAttributes` setting. You can reference the properties outside the `attributes` object in segments or in Liquid."
},
"description": "Lists the devices associated with the customer profile."
},
"attributes": {
"type": "object",
"properties": {
"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."
},
"email": {
"type": "string",
"example": "test@example.com",
"nullable": true,
"description": "The email address of the customer."
},
"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."
},
"cio_subscription_preferences": {
"type": "string",
"description": "A person's stringified subscription preferences. These are preferences that a person set through the subscription center or attributes that you set on a person. A person who hasn't set their subscription preferences has computed preferences based on the nature of your topics (opt-in or opt-out). See the `_cio_subscription_preferences_computed` attribute for computed preferences.\n"
},
"_cio_subscription_preferences_computed": {
"type": "string",
"description": "Returns the computed subscription preferences for a person—any subscription preferences set on a person and the defaults for any subscription preferences _not_ set on a person—as stringified JSON. For example, if you have an \"opt-in\" topic that a person hasn't set a preference for, that topic would show `false`—even though a person doesn't have that attribute on their profile. [Learn more about topics](https://customer.io/docs/api/app/). \n"
}
},
"description": "Contains attributes assigned to this profile, including your workspace's people-identifiers (by default, these are `id`, `email`, and `cio_id`). Attributes are all stored as strings.",
"additionalProperties": {
"type": "string",
"description": "Non-identifier attributes assigned to this person.",
"x-additionalPropertiesName": "additional attributes"
}
},
"timestamps": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person's ID was generated."
},
"email": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person's email address was added."
},
"cio_id": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when `cio_id` was assigned."
},
"unsubscribed": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when the person unsubscribed."
},
"_last_emailed": {
"type": "integer",
"format": "unix timestamp",
"description": "The date-time when you last emailed a person."
},
"additionalProperties": {
"format": "unix timestamp",
"description": "Timestamps when attributes assigned to the person were set.",
"x-additionalPropertiesName": "additional attribute timestamps"
},
"cio_subscription_preferences": {
"type": "integer",
"format": "unix timestamp",
"description": "The datetime when a person's subscription preferences were last updated."
},
"_cio_subscription_preferences_computed": {
"type": "integer",
"description": "Because this value is computed and not actually set on a person, this value is always 0"
}
},
"description": "The epoch timestamps when corresponding attributes were set on the customer profile."
},
"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"
},
"unsubscribed": {
"type": "boolean",
"description": "If true, the person is unsubscribed from messages."
}
},
"description": "The profile you referenced by ID in the request."
}
}
}
}
}
}
| Version | Endpoints | Schemas | Ingested | Status |
|---|---|---|---|---|
| 1.0.0 | 111 | 440 | 2026-05-11 | current |
| 1.0.0 | 111 | 440 | 2026-04-16 |