openapi: 3.0.1 info: title: Events description: 'Send and receive events with Dotdigital. Use this API to import batches of contact-associated events, manage event subscriptions (create, retrieve, update, and delete), retrieve queued events for a subscription using checkpoint-based pagination, and download large objects referenced in event data.' version: 3.1.1-Events-in-out externalDocs: description: Learn more about Dotdigital APIs url: https://developer.dotdigital.com 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: [] paths: /events/v3/import: post: tags: - Import events summary: Import a collection of events description: Imports a batch of events associated to contacts. operationId: importEvents parameters: - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 requestBody: description: Events to be imported content: application/json: schema: maxItems: 5000 minItems: 1 type: array description: The events to import. items: $ref: '#/components/schemas/v3_import_body' required: true responses: '202': description: Import processing '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:badJson description: The request JSON is badly formed '401': description: Unauthorized /events/v3/export/{subscriptionId}: get: tags: - Export events summary: Retrieve events description: 'Gets a set of events for a events subscription. If starting to retrieve events then do not pass a `checkPoint` and the earliest events queued for the subscription will be retrieved, and on subsequent calls pass the `checkPoint` value from the previous call to indicate you have received that page of events successfully.

**Note:** * Ensure you pass the returned `checkPoint` to ensure you only get events after the last time you called. * You must ensure that you pick up the latest events for a subscription within a 30 day period, otherwise the **subscription will automatically be set to `inactive` status due to non usage.** * If we return no events in the `events` array then you have received all the currently queued events. * Maximum call duration permitted is 30 seconds!' operationId: exportEvents parameters: - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 - name: subscriptionId in: path description: The events subscription id you want to interact with. required: true schema: type: integer example: 1234 - name: limit in: query description: The maximum number of records to return in the results, note it could be fewer. required: false schema: maximum: 5000 minimum: 1 type: integer example: 2000 default: 2000 - name: checkPoint in: query description: Provide the `checkPoint` value from your previous call to indicate you have received the events successfully. required: false schema: type: string example: zf0f945b36ad8 responses: '200': description: Event data content: application/json: schema: $ref: '#/components/schemas/inline_response_200' '400': description: Invalid checkpoint content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:invalidCheckpoint description: The checkpoint passed is invalid and cannot be parsed. details: - item: XXXXYYYYY description: Invalid checkpoint. '401': description: Unauthorized '403': description: Forbidden '404': $ref: '#/components/responses/subscriptionNotFound' '409': description: Inactive subscription content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:inactiveSubscription description: The subscription is set to inactive and therefore cannot be used. details: - item: 5a96bc79-19a7-4544-973b-e2da0c9136f9 description: Inactive subscription '500': description: Internal Server Error /events/v3/export/subscriptions: get: tags: - Subscriptions summary: List subscriptions description: Lists all events subscriptions and their details. operationId: listSubscriptions parameters: - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 - name: limit in: query description: The maximum number of records to return in the results, note it could be fewer. required: false schema: maximum: 5000 minimum: 1 type: integer example: 2000 default: 2000 - name: marker in: query description: Pagination marker to retrieve the data from schema: type: string example: RXhhbXBsZSBhbXJrZXIgdmFsdWU= responses: '200': description: Subscriptions content: application/json: schema: $ref: '#/components/schemas/inline_response_200_1' examples: Example: value: _links: self: marker: '' link: https://r1-api.dotdigital.com/events/v3/export/subscriptions first: marker: '' link: https://r1-api.dotdigital.com/events/v3/export/subscriptions _items: - id: 10 name: Contact events status: active subscribedEventTypes: - eventType: contact.created - eventType: contact.preferenceUpdated - eventType: contact.removed - eventType: contact.updated - eventType: contact.membershipUpdated - eventType: contact.consentAdded - eventType: interaction.click - eventType: interaction.unsubscribe alertsConfiguration: alertChannels: emailAndInApp email: someone@emailsim.io created: '2026-01-14T10:36:56.931Z' updated: '2026-02-17T15:42:25.836Z' - id: 12 name: Insight events status: active subscribedEventTypes: - eventType: insightData.collectionCreated - eventType: insightData.collectionRemoved - eventType: insightData.removed - eventType: insightData.set alertsConfiguration: alertChannels: emailAndInApp email: someone@emailsim.io created: '2026-01-14T14:23:02.280Z' updated: '2026-01-14T14:23:02.280Z' '401': description: Unauthorized '403': description: Forbidden '500': description: Internal Server Error post: tags: - Subscriptions summary: Create subscription description: "Creates a events subscription. \n\nThe `name` passed must be unique within the accounts subscriptions\n\nIf you apply filters to your event subscription then **all filters must match** (logical AND) for the event to be captured.\n\nIf you want to match the same event type on multiple different sets of filters (logical OR) then add the event type multiple time to the subscription with differing filters." operationId: createSubscription parameters: - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 - name: x-ddg-calling-system in: header description: _Dotdigital use only_ The calling systems identifier required: false schema: maxLength: 60 type: string default: customer requestBody: description: Subscription details content: application/json: schema: $ref: '#/components/schemas/subscriptionRequest' examples: Event subscription: description: Example of subscribing to multiple events. value: name: Campaign events status: active subscribedEventTypes: - eventType: message.sent - eventType: message.status filters: - field: $.channel matchPattern: sms - field: $.status matchPattern: failed alertsConfiguration: alertChannels: emailAndInApp email: alerts@emailsim.io An OR event subscription: description: Subscribing to the same event multiple times to create a logical OR. This example includes all `message.sent` events sent on the `sms` or `whatsApp` channel. value: name: Campaign events status: active subscribedEventTypes: - eventType: message.sent filters: - field: $.channel matchPattern: sms - eventType: message.sent filters: - field: $.channel matchPattern: whatsApp alertsConfiguration: alertChannels: emailAndInApp email: alerts@emailsim.io required: true responses: '201': description: Subscription created content: application/json: schema: $ref: '#/components/schemas/subscription' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/errorResponse' examples: unknownEventType: value: errorCode: events:invalidEventType description: The type value 'example.unknownType' is invalid. '401': description: Unauthorized '403': description: Forbidden '409': description: Name conflict content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:nameAlreadyExists description: The name value 'Camapign events' already exists. All names must be unique! '500': description: Internal Server Error /events/v3/export/subscriptions/{subscriptionId}: get: tags: - Subscriptions summary: Gets subscription description: Gets a events subscription details. operationId: getSubscription parameters: - name: subscriptionId in: path description: The events subscription id you want to interact with. required: true schema: type: integer example: 1234 - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 responses: '200': description: Subscription details content: application/json: schema: $ref: '#/components/schemas/subscription' examples: Example: value: id: 95 created: '2025-02-07T16:23:33.741Z' updated: '2025-02-11T01:33:00.000Z' name: Campaign events status: inactive subscribedEventTypes: - eventType: message.sent - eventType: message.status filters: - field: $.channel matchPattern: sms alertsConfiguration: alertChannels: none '401': description: Unauthorized '403': description: Forbidden '404': $ref: '#/components/responses/subscriptionNotFound' '500': description: Internal Server Error put: tags: - Subscriptions summary: Update subscription description: 'Updates a events subscription with new details. If you apply filters to your event subscription then **all filters must match** (logical AND) for the event to be captured. If you want to match the same event type on multiple different sets of filters (logical OR) then add the event type multiple time to the subscription with differing filters.' operationId: updateSubscription parameters: - name: subscriptionId in: path description: The events subscription id you want to interact with. required: true schema: type: integer example: 1234 - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 requestBody: content: application/json: schema: $ref: '#/components/schemas/subscriptionRequest' responses: '200': description: Subscription details content: application/json: schema: $ref: '#/components/schemas/subscription' '400': description: Bad request content: application/json: schema: $ref: '#/components/schemas/errorResponse' examples: unknownEventType: value: errorCode: events:invalidEventType description: The type value 'example.unknownType' is invalid. '401': description: Unauthorized '403': description: Forbidden '404': $ref: '#/components/responses/subscriptionNotFound' '409': description: Name conflict content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:nameAlreadyExists description: The name value 'Camapign events' already exists. All names must be unique! '500': description: Internal Server Error delete: tags: - Subscriptions summary: Deletes subscription description: "Deletes a events subscription.

\n**Note:** once deleted it cannot be restored, this is a destructive call." operationId: deleteSubscription parameters: - name: subscriptionId in: path description: The events subscription id you want to interact with. required: true schema: type: integer example: 1234 - name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 responses: '204': description: Subscription deleted '401': description: Unauthorized '404': $ref: '#/components/responses/subscriptionNotFound' /events/v3/lob/{lobId}: get: tags: - Large objects summary: Retrieve large object description: Gets the data for a large object (LOB) referred to in some events when the data for the field would be too large to be transferred in the event data itself, and so needs downloading seperately. operationId: retrieveLob parameters: - name: lobId in: path description: The unique id for the large object to retrieve. required: true schema: type: string example: d4699dd5-c7fb-4313-a62e-a81998180da0 responses: '200': description: Large object data content: application/octet-steam: schema: type: string format: binary example: Any large objects data, use the content-type header to determine data type. '401': description: Unauthorized '403': description: Forbidden '404': description: Large object not found '500': description: Internal Server Error components: schemas: subscriptionStatus: type: string description: The subscription status. enum: - active - inactive default: inactive subscriptionRequest: required: - alertsConfiguration - name - status - subscribedEventTypes type: object properties: name: maxLength: 50 minLength: 1 type: string description: Descriptive name for the subscription. example: Campaign events status: $ref: '#/components/schemas/subscriptionStatus' subscribedEventTypes: maxItems: 100 minItems: 1 type: array description: The event types this subscription collects. example: - eventType: message.sent - eventType: message.status filters: - field: $.channel matchPattern: sms items: $ref: '#/components/schemas/eventType' alertsConfiguration: description: Alert options to use if we detect issues with the subscription. oneOf: - title: No alerts required: - alertChannels type: object properties: alertChannels: type: string description: The type(s) of channels to be alerted on. enum: - none description: No alerts - title: In app alerts only required: - alertChannels type: object properties: alertChannels: type: string description: The type(s) of channels to be alerted on. enum: - inApp description: In app alerts only - title: Email alerts only required: - alertChannels - email type: object properties: alertChannels: type: string description: The type(s) of channels to be alerted on. enum: - email email: type: string description: The email address to send alerts regarding this subscription to. format: email example: alerts@emailsim.io description: Email alerts only - title: Email and in-app alerts required: - alertChannels - email type: object properties: alertChannels: type: string description: The type(s) of channels to be alerted on. enum: - emailAndInApp email: type: string description: The email address to send alerts regarding this subscription to. format: email example: alerts@emailsim.io description: Email and in-app alerts additionalProperties: false subscription: allOf: - required: - created - id - updated type: object properties: id: type: integer description: The subscriptions unique identifier. example: 95 created: type: string description: The UTC date time in ISO 8601 format when the subscription was created. format: date-time example: '2025-02-07T16:23:33.741Z' updated: type: string description: The UTC date time in ISO 8601 format when the subscription was updated. format: date-time example: '2025-02-11T01:33:00Z' additionalProperties: false - $ref: '#/components/schemas/subscriptionRequest' filter: required: - field - matchPattern type: object properties: field: type: string description: 'The [JSON path](https://en.wikipedia.org/wiki/JSONPath) to the field to match against. Note: The base ($) is the `eventData` field. ' example: $.channel matchPattern: maxLength: 1024 minLength: 1 type: string description: 'The literal value or pattern to match against the value of the field. You use the following syntax to define the match pattern: * `*` matches any number of any characters including none * `?` matches any single character * `[abc]` matches one character given in the brackets * `[a-z]` matches one character from the range given in the bracket * `[!abc]` matches one character _that is not_ given in the brackets * `[!a-z]` matches one character _that is not_ from the range given in the bracket _Note: Filters use the Unicode character set and ranges must be from lower to higher code points to be valid. e.g. `[a-z]` is valid but `[z-a]` is invalid_ ' example: http?://* caseSensitive: type: boolean description: Whether the matching should be case sensitive. default: true additionalProperties: false description: 'An inclusive filter that must be matched to include the event. ' eventType: required: - eventType type: object properties: eventType: type: string description: The event type example: email.read filters: maxItems: 5 minItems: 1 type: array description: 'Capture only events that match these filters. All filters will be accessed and **all must match for the event to be captured!** ' items: $ref: '#/components/schemas/filter' additionalProperties: false description: An event type and any inclusive filters that should be applied. event: required: - accountId - data - eventDate - id - processedDate - type type: object properties: id: type: string description: The unique id for the event. example: 27e298b2-a1af-4041-96a6-00f909c66ad8 accountId: type: integer description: The account id the event is related to. example: 33210 processedDate: type: string description: Date time in ISO 8601 format based on UTC when the event was processed by Dotdogital. format: date-time example: '2025-02-07T16:25:01.023Z' type: type: string description: The type of the event. example: email.doubleOptIn eventDate: type: string description: Date time in ISO 8601 format based on UTC when the event occurred. format: date-time example: '2025-02-07T16:23:33.741Z' data: type: object additionalProperties: true description: The events data. example: optinCode: true contactId: 12345 eventId: 27e298b2-a1af-4041-96a6-00f909c66ad8 userAccountId: 54321 timeStamp: '2025-02-07T16:23:33.123Z' additionalProperties: false description: An event contactIdentifier: required: - identifier - value type: object properties: identifier: type: string description: The field to use to uniquely identify the contact. This can be a custom identifier or a contact identifer of contactId, email or mobileNumber example: contactId value: type: string description: The unique value to identify the contact or the same type as the **identifier** nullable: true example: fred.bloggs@emailsim.io errorResponse: required: - description - errorCode type: object properties: errorCode: type: string description: Unique error code description: type: string description: Description of the issue details: type: array items: $ref: '#/components/schemas/errorResponse_details' paginationLinksPrevNext: required: - first - self type: object properties: self: $ref: '#/components/schemas/paginationLinksPrevNext_self' prev: $ref: '#/components/schemas/paginationLinksPrevNext_prev' next: $ref: '#/components/schemas/paginationLinksPrevNext_next' description: Pagination links eventsv3import_timelineDetails: required: - summary type: object properties: summary: maxLength: 160 minLength: 1 type: string description: Optional description of the event for display in the timeline of the contact. example: 'Search for travel desination: Bali' description: The details to display in the contacts timeline; if omitted nothing will be shown. v3_import_body: required: - contactIdentity - type type: object properties: contactIdentity: allOf: - description: The way to identify the contact the event is associated to. - $ref: '#/components/schemas/contactIdentifier' type: maxLength: 80 minLength: 1 type: string description: The event type example: Search destination id: type: string description: The unique id for the event. example: 27e298b2-a1af-4041-96a6-00f909c66ad8 eventTimestamp: type: string description: 'The UTC date and time the event occurred in ISO 8601 format. _**Note:** Optional and will default to when we process the event if not specified._ ' example: '2025-05-14T13:01:04.000Z' default: timelineDetails: $ref: '#/components/schemas/eventsv3import_timelineDetails' eventData: type: object additionalProperties: true description: Any addtional data attributes for the event. example: query: Bali travelFromDate: '2025-07-03' flightsRequired: true description: An event inline_response_200: required: - checkPoint - events type: object properties: checkPoint: type: string description: This is the value you should pass back with your subsequent call in the `checkPoint` query string to indicate you have received the previous page of events successfully. example: fgfh63eu77 events: type: array description: Returned events items: $ref: '#/components/schemas/event' inline_response_200_1: required: - _items - _links type: object properties: _links: $ref: '#/components/schemas/paginationLinksPrevNext' _items: type: array description: Returned program extensions items: $ref: '#/components/schemas/subscription' errorResponse_details: required: - description - item type: object properties: item: type: string description: Item the error is associated with, for example, field name, unique identifier for an entity or item in batch description: type: string description: Description of the error paginationLinksPrevNext_self: required: - link - marker type: object properties: marker: type: string description: Pagination marker to be passed to API calls to retrieve this data page link: type: string description: Link to retrieve the data page description: Details for accessing this data page via pagination paginationLinksPrevNext_prev: required: - link - marker type: object properties: marker: type: string description: Pagination marker to be passed to API calls to retrieve this data page link: type: string description: Link to retrieve the data page description: Details for accessing the previous pagea worth of data paginationLinksPrevNext_next: required: - link - marker type: object properties: marker: type: string description: Pagination marker to be passed to API calls to retrieve this data page link: type: string description: Link to retrieve the data page description: Details for accessing the next pages worth of data responses: subscriptionNotFound: description: Subscription not found content: application/json: schema: $ref: '#/components/schemas/errorResponse' example: errorCode: events:subscriptionNotFound description: The following subscription could not be found details: - item: zf0f945b36ad8 description: Not found. parameters: limit: name: limit in: query description: The maximum number of records to return in the results, note it could be fewer. required: false schema: maximum: 5000 minimum: 1 type: integer example: 2000 default: 2000 subscriptionId: name: subscriptionId in: path description: The events subscription id you want to interact with. required: true schema: type: integer example: 1234 integrationTrackingToken: name: x-ddg-integration-token in: header description: If you are a partner of Dotdigital and have a [verified integration](https://developer.dotdigital.com/docs/partner-integration-verification) then include your [integration tracking token](https://developer.dotdigital.co/docs/verified-integration-tracking) here. required: false schema: pattern: /^(?:\{{0,1}(?:[0-9a-fA-F]){8}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){4}-(?:[0-9a-fA-F]){12}\}{0,1})$/ type: string example: 5a96bc79-19a7-4544-973b-e2da0c9136f9 marker: name: marker in: query description: Pagination marker to retrieve the data from schema: type: string example: RXhhbXBsZSBhbXJrZXIgdmFsdWU= securitySchemes: basicAuth: type: http scheme: basic x-samples-languages: - curl - csharp - java - javascript - node - python - php - ruby