openapi: 3.2.0 info: title: Analytics App Messaging API description: 'Provides methods for retrieving analytics data across the Dotdigital omnichannel platform. Covers conversation message analytics, chat analytics (including live), message metrics, session analytics, SMS tracking, verification, inbound/outbound SMS analytics, and WhatsApp conversation and daily messaging usage reports. All endpoints accept date-range and aggregation parameters and return time-series data suitable for reporting dashboards.' version: 1.1.1 servers: - url: https://{region}-api.dotdigital.com variables: region: description: The Dotdigital region id your account belongs to enum: - r1 - r2 - r3 default: r1 security: - basicAuth: [] tags: - name: App Messaging paths: /cpaas/analytics/conversationmessages: get: tags: - App Messaging summary: Retrieves conversation message analytics parameters: - name: from in: query description: The date time to query from in ISO 8601 format UTC required: true schema: type: string format: date-time - name: to in: query description: The date time to query up to (but not including) in ISO 8601 format UTC required: true schema: type: string format: date-time - name: by in: query description: The time period to aggregate by required: false schema: type: string enum: - hour - day - month - year - name: timezone in: query description: The localtimezone to report the data out for if not specified, UTC is defaulted required: false schema: type: string responses: '200': description: The count of sent, delivered and read messages for a specific period content: application/json: schema: type: array items: $ref: '#/components/schemas/conversationMessageAnalytics' '400': description: Validation errors were found '404': description: The API Space was not found /cpaas/analytics/sessions: get: tags: - App Messaging summary: Retrieves session analytics parameters: - name: from in: query description: The date time to query from in ISO 8601 format UTC required: true schema: type: string format: date-time - name: to in: query description: The date time to query up to (but not including) in ISO 8601 format UTC required: true schema: type: string format: date-time - name: by in: query description: The time period to aggregate by required: false schema: type: string enum: - hour - day - month - year - name: timezone in: query description: The localtimezone to report the data out for if not specified, UTC is defaulted required: false schema: type: string responses: '200': description: The count of started and explicitly ended sessions for a specific period content: application/json: schema: type: array items: $ref: '#/components/schemas/sessionAnalytics' '400': description: Validation errors were found '404': description: The API Space was not components: schemas: sessionAnalytics: type: object properties: date: type: string description: The start date and time for the period in the timezone passesd in dateUtc: type: string description: The start date and time for the period in UTC started: $ref: '#/components/schemas/sessionAnalytics_started' ended: type: integer description: The number of session that were explicitly ended in the period format: int64 conversationMessageAnalytics: type: object properties: date: type: string description: The start date and time for the period in the timezone passed in dateUtc: type: string description: The start date and time for the period in UTC sent: type: integer description: The number of messages sent in the period format: int64 delivered: type: integer description: The number of messages delivered in the period format: int64 read: type: integer description: The number of messages read in the period format: int64 sessionAnalytics_started: type: object properties: additionalProperties: type: string description: The number of sessions started in the period, broken down by platform and sdkType securitySchemes: basicAuth: type: http scheme: basic x-readme: samples-languages: - curl - csharp - java - node - php - python - ruby explorer-enabled: true proxy-enabled: true samples-enabled: true