Notification

Properties

Properties
notification_id string
The identifier of the notification.
organization_id string
The identifier of the organization.
notification_type string
Indicates the type of notification (e.g., policy_issued).
linked_entities object
Indicates which entities the notification is linked to.

policy_id string
The identifier of the policy.

channel string
The channel used for the notification. Channels available include email, sms or other.
provider string
Indicates how the notification was generated. Whether it was external, root_standard or root_webhooks.
created_at string
Time at which the notification was created.
created_by object
An object indicating the user or API key that created the notification. See Authentication.
status string
The current status of the notification.
status_updates array
An array of status update information for the notification.

status string
The status that the notification was updated to.
createdAt string
Time at which the status update was created.
description string
An optional detailed description of the status update.

data object
An object containing additional data depending on whether the notification channel is email, sms, or other. Must be one of the below.

Notification email data

from_email string
Email address of who sent the email notification.
from_name string
Name of who sent the email notification.
reply_to_email string
Recipient of who to respond to for the email notification.
subject string
Email subject.
html string
The HTML structure of the email body.
attachments array
An array of objects containing a list of type and name pairs for the attachments on the email notification.
to array
An array of objects containing a list of email and name pairs of the recipients of the email notification.

Notification sms data

to string
An array containing phone numbers that the notification was sent to.
content string
Content for the SMS notification.
content_type string
Whether it was text or html.
app_data object
null is allowed. An object containing additional custom data for the SMS notification.

Notification other data

to string
An array containing phone numbers that the notification was sent to.
content string
Content for the SMS notification.
content_type string
Whether it was text or html.
app_data object
null is allowed. An object containing additional custom data for the SMS notification.

Example

{
  "notification_id": "43c13dc8-2c19-402c-bb70-a7deb56b9f38",
  "organization_id": "4ce6ad99-9576-4d28-84ba-c30d2d536cbe",
  "channel": "sms",
  "notification_type": "policy_issued",
  "provider": "root_clickatell",
  "created_at": "2022-06-23T07:59:53.261Z",
  "created_by": {
    "type": "user",
    "id": "6f852057-b381-4ab0-a53d-93a6c2ec6f26"
  },
  "status": "delivered",
  "status_updates": [
    {
      "status": "queued",
      "createdAt": "2022-06-23T07:59:53.261Z"
    },
    {
      "status": "sent",
      "createdAt": "2022-06-23T07:59:54.000Z",
      "description": "Delivered to gateway (003)"
    },
    {
      "status": "delivered",
      "createdAt": "2022-06-23T07:59:57.000Z",
      "description": "Received by recipient (004)"
    }
  ],
  "linked_entities": {
    "policy_id": "b338a75b-207e-4b6c-8649-4c0ebfe39d8b",
    "policyholder_id": "b5b10383-0b50-4965-8bff-addb2001c5d1"
  },
  "data": {
    "to": [
      "+27811231234"
    ],
    "content": "Congratulations! Your  Cover has been activated from 01/06/2022."
  }
}