Mod sender (v1)

http://api.example.com/{version}

Table of contents

/message-delivery

POST /message-delivery

Send prepered notification to delivery channels

POST /message-delivery
Body

Media type: application/json

Type: json

Content:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "description": "Notification containing messages to be sent",
  "additionalProperties": false,
  "properties": {
    "notificationId": {
      "type": "string",
      "description": "Notification id; UUID format; Is used to receive notification when messages are delivered"
    },
    "recipientUserId": {
      "type": "string",
      "description": "Recipient user id; Is used to get contact information to deliver messages"
    },
    "messages": {
      "type": "array",
      "description": "Array of messages to be sent",
      "items": {
        "type": "object",
        "$schema": "http://json-schema.org/draft-04/schema#",
        "description": "Message",
        "additionalProperties": false,
        "properties": {
          "deliveryChannel": {
            "type": "string",
            "description": "Type of channel; Examples: 'email', 'sms'; Should be supported by the module"
          },
          "from": {
            "type": "string",
            "description": "Message sender"
          },
          "outputFormat": {
            "type": "string",
            "description": "Output format of message body"
          },
          "header": {
            "type": "string",
            "description": "Message header"
          },
          "body": {
            "type": "string",
            "description": "Message body"
          },
          "attachments": {
            "type": "array",
            "description": "Array of message attachments",
            "items": {
              "type": "object",
              "$schema": "http://json-schema.org/draft-04/schema#",
              "description": "Message attachment",
              "additionalProperties": false,
              "properties": {
                "contentType": {
                  "type": "string",
                  "description": "Content type"
                },
                "name": {
                  "type": "string",
                  "description": "Name"
                },
                "description": {
                  "type": "string",
                  "description": "Description"
                },
                "data": {
                  "type": "string",
                  "description": "Attachment data"
                },
                "disposition": {
                  "type": "string",
                  "description": "Disposition"
                },
                "contentId": {
                  "type": "string",
                  "description": "Content id"
                }
              }
            }
          }
        },
        "required": [
          "deliveryChannel"
        ]
      }
    }
  },
  "required": [
    "notificationId",
    "recipientUserId",
    "messages"
  ]
}

Response 204

Body

Media type: text/plain

Type: any

Response 400

Bad request

Body

Media type: text/plain

Type: any

Example:

Bad request

Response 500

Internal server error

Body

Media type: text/plain

Type: any

Example:

Internal server error