Async API - Response Types
  • 31 May 2024
  • 7 Minutes to read
  • Contributors
  • PDF

Async API - Response Types

  • PDF

Article summary

Method: POST
API Endpoint: https://eu.va.knovvu.com/magpie/ext-api/messages
CONTENT-TYPE: application/raw (json)

Headers:
Headers

Sample Request Body:

{
  "type": "message",
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "conversation": {
    "id": "{{conversation-id}}"
  },
  "text": "Text"
}


Response Types

Text

Text Response

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": "",
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "welcome",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


Wait & Text

Wait, then send text response.

Wait

{
  "type": "typing",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": null,
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": null,
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {
      "isTyping": "True"
    },
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}

Text

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "This message comes after 10 seconds of waiting.",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


Quick Reply & Button

Button Response

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": "",
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.hero",
      "contentUrl": null,
      "content": {
        "title": null,
        "subtitle": null,
        "text": "Is there anything else I can help you with?",
        "images": null,
        "buttons": [
          {
            "type": "imBack",
            "title": "Yes",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "Yes",
            "channelData": null,
            "imageAltText": null
          },
          {
            "type": "imBack",
            "title": "No",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "no",
            "channelData": null,
            "imageAltText": null
          }
        ],
        "tap": null
      },
      "name": null,
      "thumbnailUrl": null
    }
  ],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


Card

Card Response

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": "",
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.hero",
      "contentUrl": null,
      "content": {
        "title": "Sample Card",
        "subtitle": "deneme alt başlık",
        "text": "deneme açıklama metni",
        "images": [
          {
            "url": "https://www.pngall.com/wp-content/uploads/8/Sample-PNG-Image.png",
            "alt": null,
            "tap": null
          }
        ],
        "buttons": [
          {
            "type": "imBack",
            "title": "Deneme 1",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "deneme1",
            "channelData": null,
            "imageAltText": null
          },
          {
            "type": "imBack",
            "title": "Deneme 2",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "deneme2",
            "channelData": null,
            "imageAltText": null
          }
        ],
        "tap": null
      },
      "name": null,
      "thumbnailUrl": null
    }
  ],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


Custom Data

Custom Data Response

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "https://6476-176-41-43-92.ngrok-free.app/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "test3",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.hero",
      "contentUrl": null,
      "content": {
        "title": "Sample Card",
        "subtitle": "deneme alt başlık",
        "text": "deneme açıklama metni",
        "images": [
          {
            "url": "https://www.pngall.com/wp-content/uploads/8/Sample-PNG-Image.png",
            "alt": null,
            "tap": null
          }
        ],
        "buttons": [
          {
            "type": "imBack",
            "title": "Deneme 1",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "deneme1",
            "channelData": null,
            "imageAltText": null
          },
          {
            "type": "imBack",
            "title": "Deneme 2",
            "image": null,
            "text": null,
            "displayText": null,
            "value": "deneme2",
            "channelData": null,
            "imageAltText": null
          }
        ],
        "tap": null
      },
      "name": null,
      "thumbnailUrl": null
    }
  ],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {
      "content": "test content"
    },
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}
Custom Data
"CustomProperties": {
  "content": "test content"
},


Location

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [],
  "entities": [
    {
      "type": "Place",
      "address": "TÜRKİYE",
      "geo": {
        "elevation": "",
        "latitude": 38.423733,
        "longitude": 27.142826,
        "type": "",
        "name": "İzmir"
      },
      "hasMap": "https://www.izmir.bel.tr/"
    }
  ],
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


File

File Response

{
  "type": "message",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "conversationId",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": [
    {
      "contentType": "file/minio",
      "contentUrl": "663d2e2115b6446ea2e75ed81eee735f",
      "content": null,
      "name": "hands-up.png",
      "thumbnailUrl": null
    }
  ],
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": {},
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}


Live Agent

Live Agent Response

{
  "type": "CustomerAssignedToLiveAgent",
  "id": null,
  "timestamp": null,
  "localTimestamp": null,
  "localTimezone": null,
  "serviceUrl": "{{service-url}}/reply",
  "channelId": "TestChat",
  "from": null,
  "conversation": {
    "isGroup": null,
    "conversationType": null,
    "id": "coversationId",
    "name": null,
    "aadObjectId": null,
    "role": null,
    "tenantId": null
  },
  "recipient": null,
  "textFormat": null,
  "attachmentLayout": null,
  "membersAdded": null,
  "membersRemoved": null,
  "reactionsAdded": null,
  "reactionsRemoved": null,
  "topicName": null,
  "historyDisclosed": null,
  "locale": null,
  "text": "Knovvu Live Agent has joined the conversation.",
  "speak": null,
  "inputHint": null,
  "summary": null,
  "suggestedActions": null,
  "attachments": null,
  "entities": null,
  "channelData": {
    "ProjectName": "ProjectName",
    "ResponseType": 0,
    "CustomActionData": null,
    "IsSynchronizer": false,
    "HasExternalAudioContent": false,
    "SrConfidence": null,
    "CustomProperties": null,
    "EndUser": {
      "Name": null,
      "Phone": null,
      "Email": null,
      "Twitter": null
    }
  },
  "action": null,
  "replyToId": null,
  "label": null,
  "valueType": null,
  "value": null,
  "name": null,
  "relatesTo": null,
  "code": null,
  "expiration": null,
  "importance": null,
  "deliveryMode": null,
  "listenFor": null,
  "textHighlights": null,
  "semanticAction": null,
  "callerId": null
}

Was this article helpful?

What's Next
Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.