{
  "openapi": "3.0.3",
  "info": {
    "title": "External Message Events - Analytics",
    "description": "Sending the events is optional. If you do not send them, the analytics are not shown in the CRM section.\n\nEndpoint you call on the Gamanza Engage Platform (PEP) after your provider reports a result for a message accepted on Send Message (POST /api/crm/v1/send-message). Send one JSON object per player. PEP authenticates the call with an OAuth 2.0 access token, the same token used for Bonus Granted and the other Platform RX APIs.\n\nThe URL is the callback.url PEP sent on the send request. It is POST /rx-api/analytics/v1/external/messages/events on your PEP host.\n\nReturn is 204 No Content. The response body is empty. 204 means PEP accepted the event, including a duplicate of the same playerDeliverId, eventType, and occurredAt. It does not mean a counter was updated in this HTTP response. Do not retry a 204.\n\n400 means the body is not this contract. Fix the body before retrying. 401 means the access token is missing or expired.",
    "version": "1.0"
  },
  "tags": [
    {
      "name": "ExternalMessageEventsController"
    }
  ],
  "paths": {
    "/rx-api/analytics/v1/external/messages/events": {
      "post": {
        "summary": "Register External Message Event - Analytics",
        "description": "Sending the events is optional. If you do not send them, the analytics are not shown in the CRM section.\n\nReport one provider result for one delivery. Call this once per item, after you have returned 202 to Send Message Relay Proxy. Do not call it while producing that 202.\n\nSend channel, playerId, and playerDeliverId at the root. channel is the channel of the send item. playerId is the playerId of that item. playerDeliverId is the delivery id from the send item. Do not wrap them in payload. Do not send the send-request content or contact.\n\nPick the channel first, then the event type for that channel. Each variant lists only the properties for that pair.\n\nEmail accepts delivered, bounce, open, and click. SMS accepts delivered, undelivered, and click. Do not send open for SMS. PEP counts a delivered SMS as an open. On-site, web push, in-app push, and rich inbox accept delivered, open, and click.\n\nDo not send processed, sent, queued, click_email, or unsubscribe. The send is already recorded when you return 202. A click on every channel, including email, is click. An unsubscribe is POST /rx-api/analytics/v1/register/event/unsubscribe. Those values are not accepted here. PEP returns 400.\n\nA second POST with the same playerDeliverId, the same eventType, and the same occurredAt is also 204. PEP does not apply that duplicate again.",
        "operationId": "ExternalMessageEventsController_RegisterExternalMessageEvent",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/EmailEvents"
                  },
                  {
                    "$ref": "#/components/schemas/SmsEvents"
                  },
                  {
                    "$ref": "#/components/schemas/OnSiteEvents"
                  },
                  {
                    "$ref": "#/components/schemas/WebPushEvents"
                  },
                  {
                    "$ref": "#/components/schemas/PushInAppEvents"
                  },
                  {
                    "$ref": "#/components/schemas/RichInboxEvents"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No content. PEP accepted the event. The body is empty. A duplicate of the same playerDeliverId, eventType, and occurredAt is also 204. Do not retry."
          },
          "400": {
            "description": "The body is missing a required field, occurredAt is not RFC 3339, channel is not one of the six channels, or eventType is not accepted for that channel.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ResponseHttpErrorResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized. The OAuth 2.0 access token is missing or not accepted."
          },
          "500": {
            "description": "Internal server error."
          }
        },
        "tags": [
          "ExternalMessageEventsController"
        ],
        "security": [
          {
            "OAuth2": []
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "OAuth2": {
        "type": "oauth2",
        "description": "OAuth 2.0 access token for the Platform API. Send it as a Bearer token. This is not the x-authorization header used when PEP calls Send Message on your host.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://platform.gamanzaengage.com/api/auth",
            "scopes": {}
          }
        }
      }
    },
    "schemas": {
      "EmailDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "email"
            ],
            "description": "The channel of the send item. Required. This body is only for email.",
            "example": "email"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          }
        },
        "example": {
          "channel": "email",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1"
        }
      },
      "EmailBounce": {
        "title": "bounce",
        "type": "object",
        "description": "The mailbox rejected the message. Send reason when you have it. A reason that contains 550 5.1.1 is a hard bounce. Any other reason is a soft bounce.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "email"
            ],
            "description": "The channel of the send item. Required. This body is only for email.",
            "example": "email"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "bounce"
            ],
            "description": "The mailbox rejected the message. Send reason when you have it. A reason that contains 550 5.1.1 is a hard bounce. Any other reason is a soft bounce."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "reason": {
            "$ref": "#/components/schemas/ExternalMessageReason"
          }
        },
        "example": {
          "channel": "email",
          "eventType": "bounce",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "reason": "550 5.1.1 user unknown"
        }
      },
      "EmailOpen": {
        "title": "open",
        "type": "object",
        "description": "The player opened the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "email"
            ],
            "description": "The channel of the send item. Required. This body is only for email.",
            "example": "email"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "open"
            ],
            "description": "The player opened the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "email",
          "eventType": "open",
          "occurredAt": "2026-10-09T16:02:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "ip": "203.0.113.10"
        }
      },
      "EmailClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "email"
            ],
            "description": "The channel of the send item. Required. This body is only for email.",
            "example": "email"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "email",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "EmailEvents": {
        "title": "email",
        "description": "Events for an email message: delivered, bounce, open, and click.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/EmailDelivered"
          },
          {
            "$ref": "#/components/schemas/EmailBounce"
          },
          {
            "$ref": "#/components/schemas/EmailOpen"
          },
          {
            "$ref": "#/components/schemas/EmailClick"
          }
        ]
      },
      "SmsDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery. For SMS, send delivered only. Do not also send open. PEP counts an SMS delivery as an open. Send parts and price when the provider reports them.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms"
            ],
            "description": "The channel of the send item. Required. This body is only for sms.",
            "example": "sms"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "parts": {
            "$ref": "#/components/schemas/ExternalMessageParts"
          },
          "price": {
            "$ref": "#/components/schemas/ExternalMessagePrice"
          }
        },
        "example": {
          "channel": "sms",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "parts": 2,
          "price": 0.05
        }
      },
      "SmsUndelivered": {
        "title": "undelivered",
        "type": "object",
        "description": "The provider could not deliver the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms"
            ],
            "description": "The channel of the send item. Required. This body is only for sms.",
            "example": "sms"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "undelivered"
            ],
            "description": "The provider could not deliver the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "reason": {
            "$ref": "#/components/schemas/ExternalMessageReason"
          },
          "parts": {
            "$ref": "#/components/schemas/ExternalMessageParts"
          },
          "price": {
            "$ref": "#/components/schemas/ExternalMessagePrice"
          }
        },
        "example": {
          "channel": "sms",
          "eventType": "undelivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "reason": "mailbox full",
          "parts": 2,
          "price": 0.05
        }
      },
      "SmsClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "sms"
            ],
            "description": "The channel of the send item. Required. This body is only for sms.",
            "example": "sms"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "sms",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "SmsEvents": {
        "title": "sms",
        "description": "Events for an SMS message: delivered, undelivered, and click. Do not send open. PEP counts a delivered SMS as an open.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/SmsDelivered"
          },
          {
            "$ref": "#/components/schemas/SmsUndelivered"
          },
          {
            "$ref": "#/components/schemas/SmsClick"
          }
        ]
      },
      "OnSiteDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "on_site"
            ],
            "description": "The channel of the send item. Required. This body is only for on_site.",
            "example": "on_site"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          }
        },
        "example": {
          "channel": "on_site",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1"
        }
      },
      "OnSiteOpen": {
        "title": "open",
        "type": "object",
        "description": "The player opened the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "on_site"
            ],
            "description": "The channel of the send item. Required. This body is only for on_site.",
            "example": "on_site"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "open"
            ],
            "description": "The player opened the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "on_site",
          "eventType": "open",
          "occurredAt": "2026-10-09T16:02:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "ip": "203.0.113.10"
        }
      },
      "OnSiteClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "on_site"
            ],
            "description": "The channel of the send item. Required. This body is only for on_site.",
            "example": "on_site"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "on_site",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "OnSiteEvents": {
        "title": "on_site",
        "description": "Events for an on-site notification: delivered, open, and click.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/OnSiteDelivered"
          },
          {
            "$ref": "#/components/schemas/OnSiteOpen"
          },
          {
            "$ref": "#/components/schemas/OnSiteClick"
          }
        ]
      },
      "WebPushDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "web_push"
            ],
            "description": "The channel of the send item. Required. This body is only for web_push.",
            "example": "web_push"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          }
        },
        "example": {
          "channel": "web_push",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1"
        }
      },
      "WebPushOpen": {
        "title": "open",
        "type": "object",
        "description": "The player opened the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "web_push"
            ],
            "description": "The channel of the send item. Required. This body is only for web_push.",
            "example": "web_push"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "open"
            ],
            "description": "The player opened the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "web_push",
          "eventType": "open",
          "occurredAt": "2026-10-09T16:02:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "ip": "203.0.113.10"
        }
      },
      "WebPushClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "web_push"
            ],
            "description": "The channel of the send item. Required. This body is only for web_push.",
            "example": "web_push"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "web_push",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "WebPushEvents": {
        "title": "web_push",
        "description": "Events for a web push notification: delivered, open, and click.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/WebPushDelivered"
          },
          {
            "$ref": "#/components/schemas/WebPushOpen"
          },
          {
            "$ref": "#/components/schemas/WebPushClick"
          }
        ]
      },
      "PushInAppDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "push_in_app"
            ],
            "description": "The channel of the send item. Required. This body is only for push_in_app.",
            "example": "push_in_app"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          }
        },
        "example": {
          "channel": "push_in_app",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1"
        }
      },
      "PushInAppOpen": {
        "title": "open",
        "type": "object",
        "description": "The player opened the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "push_in_app"
            ],
            "description": "The channel of the send item. Required. This body is only for push_in_app.",
            "example": "push_in_app"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "open"
            ],
            "description": "The player opened the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "push_in_app",
          "eventType": "open",
          "occurredAt": "2026-10-09T16:02:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "ip": "203.0.113.10"
        }
      },
      "PushInAppClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "push_in_app"
            ],
            "description": "The channel of the send item. Required. This body is only for push_in_app.",
            "example": "push_in_app"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "push_in_app",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "PushInAppEvents": {
        "title": "push_in_app",
        "description": "Events for an in-app push notification: delivered, open, and click.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/PushInAppDelivered"
          },
          {
            "$ref": "#/components/schemas/PushInAppOpen"
          },
          {
            "$ref": "#/components/schemas/PushInAppClick"
          }
        ]
      },
      "RichInboxDelivered": {
        "title": "delivered",
        "type": "object",
        "description": "The provider confirmed delivery.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "rich_inbox"
            ],
            "description": "The channel of the send item. Required. This body is only for rich_inbox.",
            "example": "rich_inbox"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "delivered"
            ],
            "description": "The provider confirmed delivery."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          }
        },
        "example": {
          "channel": "rich_inbox",
          "eventType": "delivered",
          "occurredAt": "2026-10-09T16:00:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1"
        }
      },
      "RichInboxOpen": {
        "title": "open",
        "type": "object",
        "description": "The player opened the message.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "rich_inbox"
            ],
            "description": "The channel of the send item. Required. This body is only for rich_inbox.",
            "example": "rich_inbox"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "open"
            ],
            "description": "The player opened the message."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "rich_inbox",
          "eventType": "open",
          "occurredAt": "2026-10-09T16:02:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "ip": "203.0.113.10"
        }
      },
      "RichInboxClick": {
        "title": "click",
        "type": "object",
        "description": "The player clicked a link. Use click on every channel, including email.",
        "required": [
          "channel",
          "eventType",
          "occurredAt",
          "playerDeliverId",
          "playerId",
          "url"
        ],
        "properties": {
          "channel": {
            "type": "string",
            "enum": [
              "rich_inbox"
            ],
            "description": "The channel of the send item. Required. This body is only for rich_inbox.",
            "example": "rich_inbox"
          },
          "eventType": {
            "type": "string",
            "enum": [
              "click"
            ],
            "description": "The player clicked a link. Use click on every channel, including email."
          },
          "occurredAt": {
            "$ref": "#/components/schemas/ExternalMessageOccurredAt"
          },
          "playerDeliverId": {
            "type": "string",
            "description": "The playerDeliverId from the send item. Required. Example: 66f1a2b3c4d5e6f7a8b9c0d1. Send the same string. A missing value is a 400. An id PEP does not know is still accepted with 204. PEP does not ask you to retry it.",
            "example": "66f1a2b3c4d5e6f7a8b9c0d1"
          },
          "playerId": {
            "type": "string",
            "description": "The player id from the same send item. Required. Send the playerId of that item. A missing value is a 400. A playerId that does not belong to that playerDeliverId is accepted with 204 and is not applied.",
            "example": "849120"
          },
          "providerMessageId": {
            "type": "string",
            "description": "Optional. Your provider id for this message. Omit the property when you do not have one. Do not send null. PEP does not use this field as the idempotency key. The idempotency key is playerDeliverId plus eventType plus occurredAt.",
            "example": "provider-1"
          },
          "url": {
            "type": "string",
            "description": "The link the player opened. Absolute URL. Required on click. This is not callback.url from the send request.",
            "example": "https://operator.example/bonus"
          },
          "ip": {
            "$ref": "#/components/schemas/ExternalMessageIp"
          }
        },
        "example": {
          "channel": "rich_inbox",
          "eventType": "click",
          "occurredAt": "2026-10-09T16:03:00.000Z",
          "playerDeliverId": "66f1a2b3c4d5e6f7a8b9c0d1",
          "playerId": "849120",
          "providerMessageId": "provider-1",
          "url": "https://operator.example/bonus",
          "ip": "203.0.113.10"
        }
      },
      "RichInboxEvents": {
        "title": "rich_inbox",
        "description": "Events for a rich inbox message: delivered, open, and click.",
        "oneOf": [
          {
            "$ref": "#/components/schemas/RichInboxDelivered"
          },
          {
            "$ref": "#/components/schemas/RichInboxOpen"
          },
          {
            "$ref": "#/components/schemas/RichInboxClick"
          }
        ]
      },
      "ExternalMessageOccurredAt": {
        "type": "string",
        "format": "date-time",
        "description": "When the provider event happened, in RFC 3339. Example: 2026-10-09T16:00:00.000Z. This is not the time you call PEP, unless they are the same instant. Required. A missing value or a value that is not a date-time is a 400. Together with playerDeliverId and eventType, this timestamp identifies a duplicate.",
        "example": "2026-10-09T16:00:00.000Z"
      },
      "ExternalMessageReason": {
        "type": "string",
        "description": "Optional. Provider text for this result. Example: mailbox full. Omit the property when the provider did not give a reason. Do not send null.",
        "example": "mailbox full"
      },
      "ExternalMessageIp": {
        "type": "string",
        "description": "Optional. IP address the provider reported for this event. Omit the property when you do not have one. Do not send null.",
        "example": "203.0.113.10"
      },
      "ExternalMessageParts": {
        "type": "number",
        "description": "Optional. Number of SMS parts, when the provider reports it. Omit the property for email and for any event that has no part count. Do not send null. Do not send 0 to mean unknown.",
        "example": 2
      },
      "ExternalMessagePrice": {
        "type": "number",
        "description": "Optional. Provider price for this SMS, in the provider's currency units. This is the total for the message, not a currency code. Omit the property when you do not have a price. Do not send null.",
        "example": 0.05
      },
      "ResponseHttpErrorResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string"
          },
          "request": {
            "$ref": "#/components/schemas/ResponseRequest"
          },
          "details": {
            "$ref": "#/components/schemas/ResponseDetails"
          },
          "timestamp": {
            "type": "string"
          }
        }
      },
      "ResponseRequest": {
        "type": "object",
        "properties": {
          "xRequestId": {
            "type": "string"
          },
          "sourceIp": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "uri": {
            "type": "string"
          },
          "headers": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          }
        }
      },
      "ResponseDetails": {
        "type": "object",
        "properties": {
          "faultCode": {
            "type": "integer",
            "format": "int32"
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ResponseField"
            }
          }
        }
      },
      "ResponseField": {
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        }
      }
    }
  }
}
