v1

latestOpenAPI 3.1.02026-07-2296226496.3 KB
Templates

Upsert multiple templates

Create or update multiple notification templates in a single request. Templates define the content and format of notifications sent for delivery events.

post/v1/templates/upsert

Request body

Example request

{
  "templates": [
    {
      "type": "DELIVERY_WINDOW",
      "deliveryWindowTemplatePayload": {
        "key": "value"
      },
      "shiftTemplatePayload": {
        "key": "value"
      },
      "externalId": "ext_01234567890123456789",
      "name": "Monday Delivery Window",
      "startDatetime": "2024-01-01T12:00:00",
      "endDatetime": "2024-01-01T12:00:00",
      "daysOfWeek": [
        "MONDAY",
        "TUESDAY"
      ],
      "generationFrequencyValue": 1,
      "generationFrequencyUnit": "DAY",
      "createInstancesUpToValue": 1,
      "createInstancesUpToUnit": "DAY",
      "overrideExistingInstances": true
    }
  ]
}

Response

OK

Example response

{
  "templates": [
    {
      "id": "tpl_01234567890123456789",
      "type": "DELIVERY_WINDOW",
      "startDatetime": "2024-01-01T12:00:00",
      "endDatetime": "2024-01-01T12:00:00",
      "daysOfWeek": [
        "MONDAY",
        "TUESDAY"
      ],
      "generationFrequencyValue": 1,
      "generationFrequencyUnit": "DAY",
      "createInstancesUpToValue": 1,
      "createInstancesUpToUnit": "DAY",
      "overrideExistingInstances": true
    }
  ]
}