/v1/exports/customers
Provide filters and attributes describing the customers you want to export. This endpoint returns export metadata; use the /exports/{export_id}/endpoint to download your export.
application/json
ExportsCreateCustomerExportRequest
| Property | Type | Required |
|---|---|---|
| filters | object | required |
Returns an export.
The request is malformed.
Your request is over the 10-per-second limit.
POST /v1/exports/customers
/v1/exports/deliveries
Provide filters for the newsletter, campaign, or action you want to return delivery information from. This endpoint starts an export, but you cannot download your export from this endpoint. Use the /exports/{export_id} endpoint to download your export.
Use the start and end to find messages within a time range. If your request doesn’t include start and end parameters, we’ll return the most recent 6 months of messages. If your start and end range is more than 12 months, we’ll return 12 months of data from the most recent timestamp in your request.
application/json
ExportsExportDeliveriesInfoRequest
Returns an export.
The request is malformed.
Your request is over the 10-per-second limit.
POST /v1/exports/deliveries
/v1/exports/{export_id}
Return information about a specific export.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| export_id | path | required | integer | The export_id you want to access. |
Returns an export.
The export ID does not exist.
Your request is over the 10-per-second limit.
GET /v1/exports/{export_id}
/v1/exports/{export_id}/download
This endpoint returns a signed link to download an export. The link expires after 15 minutes.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| export_id | path | required | integer | The export_id you want to access. |
Returns a link to an export.
The export ID does not exist.
Your request is over the 10-per-second limit.
GET /v1/exports/{export_id}/download
/v1/imports
This endpoint lets you upload a CSV file containing people, events, objects, or relationships. It provides a handy way of adding and updating them in bulk. Uploading people, objects, or relationships is like performing an identify call for each row in your CSV; uploading events is like performing a track call.
You’ll need to provide us the public URL of your CSV as a part of this operation. We recommend that you host your CSVs from short-lived URLs. Ideally, your URLs will expire 2 hours after you initiate an import so that your customers’ information doesn’t remain publicly available after you’ve uploaded it to us.
Check out the CSV requirements based on what you’re importing: people, events, and objects or relationships.
application/json
ImportsBulkUploadCsvRequest
| Property | Type | Required |
|---|---|---|
| import | object | required |
Returns an import payload.
Your request is over the 10-per-second limit.
POST /v1/imports
/v1/imports/{import_id}
This endpoint returns information about an “import”—a CSV file containing a group of people or events you uploaded to using v1/imports endpoint. You can use this endpoint to check to status of imports, or find out how many rows you successfully imported from a CSV file.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| import_id | path | required | integer | The |
Returns an import payload.
Your request is over the 10-per-second limit.
GET /v1/imports/{import_id}
/v1/info/ip_addresses
Returns a list of IP addresses that you need to allowlist if you’re using a firewall or Custom SMTP provider’s IP access management settings to deny access to unknown IP addresses.
These addresses apply to all message types and webhooks, except push notifications.
Returns an array of IP addresses.
Your request is over the 10-per-second limit.
GET /v1/info/ip_addresses
/v1/messages
Return a list of deliveries, including metrics for each delivery, for messages in your workspace. The request body contains filters determining the deliveries you want to return information about.
Use the start_ts and end_ts parameters to find messages within a time range. We limit your requests to 6 months. If your request doesn’t include start_ts and end_ts parameters, we’ll return the most recent 6 months of deliveries. If start_ts is greater than 6-months before end_ts, we only send back 6 months of data. If only end_ts is specified, we return 6 months of data before this timestamp. If only start_ts is specified, we then set the end_ts to the current time and deliver 6 months of data prior to this timestamp.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
| type | query | optional | string | The type of item you want to return metrics for. When empty, the response contains metrics for all possible types. |
| metric | query | optional | string | Determines the metric(s) you want to return. |
| drafts | query | optional | boolean | If true, your request returns drafts rather than active/sent messages. |
| campaign_id | query | optional | integer | The campaign you want to filter for. |
| newsletter_id | query | optional | integer | The newsletter you want to filter for. |
| action_id | query | optional | integer | The action you want to filter for. |
| start_ts | query | optional | integer | The beginning timestamp for your query. |
| end_ts | query | optional | integer | The ending timestamp for your query. |
Returns an array of message objects.
The request was malformed.
Your request is over the 10-per-second limit.
GET /v1/messages
/v1/messages/{message_id}
Return a information about, and metrics for, a delivery—the instance of a message intended for an individual recipient person.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| message_id | path | required | string | The identifier of a message. |
Returns a message object.
The message does not exist.
Your request is over the 10-per-second limit.
GET /v1/messages/{message_id}
/v1/messages/{message_id}/archived_message
Returns the archived copy of a delivery, including the message body, recipient, and metrics. This endpoint is limited to 100 requests per day.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| message_id | path | required | string | The identifier of a message. |
Returns the archived message object.
The message does not exist.
Your request is over the 10-per-second limit.
GET /v1/messages/{message_id}/archived_message
/v1/newsletters
Returns a list of your newsletters and associated metadata.
Returns an array of newsletter objects.
GET /v1/newsletters
/v1/newsletters/{newsletter_id}
Returns metadata for an individual newsletter.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
Returns metadata for the newsletter.
The newsletter you requested does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}
/v1/newsletters/{newsletter_id}/contents
Returns the content variants of a newsletter—these are either different languages in a multi-language newsletter or A/B tests.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
Returns newsletter content_ids. Each object represents an individual variant of this newsletter.
The newsletter you requested does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/contents
/v1/newsletters/{newsletter_id}/contents/{content_id}
Returns information about a specific variant of a newsletter, where a variant is either a language in a multi-language newsletter or a part of an A/B test.
| 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. |
Returns newsletter content.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/contents/{content_id}
/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}/contents/{content_id}/metrics
Returns a metrics for an individual newsletter variant—either an individual language in a multi-language newsletter or a message in an A/B test. This endpoint returns metrics both in total and in steps (days, weeks, etc) over a period of time. Stepped series metrics are arranged from oldest to newest (i.e. the 0-index for any result is the oldest period/step).
You cannot request fewer than 2 steps of any period (2 hours, 2 days, 2 weeks, or 2 months). For instance, ?period=days&steps=1 means two days - the 48 hours before the API request was made. ?period=days&steps=0 returns the same as the maximum of the period - ?period=days&steps=45. See the steps parameter below for the maximum count of each period.
| 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. |
| period | query | optional | string | The unit of time for your report. |
| steps | query | optional | integer | The number of periods you want to return. Defaults to the maximum available, or |
| type | query | optional | string | The type of item you want to return metrics for. When empty, the response contains metrics for all possible types. |
Returns newsletter variant metrics by series (with increments are based on the period and step in your request) for the newsletter.
The newsletter and/or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/contents/{content_id}/metrics
/v1/newsletters/{newsletter_id}/contents/{content_id}/metrics/links
Returns link click metrics for an individual newsletter variant—an individual language in a multi-language newsletter or a message in an A/B test. Unless you specify otherwise, the response contains data for the maximum period by days (45 days).
You cannot request fewer than 2 steps of any period (2 hours, 2 days, 2 weeks, or 2 months). For instance, ?period=days&steps=1 means two days - the 48 hours before the API request was made. ?period=days&steps=0 returns the same as the maximum of the period - ?period=days&steps=45. See the steps parameter below for the maximum count of each period.
| 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. |
| period | query | optional | string | The unit of time for your report. |
| steps | query | optional | integer | The number of periods you want to return. Defaults to the maximum available, or |
| type | query | optional | string | The type of item you want to return metrics for. When empty, the response contains metrics for all possible types. |
Returns newsletter variant metrics by series (with increments are based on the period and step in your request) for the newsletter.
The newsletter and/or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/contents/{content_id}/metrics/links
/v1/newsletters/{newsletter_id}/language/{language}
Returns information about a specific language variant of a newsletter. If your newsletter includes A/B tests, use Get 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. |
Returns newsletter content for a language variant.
The language does not exist.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/language/{language}
/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}/messages
Returns information about the deliveries (instances of messages sent to individual people) sent from a newsletter. Provide query parameters to refine the metrics you want to return.
Use the start_ts and end_ts to find messages within a time range. If your request doesn’t include start_ts and end_ts parameters, we’ll return up to 6 months of results beginning with the first delivery generated from the newsletter. If your start_ts and end_ts range is more than 12 months, we’ll return 12 months of data from the most recent timestamp in your request.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
| metric | query | optional | string | Determines the metric(s) you want to return. |
| start_ts | query | optional | integer | The beginning timestamp for your query. |
| end_ts | query | optional | integer | The ending timestamp for your query. |
Returns an array of messages. Each object represents a different message in your newsletter.
The newsletter you requested does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/messages
/v1/newsletters/{newsletter_id}/metrics
Returns a list of metrics for an individual newsletter in steps (days, weeks, etc). We return metrics from oldest to newest (i.e. the 0-index for any result is the oldest step/period).
You cannot request fewer than 2 steps of any period (2 hours, 2 days, 2 weeks, or 2 months). For instance, ?period=days&steps=1 means two days - the 48 hours before the API request was made. ?period=days&steps=0 returns the same as the maximum of the period - ?period=days&steps=45. See the steps parameter below for the maximum count of each period.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| period | query | optional | string | The unit of time for your report. |
| steps | query | optional | integer | The number of periods you want to return. Defaults to the maximum available, or |
| type | query | optional | string | The type of item you want to return metrics for. When empty, the response contains metrics for all possible types. |
Returns newsletter metrics by series (with increments are based on the period and step in your request) for the newsletter.
The newsletter you requested does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/metrics
/v1/newsletters/{newsletter_id}/metrics/links
Returns metrics for link clicks within a newsletter, both in total and in series periods (days, weeks, etc). series metrics are ordered oldest to newest (i.e. the 0-index for any result is the oldest step/period).
You cannot request fewer than 2 steps of any period (2 hours, 2 days, 2 weeks, or 2 months). For instance, ?period=days&steps=1 means two days - the 48 hours before the API request was made. ?period=days&steps=0 returns the same as the maximum of the period - ?period=days&steps=45. See the steps parameter below for the maximum count of each period.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
| period | query | optional | string | The unit of time for your report. |
| steps | query | optional | integer | The number of periods you want to return. Defaults to the maximum available, or |
| unique | query | optional | boolean | If true, the response contains only unique customer results, i.e. a customer who clicks a link twice is only counted once. If false, the response contains the total number of results without regard to uniqueness. |
Returns an array of link objects. Each object represents a different link in your newsletter and contains independent metrics.
The newsletter you requested does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/metrics/links
/v1/newsletters/{newsletter_id}/test_group/{test_group_id}/language/{language}
Returns information about a specific language variant of a newsletter in an A/B test group. You can retrieve 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. |
Returns newsletter content for a language variant in a test group.
The language does not exist.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/test_group/{test_group_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/newsletters/{newsletter_id}/test_groups
Returns information about each test group in a newsletter, including content ids for each group.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| newsletter_id | path | required | integer | The identifier of a newsletter. |
Returns metadata for each test group in a newsletter.
The newsletter or variant does not exist.
Your request is over the 10-per-second limit.
GET /v1/newsletters/{newsletter_id}/test_groups
/v1/object_types
Returns a list of object types in your system. Because each object type is an incrementing ID, you may need to use this endpoint to find the ID of the object type you want to query, create, or modify.
Returns an array of types.
Unauthorized request. Make sure that you provided the right credentials.
Your request is over the 10-per-second limit.
GET /v1/object_types
/v1/objects
Use a set of filter conditions to find objects in your workspace. Returns a list of object IDs that you can use to look up object attributes, or to create or modify objects.
The list is paged if you have a large number of objects. You can set the limit for the number of objects returned, and use the start to page through the results. It’s possible that you’ll see duplicate entries across pages. If you want to export objects or relationships, you may want to use the export feature in our UI to return complete results.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
The object_type_id you want to search in, and the filter you want to apply to find objects. Both are required. The object called object_attribute requires type_id, as well, which should match the object_type_id.
application/json
ObjectsFindObjectsFilterRequest
| Property | Type | Required |
|---|---|---|
| filter | object | required |
| object_type_id | string | required |
Returns arrays of identifiers and ids.
Your request is over the 10-per-second limit.
POST /v1/objects
/v1/objects/{object_type_id}/{object_id}/attributes
Get a list of attributes for an object. Attributes are things you know about an object—like an account name, billing date, etc.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| object_type_id | path | required | integer | The object type an object belongs to—like “Companies” or “Accounts”. Object type IDs begin at |
| object_id | path | required | string | The |
| id_type | query | optional | string | — |
Returns information about the attributes for the object specified in the endpoint path.
Unauthorized request. Make sure that you provided the right credentials.
Your request is over the 10-per-second limit.
GET /v1/objects/{object_type_id}/{object_id}/attributes
/v1/objects/{object_type_id}/{object_id}/relationships
Get a list of people people related to an object.
You can use the start parameter with the next property in responses to return pages of results. However, it’s possible that you’ll see duplicate entries across pages. If you want to export objects or relationships, you may want to use the export feature in our UI to return complete results.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| object_type_id | path | required | integer | The object type an object belongs to—like “Companies” or “Accounts”. Object type IDs begin at |
| object_id | path | required | string | The |
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
| id_type | query | optional | string | — |
Returns an array of cio_relationships. Each object in the array represents a person related to the object specified in the endpoint path.
Your request is over the 10-per-second limit.
GET /v1/objects/{object_type_id}/{object_id}/relationships
/v1/reporting_webhooks
Return a list of all of your reporting webhooks
Returns an array of your reporting_webhooks.
Your request is over the 10-per-second limit.
GET /v1/reporting_webhooks
/v1/reporting_webhooks
Create a new webhook configuration.
application/json
ReportingWebhooksCreateWebhookConfigRequest
| 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.
Your request is over the 10-per-second limit.
POST /v1/reporting_webhooks
/v1/reporting_webhooks/{webhook_id}
Delete a reporting webhook’s configuration.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| webhook_id | path | required | integer | The identifier of a webhook. |
A successful request has no response.
The webhook ID does not exist.
Your request is over the 10-per-second limit.
DELETE /v1/reporting_webhooks/{webhook_id}
/v1/reporting_webhooks/{webhook_id}
Returns information about a specific reporting webhook.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| webhook_id | path | required | integer | The identifier of a webhook. |
Returns an individual webhook configuration.
The webhook ID does not exist.
Your request is over the 10-per-second limit.
GET /v1/reporting_webhooks/{webhook_id}
/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/segments
Retrieve a list of all of your segments.
Returns an array of segments. Each object in the response represents an individual segment.
Your request is over the 10-per-second limit.
GET /v1/segments
/v1/segments
Create a manual segment with a name and a description. This request creates an empty segment.
application/json
SegmentsCreateManualSegmentRequest
| Property | Type | Required |
|---|---|---|
| segment | object | required |
| └ name | string | required |
| └ description | string | optional |
Returns the segment ID and other information.
The request was malformed.
Your request is over the 10-per-second limit.
POST /v1/segments
/v1/segments/{segment_id}
Delete a manual segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The identifier for a segment. You can find your segment’s ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API. |
The segment is deleted.
The segment_id does not exist.
Your request is over the 10-per-second limit.
DELETE /v1/segments/{segment_id}
/v1/segments/{segment_id}
Return information about a segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The identifier for a segment. You can find your segment’s ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API. |
Returns the information about the segment.
The segment_id does not exist.
Your request is over the 10-per-second limit.
GET /v1/segments/{segment_id}
/v1/segments/{segment_id}/customer_count
Returns the membership count for a segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The identifier for a segment. You can find your segment’s ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API. |
Returns the customer count for a segment.
The segment_id does not exist.
Your request is over the 10-per-second limit.
GET /v1/segments/{segment_id}/customer_count
/v1/segments/{segment_id}/membership
Returns customers in a segment. This endpoint returns an array of identifiers; each object in the array represents a person and contains the identifier values allowed in your workspace. In general, we recommend that you use identifiers rather than ids to find people, because it provides more information.
If your workspace does not use email as a unique identifier for people, identifiers does not contain email values. Go to your Workspace Settings to find out which identifiers your workspace supports.
The ids array only lists ID values for people in a segment; if your workspace uses both email and id as identifiers, it’s possible that a member of your segment does not have an id value, resulting in an empty string in the ids array.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The identifier for a segment. You can find your segment’s ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API. |
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
Returns an array of customers for a segment.
The segment_id does not exist.
Your request is over the 10-per-second limit.
GET /v1/segments/{segment_id}/membership
/v1/segments/{segment_id}/used_by
Use this endpoint to find out which campaigns and newsletters use a segment.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| segment_id | path | required | integer | The identifier for a segment. You can find your segment’s ID on its page in the dashboard—go to Segments, select your segment, and find the ID under Usage. Or you can find your segment using the App API. |
Returns the IDs of items that reference the segment.
The segment_id does not exist.
Your request is over the 10-per-second limit.
GET /v1/segments/{segment_id}/used_by
/v1/campaigns/{broadcast_id}/triggers
Manually trigger a broadcast, and provide data to populate messages in your trigger. The shape of the request changes based on the type of audience you broadcast to: a segment, a list of emails, a list of customer IDs, a map of users, or a data file. You can reference properties in the data object from this request using liquid—{{trigger.<property_in_data_obj>}}.
If your broadcast produces a 422 error, you can get more information about the errors to see what went wrong.
This endpoint is rate-limited to one request every 10 seconds. After exceeding this, you’ll receive a status of 429. Broadcasts are optimized to send messages to a large audience and not for one-to-one interactions. Use our transactional API or event-triggered campaigns to respond to your audience on an individual, one-to-one basis.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| broadcast_id | path | required | integer | The ID of the broadcast that you want to trigger. |
application/json
SendMessagesTriggerBroadcastRequest
A successful request returns the trigger ID.
Unauthorized request. Make sure that you provided the right credentials.
The broadcast_id does not exist.
The broadcast has one or more validation errors. You can learn more by checking your broadcast for errors using the trigger_id found in the error detail.
POST /v1/campaigns/{broadcast_id}/triggers
/v1/send/email
Send a transactional email. You can send a message using a transactional_message_id or send your own body, subject, and from values at send time. The transactional_message_id can be either the numerical ID for the template or the Trigger Name that you assigned the template.
If you want to send your own body, subject, and from values to populate your message at send time, we recommend that you pass a transactional_message_id anyway; the values you pass in the request will override the template.
You can find your transactional_message_id from the code sample in the Overview tab for your transactional message in the user interface, or you can look up a list of your transactional messages through the App API.
Customer.io attributes metrics to a transactional_message_id; if you don’t provide a transactional_message_id, we attribute metrics to "transactional_message_id": 1. You can create empty transactional messages in the UI and override the body, subject, and from values at send time. This provides flexibility in your integration and lets you organize metrics (rather than gathering metrics for all of your transactional messages against a single ID).
application/json
SendMessagesTransactionalEmailRequest
Returns a unique ID for the delivery.
The request was malformed.
POST /v1/send/email
/v1/send/push
Send a transactional push. You send a message using a transactional_message_id for a transactional push message template composed in the user interface. You can optionally override any of the template values at send time. The transactional_message_id can be either the numerical ID for the template or the Trigger Name that you assigned the template.
You can find your transactional_message_id from the code sample in the Overview tab for your transactional message in the user interface, or you can look up a list of your transactional messages through the App API.
application/json
SendMessagesTransactionalPushRequest
| Property | Type | Required |
|---|---|---|
| transactional_message_id | object | required |
| to | string | required |
| link | string | optional |
| sound | string | optional |
| title | string | optional |
| message | string | optional |
| language | string | optional |
| image_url | string | optional |
| custom_data | object | optional |
| custom_device | object | optional |
| └ token | string | required |
| └ platform | string | required |
| └ last_used | integer | optional |
| └ attributes | object | optional |
| └ device_os | string | optional |
| └ app_version | string | optional |
| └ _last_status | string | optional |
| └ device_model | string | optional |
| └ push_enabled | string | optional |
| └ device_locale | string | optional |
| └ cio_sdk_version | string | optional |
| custom_payload | object | optional |
| └ ios | object | optional |
| └ android | object | optional |
| └ message | object | required |
| └ data | object | optional |
| └ android | object | optional |
| └ notification | object | optional |
| send_at | integer | optional |
| identifiers | object | required |
| queue_draft | boolean | optional |
| message_data | object | optional |
| send_to_unsubscribed | boolean | optional |
| disable_message_retention | boolean | optional |
Returns a unique ID for the delivery.
The request was malformed.
POST /v1/send/push
/v1/sender_identities
Returns a list of senders in your workspace. Senders are who your messages are “from”.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| start | query | optional | string | The token for the page of results you want to return. Responses contain a |
| limit | query | optional | integer | The maximum number of results you want to retrieve per page. |
| sort | query | optional | string | Determine how you want to sort results, |
Returns an array of sender_identities.
Your request is over the 10-per-second limit.
GET /v1/sender_identities
/v1/sender_identities/{sender_id}
Returns information about a specific sender.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sender_id | path | required | integer | The identifier of a sender. |
Returns the sender_identity you requested.
The sender does not exist.
Your request is over the 10-per-second limit.
GET /v1/sender_identities/{sender_id}
/v1/sender_identities/{sender_id}/used_by
Returns lists of the campaigns and newsletters that use a sender.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| sender_id | path | required | integer | The identifier of a sender. |
Returns arrays of campaigns and newsletters.
The sender does not exist.
Your request is over the 10-per-second limit.
GET /v1/sender_identities/{sender_id}/used_by
/v1/snippets
Returns a list of snippets in your workspace. Snippets are pieces of reusable content, like a common footer for your emails.
Returns an array of snippets.
GET /v1/snippets
/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/snippets/{snippet_name}
Remove a snippet. You can only remove a snippet that is not in use. If your snippet is in use, you’ll receive a 400 error.
| Name | In | Required | Type | Description |
|---|---|---|---|---|
| snippet_name | path | required | string | The name of a snippet. |
A successful delete operation returns no content.
The snippet is in use. You can’t delete a snippet until you remove it from messages, templates, etc.
The snippet does not exist.
Your request is over the 10-per-second limit.
DELETE /v1/snippets/{snippet_name}