These docs are for v0.0.1. Click to read the latest docs for v1.0.63.

Webhook API Comparison

New
Field
Renamed
Field
Deleted Field


Notification APIs

Summary of changes:

  • The path has changed (base path + API path). "accountId" is mandatory in path of each API
  • "channelProviderId" which had to be passed as path parameter is now part of request payload
  • Timestamps have changed from Epoch timestamp (int64) to
    'yyyy-MM-dd'T'HH:mm:ss[.SSS]Z' format

  • Earlier each webhookId could have multiple subscriptions. Now each subscriptions can be directly accessed by subscriptionId.
  • Few new fields renamed, added or removed in request and response payload to make the data more consistent



API Version /v1 /v1beta
Base Path https://HOST-REGION.cc.avayacloud.com/api/digital/ https://HOST-REGION.cc.avayacloud.com/api/digital/webhook/

Create Subscription

POST /v1/channel-providers/{channelProviderId}/webhooks

POST /v1beta/accounts/{accountId}/subscriptions


Fields Mandatory Comment Fields Mandatory Comment
Path Parameters channelProviderId Y
accountId Y

Request Payload Subscription Y Array of Subscription
object
channelProviderId Y



callbackUrl Y Supports only https urls



eventTypes Y

Response webhookId Y Use subscriptionId instead subscriptionId Y
Subscription
Array of Subscription
object
channelProviderId Y



callbackUrl Y



eventTypes Y

Sample request
                                  [
    {
      "callbackUrl": "https://myserver.com/send/callback/here",
      "eventTypes": [
        "MESSAGES"
      ]
    }
  ]
                              
                                      {
    "channelProviderId": "ChatProvider01",
    "callbackUrl": "https://www.example.com/send/callback/here",
    "eventTypes": [
      "MESSAGES"
    ]
  }
                                  
Sample Response
                                      {
    "webhookId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
    "subscriptions": [
      {
        "callbackUrl": "https://myserver.com/send/callback/here",
        "eventTypes": [
          "MESSAGES"
        ]
      }
    ]
  }
                                  
                                      {
    "subscriptionId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
    "channelProviderId": "ChatProvider01",
    "callbackUrl": "https://www.example.com/send/callback/here",
    "eventTypes": [
      "MESSAGES"
    ]
  }
                                  

Get Subscription(s)

GET /v1/channel-providers/{channelProviderId}/webhooks

GET /v1beta/accounts/{accountId}/subscriptions


Fields Mandatory Comment Fields Mandatory Comment
Path Parameters channelProviderId Y
accountId Y

Response




webhookId

Y

Use subscriptionId instead

subscriptionId

Y


subscriptions


Array of Subscription
object

channelProviderId

Y





callbackUrl

Y





eventTypes

Y



Sample Response
                                      [
    {
      "webhookId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
      "subscriptions": [
        {
          "callbackUrl": "https://myserver.com/send/callback/here",
          "eventTypes": [
            "MESSAGES"
          ]
        }
      ]
    }
  ]
                                  
                                      [
    {
      "subscriptionId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
      "channelProviderId": "ChatProvider01",
      "callbackUrl": "https://www.example.com/send/callback/here",
      "eventTypes": [
        "MESSAGES"
      ]
    }
  ]
                                  




Get Subscription

GET /v1/channel-providers/{channelProviderId}/webhooks/{webhookId}

GET /v1beta/accounts/{accountId}/subscriptions/{subscriptionId}


Fields Mandatory Comment Fields Mandatory Comment
Path Parameters channelProviderId Y
accountId Y
webhookId Y Use subscriptionId instead subscriptionId Y

Response




webhookId

Y


subscriptionId

Y


subscriptions


Array of Subscription
object

channelProviderId

Y





callbackUrl

Y





eventTypes

Y



Sample Response
                                      [
    {
      "callbackUrl": "https://myserver.com/send/callback/here",
      "eventTypes": [
        "MESSAGES"
      ]
    }
  ]
                                  
                                      {
    "subscriptionId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
    "channelProviderId": "ChatProvider01",
    "callbackUrl": "https://www.example.com/send/callback/here",
    "eventTypes": [
      "MESSAGES"
    ]
  }
                                  

Update Subscription

PUT /v1/channel-providers/{channelProviderId}/webhooks/{webhookId}

PUT /v1beta/accounts/{accountId}/subscriptions/{subscriptionId}


Fields Mandatory Comment Fields Mandatory Comment
Path Parameters channelProviderId Y
accountId Y
webhookId
Y Use subscriptionId instead subscriptionId
Y

Request Payload subscriptions
Subscription
object
channelProviderId Y



callbackUrl

Y

Supports only https URLs




eventTypes

Y



Response


webhookId Y Use subscriptionId instead subscriptionId Y
Subscription Y Array of Subscription
object
channelProviderId




callbackUrl




eventTypes








Sample Request
                                      [
    {
      "callbackUrl": "https://myserver.com/send/callback/here",
      "eventTypes": [
        "MESSAGES"
      ]
    }
  ]
                                  
                                      {
    "channelProviderId": "ChatProvider01",
    "callbackUrl": "https://www.example.com/send/callback/here/instead",
    "eventTypes": [
      "ALL"
    ]
  }
                                  
Sample response
                                      {
    "webhookId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
    "subscriptions": [
      {
        "callbackUrl": "https://myserver.com/send/callback/here",
        "eventTypes": [
          "MESSAGES"
        ]
      }
    ]
  }
                                  
                                      {
    "subscriptionId": "2581e39b-fe84-4e38-87f4-63a1d037f39a",
    "channelProviderId": "ChatProvider01",
    "https://www.example.com/send/callback/here/instead",
    "eventTypes": [
      "ALL"
    ]
  }
                                  

Delete Subscription

DELETE /v1/channel-providers/{channelProviderId}/webhooks/{webhookId}

DELETE /v1beta/accounts/{accountId}/subscriptions/{subscriptionId}


Fields Mandatory Comment Fields Mandatory Comment
Path parameters channelProviderId Y
accountId Y

webhookId Y Use subscriptionId instead subscriptionId Y

Response 200 OK 204 No content

Subscription Model

API Version/v1
Model Name

Subscription


FieldMandatoryComments
1callbackUrlY
2eventType
Y[MESSAGES, PARTICIPANT_ADDED, PARTICIPANT_DISCONNECTED, ENGAGEMENT_CREATED, ENGAGEMENT_ERROR, ALL ]

Callback Response Model

EngagementCreatedEvent

API Version/v1/v1beta
Model NameEngagementCreatedEventEngagementCreatedEvent

FieldMandatoryCommentsFieldMandatoryComments
1eventTypeY
eventTypeY
2correlationId

correlationIdY
3engagementIdY
engagementIdY
4tenantIdY
accountIdY
5channelProviderIdY
channelProviderIdY
6providerDialogId

providerDialogId

7dialogIdY
dialogIdY
8sessionId

sessionId

9createdTimestamp

eventDateY
10customerIdentifiers

customerIdentifiers

11conversation

conversation

12EngagementParameters

engagementParameters

13channelId

businessAccountName

14sessionParameters

initiatorParticipantIdY

ParticipantEvent

API Version/v1/v1beta
Model NameParticipantEventParticipantEvent

FieldMandatoryCommentsFieldMandatoryComments
1eventTypeY
eventTypeY
2engagementIdY
engagementIdY
3tenantIdY
accountIdY
4channelProviderIdY
channelProviderIdY
5providerDialogId

providerDialogId

6dialogIdY
dialogIdY
7sessionId

sessionId

8createdTimestamp

eventDateY
9connectionIdY
connectionIdY
10participantId

participantId

11displayName

displayName

12participantType

participantType

13providerParticipantId

providerParticipantId

14


correlationIdY
15


channelId

MessageEvent

API Version/v1/v1beta
Model NameMessageEventMessageEvent

FieldMandatoryCommentsFieldMandatoryComments
1eventTypeY
eventTypeY
2correlationId

correlationIdY
3messageIdY
messageId

4tenantIdY
accountIdY
5sessionId

sessionId

6dialogIdY
dialogId

7engagementIdY
engagementId

8messageIndexY
messageIndex

9status

Enum [ NONE, SENT, DELIVERED,

READ, FAILED, DELETED]

statusY

Enum [ NONE, SENT, DELIVERED,

READ, FAILED, DELETED]

10businessAccountNameY
businessAccountName

11channelProviderIdY
channelProviderIdY
12channelIdY
channelIdY
13providerDialogId

providerDialogId

14providerSenderId

providerSenderId

15recipientParticipantsYArray of objectParticipantrecipientParticipants
Array of objectParticipant
16senderNameY
senderParticipantNameY
17senderType

senderParticipantTypeY
18providerMessageId

providerMessageId

19bodyYObject ofBodyElementbodyYObject ofBodyElement
20fallbackText

fallbackText

21header
Object ofMessageHeadersheaders
Object ofMessageHeaders
22attachments
Array of objectAttachmentattachments
Array of object
Attachment

23customData

customData

24contextParameters

engagementParameters

25receivedTimestamp

receivedAt

26lastUpdatedTimestamp

eventDate

27parentMessageId

parentMessageId

28providerParentMessageId

providerParentMessageId

29


senderParticipantIdY
30


eventDate

BodyElement (No Change)

API Version/v1/v1beta
Model NameBodyElement
BodyElement

FieldMandatoryCommentsFieldMandatoryComments
1elementTypeY
elementTypeY
2elementText
Object of TextelementText

3payload

payload

Text (No Change)

API Version/v1/v1beta
Model NameTextText

FieldMandatoryCommentsFieldMandatoryComments
1textY
textY
2textFormat

Enum [PLAINTEXT, .

HTML, MARKDOWN ]

textFormat

Enum [PLAINTEXT,

HTML, MARKDOWN ]

MessageHeaders (No Change)

API Version/v1/v1beta
Model NameMessageHeadersMessageHeaders

FieldMandatoryCommentsFieldMandatoryComments
1priority

priority

2sensitivity

sensitivity

3encoding

encoding

4subject

subject

5from

from

6to

to

7cc

cc

8bcc

bcc

9replyTo

replyTo

10clientDeviceTag

clientDeviceTag

11messageSourceServerTag

messageSourceServerTag

12providerTimestamp

providerTimestamp

13additionalHeaders

additionalHeaders

Participant

API Version/v1/v1beta
Model NameParticipantParticipant

FieldMandatoryCommentsFieldMandatoryComments
1participantIdY
participantIdY
2participantTypeY

Enum [CUSTOMER, AGENT,

SUPERVISOR, SYSTEM, BOT ]

participantTypeY

Enum [CUSTOMER, AGENT,

SUPERVISOR, SYSTEM, BOT ]

3participantAddress

providerParticipantId

4connectionId

connectionId

5displayName

displayName

6


channelProviderId

Attachment

API Version/v1/v1beta
Model NameAttachmentAttachment

FieldMandatoryCommentsFieldMandatoryComments
1idY
attachmentId

2nameY
nameY
3sizeY
sizeY
4contentTypeY
contentTypeY
5urlY
urlY
6captionText

captionText

7thumbnailUrl

thumbnailUrl

8additionalProperties

additionalProperties

9


contentId

EngagementErrorEvent

API Version/v1/v1beta
Model NameEngagementErrorEventEngagementErrorEvent

FieldMandatoryCommentsFieldMandatoryComments
1eventTypeY
eventTypeY
2typeY
typeY
3titleY
titleY
4detail

detail

5engagementId

engagementId

6dialogId

dialogId

7sessionId

sessionId

8providerDialogId

providerDialogId

9channelProviderIdY
channelProviderIdY
10channelId

channelId

11tenantId

accountId

12correlationIdY
correlationIdY
13timestamp

eventDateY