v1.0.0
OpenAPI 3.1.0

Track mobile screenviews

US region

Client Libraries

Track mobile screenviews

​

Sends a screen view event for mobile devices. Screen events help you understand the screens that people use in your app. You should send a screen call whenever a user requests a page of your app.

Headers
  • X-Strict-Mode
    enum
    const:  
    1

    Set to 1 to turn on strict mode, which validates each request and returns an error when it fails. Without this header, the API returns a 200 response for almost every request and logs errors in Customer.io. Learn more

    values
    • 1
Body
application/json
    • userId
      Type: string
      required

      The unique identifier for a person. This value should be unique across systems, so you recognize the same person in your sources and destinations.

    • context
      Type: object · Mobile

      A dictionary of context about a source call/event, like the user’s IP address or locale. Context is automatically collected by our source libraries.

    • integrations
      Type: object

      Contains a list of booleans indicating the integrations that are enabled (true) or disabled (false). By default, all integrations are enabled (returning an empty object). Set "All": false to reverse this behavior.

    • messageId
      Type: string

      A unique identifier for a Pipelines call, ensuring that each individual event is unique. This is set by Customer.io

    • name
      Type: string

      The name of the screen the person visited.

    • originalTimestamp
      Type: string Format: date-time

      In general, you can use timestamp rather than this field if you want to back-date events. This is the timestamp on the client device you invoke a call or the timestamp value you manually passed in a server-side library call.

    • properties
      Type: object

      Additional properties for your screen.

    • sentAt
      Type: string Format: date-time

      The ISO-8601 timestamp when a library sends an event to Pipelines.

    • timestamp
      Type: string Format: date-time

      The ISO-8601 timestamp when the event originally took place. This is mostly useful when you backfill past events. If you're not backfilling data, you can leave this field empty and we'll use the current time or server time.

Responses
  • 200

    A successful request returns an empty object response.

Request Example for post/screen
{
  "userId": "97980cfea0067",
  "context": {
    "ip": "8.8.8.8"
  },
  "integrations": {
    "All": true,
    "Salesforce": false
  },
  "messageId": "022bb90c-bbac-11e4-8dfc-aa07a5b093db",
  "name": "feed",
  "properties": {
    "subscriptions": [
      "baseball",
      "basketball"
    ]
  },
  "sentAt": "2015-02-23T22:28:55.111Z",
  "timestamp": "2015-02-23T22:28:55.111Z",
  "anonymousId": "507f191e810c19729de860ea"
}
No Body