Message

The Message object represents a single notification that was sent to a single contact. This object contains the following attributes:

Field
Type
Description

id

string

The primary identifier for the message. Example: MSG-1234-9876-4442-4314

href

string

A relative reference to the object.

Example: /v1/notifications/messages/MSG-1234-9876-4442-4314

batch

The batch associated with this message.

Example:

{
  "id": "MST-1234-9876-3333"
}

contact

Example:

{
  "id": "CTT-1234-9876-1234",
  "href": "/v1/notifications/contacts/CTT-1234-9876-1234",
  "name": "Will Smith",
  "email": "[email protected]",
  "user": {
    "id": "USR-3773-5838",
    "href": "/accounts/users/USR-1234-9876",
    "name": "Will Smith",
    "email": "[email protected]"
  }
}

account

A reference to the Account object.

Example:

{
  "id": "ACC-1671-0642",
  "href": "/accounts/accounts/ACC-1671-0642",
  "type": "Client",
  "status": "Enabled",
  "name": "You Are a Test Account",
  "logo": "/accounts/accounts/ACC-1671-0642/logo.png"
}

status

enum

Possible values: Queued, Sent, Bounced, Complained, orDiscarded.

subject

string

The subject line of the message.

Example: Check out the new service offering

category

A reference to the Category object.

Example:

{
  "id": "NTC-1234-9876",
  "href": "/v1/notifications/categories/NTC-1234-9876",
  "name": "Orders",
  "shortDescription": "Includes updates about order confirmations, order status updates, and related communications."
}

body

Example:

  "<html><body><b>Hello</b></body></html>"

attachments

attachment

A reference to the Attachment object.

Example:

[
  {
    "id": "ATT-1234-1234-1234",
    "name": "Some mail attachment",
    "contentType": "application/octet-stream",
    "fileSize": 1234,
    "fileName": "SomeFile.pdf",
    "href": "/v1/notifications/messages/attachments/ATT-1234-1234-1234"
  },
  {
    "id": "ATT-9876-9876-9876",
    "name": "Some other mail attachment",
    "contentType": "application/octet-stream",
    "fileSize": 9876,
    "fileName": "SomeOtherFile.pdf",
    "href": "/v1/notifications/messages/attachments/ATT-9876-9876-9876"
  }
]

audit

A reference to the Audit object.

Example:

"created": { 
  "at": "2023-12-14T17:28:57Z", 
  "by": {
    "id": "UR-1234-1234-1234",
    "name": "John Smith",
    "icon": "/static/users/UR-1234-1234-1234.icon.svg"
  },
  "of": {
    "id": "ACC-1234-1234",
    "href": "/accounts/accounts/ACC-1234-1234",
    "name": "Microsoft",
    "icon": "/static/ACC-1234-1234/account.png"
  }
}

Example

{
      "id": "MSG-1234-9876-4442-4314",
      "href": "/v1/notifications/messages/MSG-1234-9876-4442-4314",
      "batch": {
        "id": "MST-1234-9876-3333"
      },
      "contact": {
        "id": "CTT-1234-9876-1234",
        "href": "/v1/notifications/contacts/CTT-1234-9876-1234",
        "name": "Will Smith",
        "email": "[email protected]",
        "user": {
          "id": "USR-3773-5838",
          "href": "/accounts/users/USR-1234-9876",
          "name": "Will Smith",
          "email": "[email protected]"
        }
      },
      "account": {
        "id": "ACC-1671-0642",
        "href": "/accounts/accounts/ACC-1671-0642",
        "type": "Client",
        "status": "Enabled",
        "name": "You Are a Test Account",
        "logo": "/accounts/accounts/ACC-1671-0642/logo.png"
      },
      "status": "Sent",
      "subject": "Check out the new service offering",
      "body": "<html><body><b>Hello</b></body></html>",
      "category": {
        "id": "NTC-1234-9876",
        "href": "/v1/notifications/categories/NTC-1234-9876",
        "name": "Orders",
        "shortDescription": "Includes updates about order confirmations, order status updates, and related communications."
      },
      "audit": {
        "created": {
          "at": "2023-12-14T17:28:57Z",
          "by": {
            "id": "UR-1234-1234-1234",
            "name": "John Smith",
            "icon": "/static/users/UR-1234-1234-1234.icon.svg"
          },
          "of": {
            "id": "ACC-1234-1234",
            "href": "/accounts/accounts/ACC-1234-1234",
            "name": "Microsoft",
            "icon": "/static/ACC-1234-1234/account.png"
          }
        }
      }
}

Last updated

Was this helpful?