Exports 4 endpoints

POST /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.

operationId: Exports_createCustomerExport

Request Body

application/json
schema ExportsCreateCustomerExportRequest
Property Type Required
filters object required

Responses

200

Returns an export.

400

The request is malformed.

429

Your request is over the 10-per-second limit.

POST /v1/exports/customers
POST /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.

operationId: Exports_exportDeliveriesInfo

Request Body

application/json
schema ExportsExportDeliveriesInfoRequest

Responses

200

Returns an export.

400

The request is malformed.

429

Your request is over the 10-per-second limit.

POST /v1/exports/deliveries
GET /v1/exports/{export_id}

Return information about a specific export.

operationId: Exports_getExportInfo

Parameters

Name In Required Type Description
export_id path required integer

The export_id you want to access.

Responses

200

Returns an export.

404

The export ID does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/exports/{export_id}
GET /v1/exports/{export_id}/download

This endpoint returns a signed link to download an export. The link expires after 15 minutes.

operationId: Exports_downloadExportSignedLink

Parameters

Name In Required Type Description
export_id path required integer

The export_id you want to access.

Responses

200

Returns a link to an export.

404

The export ID does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/exports/{export_id}/download

Imports 2 endpoints

POST /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.

operationId: Imports_bulkUploadCsv

Request Body

application/json
schema ImportsBulkUploadCsvRequest
Property Type Required
import object required

Responses

200

Returns an import payload.

429

Your request is over the 10-per-second limit.

POST /v1/imports
GET /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.

operationId: Imports_getBulkImport

Parameters

Name In Required Type Description
import_id path required integer

The id of the import you want to lookup. This value is returned from a successful import.

Responses

200

Returns an import payload.

429

Your request is over the 10-per-second limit.

GET /v1/imports/{import_id}

Info 1 endpoints

GET /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.

operationId: Info_listIpAddresses

Responses

200

Returns an array of IP addresses.

429

Your request is over the 10-per-second limit.

GET /v1/info/ip_addresses

Messages 3 endpoints

GET /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.

operationId: Messages_listDeliveries

Parameters

Name In Required Type Description
start query optional string

The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

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.

Responses

200

Returns an array of message objects.

400

The request was malformed.

429

Your request is over the 10-per-second limit.

GET /v1/messages
GET /v1/messages/{message_id}

Return a information about, and metrics for, a delivery—the instance of a message intended for an individual recipient person.

operationId: Messages_getMessageMetrics

Parameters

Name In Required Type Description
message_id path required string

The identifier of a message.

Responses

200

Returns a message object.

404

The message does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/messages/{message_id}
GET /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.

operationId: Messages_getArchivedMessage

Parameters

Name In Required Type Description
message_id path required string

The identifier of a message.

Responses

200

Returns the archived message object.

404

The message does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/messages/{message_id}/archived_message

Newsletters 15 endpoints

GET /v1/newsletters

Returns a list of your newsletters and associated metadata.

operationId: Newsletters_listNewsletters

Responses

200

Returns an array of newsletter objects.

GET /v1/newsletters
GET /v1/newsletters/{newsletter_id}

Returns metadata for an individual newsletter.

operationId: Newsletters_getMetadata

Parameters

Name In Required Type Description
newsletter_id path required integer

The identifier of a newsletter.

Responses

200

Returns metadata for the newsletter.

404

The newsletter you requested does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}
GET /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.

operationId: Newsletters_listVariants

Parameters

Name In Required Type Description
newsletter_id path required integer

The identifier of a newsletter.

Responses

200

Returns newsletter content_ids. Each object represents an individual variant of this newsletter.

404

The newsletter you requested does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/contents
GET /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.

operationId: Newsletters_getVariantInfo

Parameters

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.

Responses

200

Returns newsletter content.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/contents/{content_id}
PUT /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.

operationId: Newsletters_updateVariantContents

Parameters

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.

Request Body

application/json
schema 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

Responses

200

Returns the updated newsletter variant.

400

The request is malformed.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

PUT /v1/newsletters/{newsletter_id}/contents/{content_id}
GET /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.

operationId: Newsletters_getVariantMetrics

Parameters

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 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.

type query optional string

The type of item you want to return metrics for. When empty, the response contains metrics for all possible types.

Responses

200

Returns newsletter variant metrics by series (with increments are based on the period and step in your request) for the newsletter.

404

The newsletter and/or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/contents/{content_id}/metrics
GET /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.

operationId: Newsletters_getNewsletterVariantLinkMetrics

Parameters

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 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.

type query optional string

The type of item you want to return metrics for. When empty, the response contains metrics for all possible types.

Responses

200

Returns newsletter variant metrics by series (with increments are based on the period and step in your request) for the newsletter.

404

The newsletter and/or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/contents/{content_id}/metrics/links
GET /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.

operationId: Newsletters_getTranslation

Parameters

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.

Responses

200

Returns newsletter content for a language variant.

400

The language does not exist.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/language/{language}
PUT /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.

operationId: Newsletters_updateTranslation

Parameters

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.

Request Body

application/json
schema 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

Responses

200

Returns the updated newsletter variant.

400

The language does not exist.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

PUT /v1/newsletters/{newsletter_id}/language/{language}
GET /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.

operationId: Newsletters_getMessageMetadata

Parameters

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 next property. Use this property as the start value to return the next page of results.

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.

Responses

200

Returns an array of messages. Each object represents a different message in your newsletter.

404

The newsletter you requested does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/messages
GET /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.

operationId: Newsletters_getMetrics

Parameters

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 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.

type query optional string

The type of item you want to return metrics for. When empty, the response contains metrics for all possible types.

Responses

200

Returns newsletter metrics by series (with increments are based on the period and step in your request) for the newsletter.

404

The newsletter you requested does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/metrics
GET /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.

operationId: Newsletters_getLinkMetrics

Parameters

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 12 if the period is in months. Maximums are 24 hours, 45 days, 12 weeks, or 120 months.

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.

Responses

200

Returns an array of link objects. Each object represents a different link in your newsletter and contains independent metrics.

404

The newsletter you requested does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/metrics/links
GET /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.

operationId: Newsletters_getTranslationInfo

Parameters

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.

Responses

200

Returns newsletter content for a language variant in a test group.

400

The language does not exist.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/test_group/{test_group_id}/language/{language}
PUT /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.

operationId: Newsletters_updateTranslation

Parameters

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.

Request Body

application/json
schema 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

Responses

200

Returns the updated newsletter variant.

400

The language does not exist.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

PUT /v1/newsletters/{newsletter_id}/test_group/{test_group_id}/language/{language}
GET /v1/newsletters/{newsletter_id}/test_groups

Returns information about each test group in a newsletter, including content ids for each group.

operationId: Newsletters_listTestGroups

Parameters

Name In Required Type Description
newsletter_id path required integer

The identifier of a newsletter.

Responses

200

Returns metadata for each test group in a newsletter.

404

The newsletter or variant does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/newsletters/{newsletter_id}/test_groups

Objects 4 endpoints

GET /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.

operationId: Objects_getAllObjectTypes

Responses

200

Returns an array of types.

401

Unauthorized request. Make sure that you provided the right credentials.

429

Your request is over the 10-per-second limit.

GET /v1/object_types
POST /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.

operationId: Objects_findObjectsFilter

Parameters

Name In Required Type Description
start query optional string

The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

limit query optional integer

The maximum number of results you want to retrieve per page.

Request Body

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
schema ObjectsFindObjectsFilterRequest
Property Type Required
filter object required
object_type_id string required

Responses

200

Returns arrays of identifiers and ids.

429

Your request is over the 10-per-second limit.

POST /v1/objects
GET /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.

operationId: Objects_getAttributes

Parameters

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 1 and increment for each new type.

object_id path required string

The object_id or cio_object_id of an object, depending on the id_type specified in query params. id_type defaults to object_id.

id_type query optional string

Responses

200

Returns information about the attributes for the object specified in the endpoint path.

401

Unauthorized request. Make sure that you provided the right credentials.

429

Your request is over the 10-per-second limit.

GET /v1/objects/{object_type_id}/{object_id}/attributes
GET /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.

operationId: Objects_getObjectRelationships

Parameters

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 1 and increment for each new type.

object_id path required string

The object_id or cio_object_id of an object, depending on the id_type specified in query params. id_type defaults to object_id.

start query optional string

The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

limit query optional integer

The maximum number of results you want to retrieve per page.

id_type query optional string

Responses

200

Returns an array of cio_relationships. Each object in the array represents a person related to the object specified in the endpoint path.

429

Your request is over the 10-per-second limit.

GET /v1/objects/{object_type_id}/{object_id}/relationships

Reportingwebhooks 5 endpoints

GET /v1/reporting_webhooks

Return a list of all of your reporting webhooks

operationId: ReportingWebhooks_listReportingWebhooks

Responses

200

Returns an array of your reporting_webhooks.

429

Your request is over the 10-per-second limit.

GET /v1/reporting_webhooks
POST /v1/reporting_webhooks

Create a new webhook configuration.

operationId: ReportingWebhooks_createWebhookConfig

Request Body

application/json
schema 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

Responses

200

Returns your webhook configuration and the ID of the webhook.

400

The request was malformed.

429

Your request is over the 10-per-second limit.

POST /v1/reporting_webhooks
DELETE /v1/reporting_webhooks/{webhook_id}

Delete a reporting webhook’s configuration.

operationId: ReportingWebhooks_deleteWebhookConfiguration

Parameters

Name In Required Type Description
webhook_id path required integer

The identifier of a webhook.

Responses

200

A successful request has no response.

404

The webhook ID does not exist.

429

Your request is over the 10-per-second limit.

DELETE /v1/reporting_webhooks/{webhook_id}
GET /v1/reporting_webhooks/{webhook_id}

Returns information about a specific reporting webhook.

operationId: ReportingWebhooks_getWebhookInfo

Parameters

Name In Required Type Description
webhook_id path required integer

The identifier of a webhook.

Responses

200

Returns an individual webhook configuration.

404

The webhook ID does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/reporting_webhooks/{webhook_id}
PUT /v1/reporting_webhooks/{webhook_id}

Update the configuration of a reporting webhook. Turn events on or off, change the webhook URL, etc.

operationId: ReportingWebhooks_updateConfiguration

Parameters

Name In Required Type Description
webhook_id path required integer

The identifier of a webhook.

Request Body

application/json
schema 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

Responses

200

Returns your webhook configuration and the ID of the webhook.

400

The request was malformed.

404

The webhook ID does not exist.

429

Your request is over the 10-per-second limit.

PUT /v1/reporting_webhooks/{webhook_id}

Segments 7 endpoints

GET /v1/segments

Retrieve a list of all of your segments.

operationId: Segments_list

Responses

200

Returns an array of segments. Each object in the response represents an individual segment.

429

Your request is over the 10-per-second limit.

GET /v1/segments
POST /v1/segments

Create a manual segment with a name and a description. This request creates an empty segment.

operationId: Segments_createManualSegment

Request Body

application/json
schema SegmentsCreateManualSegmentRequest
Property Type Required
segment object required
name string required
description string optional

Responses

200

Returns the segment ID and other information.

400

The request was malformed.

429

Your request is over the 10-per-second limit.

POST /v1/segments
DELETE /v1/segments/{segment_id}

Delete a manual segment.

operationId: Segments_deleteManualSegment

Parameters

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.

Responses

204

The segment is deleted.

404

The segment_id does not exist.

429

Your request is over the 10-per-second limit.

DELETE /v1/segments/{segment_id}
GET /v1/segments/{segment_id}

Return information about a segment.

operationId: Segments_getSegmentInfo

Parameters

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.

Responses

200

Returns the information about the segment.

404

The segment_id does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/segments/{segment_id}
GET /v1/segments/{segment_id}/customer_count

Returns the membership count for a segment.

operationId: Segments_getCustomerCount

Parameters

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.

Responses

200

Returns the customer count for a segment.

404

The segment_id does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/segments/{segment_id}/customer_count
GET /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.

operationId: Segments_listMembership

Parameters

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 next property. Use this property as the start value to return the next page of results.

limit query optional integer

The maximum number of results you want to retrieve per page.

Responses

200

Returns an array of customers for a segment.

404

The segment_id does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/segments/{segment_id}/membership
GET /v1/segments/{segment_id}/used_by

Use this endpoint to find out which campaigns and newsletters use a segment.

operationId: Segments_getDependencies

Parameters

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.

Responses

200

Returns the IDs of items that reference the segment.

404

The segment_id does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/segments/{segment_id}/used_by

Sendmessages 3 endpoints

POST /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.

operationId: SendMessages_triggerBroadcast

Parameters

Name In Required Type Description
broadcast_id path required integer

The ID of the broadcast that you want to trigger.

Request Body

application/json
schema SendMessagesTriggerBroadcastRequest

Responses

200

A successful request returns the trigger ID.

401

Unauthorized request. Make sure that you provided the right credentials.

404

The broadcast_id does not exist.

422

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
POST /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).

operationId: SendMessages_transactionalEmail

Request Body

application/json
schema SendMessagesTransactionalEmailRequest

Responses

200

Returns a unique ID for the delivery.

400

The request was malformed.

POST /v1/send/email
POST /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.

operationId: SendMessages_transactionalPush

Request Body

application/json
schema 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

Responses

200

Returns a unique ID for the delivery.

400

The request was malformed.

POST /v1/send/push

Senderidentities 3 endpoints

GET /v1/sender_identities

Returns a list of senders in your workspace. Senders are who your messages are “from”.

operationId: SenderIdentities_list

Parameters

Name In Required Type Description
start query optional string

The token for the page of results you want to return. Responses contain a next property. Use this property as the start value to return the next page of results.

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, asc for chronological order and desc for reverse chronological order.

Responses

200

Returns an array of sender_identities.

429

Your request is over the 10-per-second limit.

GET /v1/sender_identities
GET /v1/sender_identities/{sender_id}

Returns information about a specific sender.

operationId: SenderIdentities_getSenderInfo

Parameters

Name In Required Type Description
sender_id path required integer

The identifier of a sender.

Responses

200

Returns the sender_identity you requested.

404

The sender does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/sender_identities/{sender_id}
GET /v1/sender_identities/{sender_id}/used_by

Returns lists of the campaigns and newsletters that use a sender.

operationId: SenderIdentities_getUsageData

Parameters

Name In Required Type Description
sender_id path required integer

The identifier of a sender.

Responses

200

Returns arrays of campaigns and newsletters.

404

The sender does not exist.

429

Your request is over the 10-per-second limit.

GET /v1/sender_identities/{sender_id}/used_by

Snippets 3 endpoints

GET /v1/snippets

Returns a list of snippets in your workspace. Snippets are pieces of reusable content, like a common footer for your emails.

operationId: Snippets_list

Responses

200

Returns an array of snippets.

GET /v1/snippets
PUT /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.

operationId: Snippets_createOrUpdate

Request Body

application/json
schema SnippetsCreateOrUpdateRequest
Property Type Required
name string required
value string required
updated_at integer optional

Responses

200

Returns an array of snippets.

400

The request is malformed.

429

Your request is over the 10-per-second limit.

PUT /v1/snippets
DELETE /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.

operationId: Snippets_removeSnippet

Parameters

Name In Required Type Description
snippet_name path required string

The name of a snippet.

Responses

204

A successful delete operation returns no content.

400

The snippet is in use. You can’t delete a snippet until you remove it from messages, templates, etc.

404

The snippet does not exist.

429

Your request is over the 10-per-second limit.

DELETE /v1/snippets/{snippet_name}
Load more endpoints