> For the complete documentation index, see [llms.txt](https://docs.contextsdk.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.contextsdk.com/context-push/push-notification-providers/customer.io.md).

# Customer.io

Learn how to integrate ContextPush with Customer.io.

## Integrating ContextSDK Push Notifications with Customer.io

This guide provides step-by-step instructions on how to set up and send push notifications using Customer.io's web request block to interact with the ContextPush API.

### Step 1: Add a Webhook Action

Go to where you want to leverage context-aware push notifications

1. **Add a new action** to your campaign and select "Webhook" from the list of available actions.
2. **Configure the webhook** with the following details:
   * **Request Type**: `POST`
   * **URL**: `https://push.contextsdk.com/v1/campaigns/schedule_message_for_user`

### Step 2: Set Up Request Headers

In the webhook configuration, set the request headers to include the necessary authorization token:

* **Authorization**: `Token [Your_Token]`

### Step 3: Define the Request Body

Configure the request body using Customer.io's templating language to dynamically include user-specific data. Use the following JSON structure:

```json
{
  "bundle_id": "com.contextsdk.demo",
  "platform": "ios",
  "user_id": "{{customer.email}}",
  "content": {
    "title": "It's time to get started with crypto",
    "body": "Just upload your ID, and start trading now"
  },
  "deliver_within_hours": 6,
  "campaign_id": "daily_reminder"
}
```

**Notes**:

* Replace `{{customer.email}}` with the appropriate Customer.io variable for the user ID. This example assumes the email is used as the user ID.
* Adjust the `title` and `body` fields to match your campaign's messaging.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.contextsdk.com/context-push/push-notification-providers/customer.io.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
