v1.0.0
OpenAPI 3.1.0

Send a transactional inbox message

US region

Client Libraries

Send a transactional inbox message

Send a transactional inbox message. Inbox messages deliver raw JSON payloads to your application through our JavaScript SDK, allowing you to build custom notification centers, message feeds, and other UI components.

You send a message using a transactional_message_id for an inbox message template created in the user interface. 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.

Note: Inbox messages are currently available for web platforms only and require the Customer.io In-App Plugin to be installed.

Body
application/json
  • identifiers
    required

    Identifies the person represented by your transactional message by one of, and only one of, id, email, or cio_id.

    Identifies the person represented by your transactional message by one of, and only one of, id, email, or cio_id.

    • id
      Type: string
      required

      The identifier for the person represented by the transactional message. NOTE: If your workspace identifies people by email, use the email identifier instead.

  • transactional_message_id
    required

    The transactional message template that you want to use for your message. You can call the template by its numerical ID or by the Trigger Name that you assigned to the template in the UI (case insensitive).

    • Type: integer · ID (integer)

      The ID of the transactional message you want to send.

  • auto_create
    Type: boolean

    Accepted for inbox sends, but of limited use. An auto-created record has no content or layout until you populate it in the UI, so we recommend creating the inbox message in the UI instead. Your transactional_message_id must be a new string.

  • language
    Type: string

    Overrides language preferences for the person you want to send your transactional message to. Use one of our supported two- or four-letter language codes.

  • message_data
    Type: object

    An object containing the key-value pairs referenced using liquid in the format {{trigger.<property_name>}} in your inbox message. These values will populate the properties field in the message received by your application.

  • queue_draft
    Type: boolean

    If true, your transactional message is held as a draft in Customer.io and not sent directly to your audience. You must go to the Deliveries and Drafts page to send your message.

  • send_at
    Type: integer

    A unix timestamp (seconds since epoch) determining when the message will be sent. The timestamp can be up to 90 days in the future. If this value is in the past, your message is sent immediately.

  • to
    Type: string

    Optional override for the recipient. This is typically not needed as the message is sent to the person identified by identifiers.

Responses
  • application/json
  • application/json
  • application/json
Request Example for post/v1/send/inbox_message
{
  "identifiers": {
    "id": "user_123"
  },
  "transactional_message_id": "order_shipped",
  "message_data": {
    "order_id": "ORD-5678",
    "tracking_url": "https://track.example.com/5678",
    "product_name": "Blue Widget",
    "product_image": "https://cdn.example.com/widget.jpg"
  }
}
{
  "delivery_id": "string",
  "queued_at": 1,
  "send_at": 1
}