Back

Customer.io API Essential Guide

Aug 14, 20246 minute read

What type of API does Customer.io provide?

Based on the search results provided, Customer.io appears to have a REST API. The search results do not explicitly mention what type of API Customer.io uses, but Source 3 refers to the "Journeys Track API" and "Journeys App API" for Customer.io, which suggests they offer API access. While the specific API type is not stated, REST is currently the most common API architecture for web services, and the documentation structure in Source 3 (with endpoints for different resources) is typical of REST API documentation. There is no mention of SOAP or GraphQL specifically for Customer.io's API. Given this information, it is most likely that Customer.io uses a REST API, as that is the industry standard for modern web services.

Does the Customer.io API have webhooks?

Yes, the official Customer.io API does have webhooks. Here are the key points about Customer.io's webhook capabilities:

Webhook Types

  1. Reporting Webhooks: These send real-time message activity events (e.g., sends, opens, clicks) as JSON in an HTTP POST.

  2. Webhook Actions: These allow you to send custom webhooks to specific APIs via your workflow.

  3. Webhook-Triggered Campaigns: These let you trigger workflows when you receive data from an external source.

Events You Can Subscribe To

For Reporting Webhooks, you can subscribe to various events, including:

  • Email events: sent, opened, clicked, bounced, etc.
  • Push notification events: sent, opened, etc.
  • SMS events: sent, delivered, etc.
  • Webhook events: sent, failed, undeliverable.

Key Points to Consider

  1. Webhook Format: Customer.io Webhooks are HTTP POST requests encoded in JSON.

  2. Customization: You can customize the send frequency and body content of webhooks.

  3. Security: It's possible to add basic authentication to webhook endpoints.

  4. Unique Identifiers: Each message sent from Customer.io has a unique delivery_id.

  5. Webhook-Triggered Campaigns: These allow you to use JSON data from external sources to trigger campaigns in Customer.io.

Best Practices

  1. Use HTTPS for webhook endpoints to protect customer information.

  2. Consider enabling the Body Content option to include message body content in "Sent" events.

  3. For webhook-triggered campaigns, transform the incoming data to fit your needs as part of your workflow.

  4. Use the X-CIO-Delivery-ID in the header of messages to uniquely identify them when working with third-party providers.

In summary, Customer.io offers robust webhook functionality, allowing you to both send and receive data, trigger campaigns, and track various message-related events across different channels.

Rate Limits and other limitations

Here are the key API rate limits for the Customer.io API:

Track API Limits

  • Fair-use rate limit of 100 requests per second for both active data integrations and historical backfill scripts [1]
  • This is a soft limit - Customer.io does not actively throttle or drop calls if exceeded, but may reach out if consistently exceeded [1][2]
  • Applies to both v1 and v2 Track APIs [1]

App API Limits

  • Most requests limited to 10 per second [3]
  • Transactional email endpoint limited to 100 requests per second [3]
  • API-triggered broadcast endpoint limited to 1 request every 10 seconds [3]

Other Key Limits

  • v2 Track API single endpoint: 32kb max request size [1]
  • v2 Track API batch endpoint: 500kb max request size [1]
  • API-triggered broadcasts: Limited to 5 triggers queued at a time [3]
  • Customer attributes: Max 300 unique attributes per person [1]

Important Notes

  • The Track API 100/second limit is a soft limit - exceeding it does not automatically result in dropped data [1][2]
  • Customer.io may reach out if limits are consistently exceeded to help correct integrations [1]
  • Special accommodations may be possible for higher limits - contact support for specific needs [1][2]

In summary, while Customer.io has defined rate limits, they are relatively flexible and aim to accommodate customer needs where possible. The main limits to be aware of are 100/second for the Track API and 10/second for most App API endpoints, with some exceptions. Consistently exceeding limits may prompt outreach from Customer.io to optimize the integration.

Latest API Version

Based on the search results provided, here are the key points regarding the most recent version of the Customer.io API:

Current API Versions

The Customer.io API is divided into multiple components:

  1. App API
  2. Track API
  3. Data Pipelines API
  4. Reporting Webhooks

Latest SDK Releases

The most recent SDK releases mentioned in the search results are:

  1. Android SDK 4.0 - Released on 2024-07-24 [5]
  2. iOS SDK 3.0 - Released date not specified, but mentioned as the "latest version" [5]

Key Points

  • The App API uses bearer token authorization and is hosted at https://api.customer.io/ [4]
  • Most requests to the App API are limited to 10 per second, with exceptions for API-triggered broadcasts (1 request every 10 seconds) and Transactional messages (100 per second) [4]
  • The latest Android SDK (version 4.0) provides seamless integration with Customer.io and supports sending data to downstream destinations [5]
  • The latest iOS SDK (version 3.0) also provides integration with Customer.io Data Pipelines and supports tracking anonymous users [5]

Best Practices

  • Use the appropriate regional server address (US or EU) based on your location [4]
  • Authenticate API requests using the App API Key as a Bearer token in the HTTP Authorization header [4]
  • When using the API, be aware of the rate limits for different types of requests [4]

In conclusion, while the search results don't explicitly state a single "most recent version" of the Customer.io API, they do provide information on the latest SDK releases and current API endpoints. The Android SDK 4.0 release on 2024-07-24 appears to be the most recent update mentioned.

How to get a Customer.io developer account and API Keys?

To get a developer account for Customer.io and create an API integration, follow these steps:

1. Sign up for an account

Visit the Customer.io website and sign up for an account. You'll likely need to choose a plan that suits your needs.

2. Set up your workspace

After signing up, you'll need to create a workspace. This is where you'll manage your data, campaigns, and integrations.

3. Obtain API credentials

Once your account is set up:

  • Log in to your Customer.io account
  • Navigate to the account settings or API section
  • Look for API keys or credentials
  • Generate a new API key if necessary

4. Choose an integration method

Customer.io offers several ways to integrate:

  • JavaScript SDK for websites
  • Server-side libraries for Node.js, GoLang, or Python
  • Mobile SDKs for iOS, Android, React Native, and Flutter
  • Direct API integration for custom solutions

5. Implement the integration

Depending on your chosen method:

  • For websites: Add the JavaScript snippet to your site's <head> tag
  • For server-side: Use the appropriate library for your language
  • For mobile apps: Implement the SDK in your app
  • For direct API: Make HTTP requests to the Customer.io API endpoints

What can you do with the Customer.io API?

Based on the provided information, here's a list of data models you can interact with using the Customer.io API, along with what is possible for each:

People

  • Add and update people's profiles [1]
  • Identify people [1]
  • Find people and their attributes [1]
  • Relate people to objects [1]
  • Delete and suppress profile IDs [1]
  • Export data for individual or multiple people [1]

Events

  • Send events associated with people [1]
  • Track anonymous events [1]
  • Capture user interactions and behaviors [1]

Groups/Objects

  • Manage groups (also called objects in Customer.io Journeys) [1]
  • Associate people with groups/objects [1]
  • Create different types of objects [1]
  • Import and export objects or relationships via CSV [1]

Campaigns and Broadcasts

  • Lookup campaigns and broadcasts [1]
  • Trigger API-triggered broadcasts [1]
  • Use objects in campaigns [1]

Segments

  • Create and manage segments [1]
  • Use segmentation for targeting [1]

Messages

  • Send messages through various channels [1]
  • Create and manage transactional messages [1]

Metrics and Reporting

  • Capture metrics outside of Customer.io [1]
  • Use reporting webhooks to get data on campaign performance [1]

Attributes and Custom Data

  • Store and use custom attributes for people and objects [1]
  • Work with JSON data [1]

Devices

  • Manage user devices [1]

Integrations

  • Set up and manage integrations with other platforms [1]

Data Export and Import

  • Export data for analysis [1]
  • Import data via CSV [1]

This list covers the main data models and interactions possible with the Customer.io API. The API allows for comprehensive management of customer data, event tracking, campaign creation, and reporting, enabling developers to build sophisticated customer engagement and messaging systems.