Acknowledge a chatbot message

You must acknowledge each message received from the chatbot by either sending the message back as an echo or sending a delivery acknowledgement.

Request

The webhook integration page contains the base URL to use for all webhook endpoints and the access token to include as a Bearer token in all requests.

Endpoint POST {baseURL}/conversations/{conversationId}/delivery
Headers Content-Type application/json
Authorization Bearer {AccessToken}
Path parameters conversationID The chat identifier that was returned when you initiated the chat.
Body
{
  "delivery" :{
    "state": "success",
    "message": { 
      "id": "xxxxxxxxx", 
      "author": { 
        "type": "chatbot" 
      }, 
      "content": { 
        "type": "text", 
        "text": "I am a helpful chatbot! What can I help you with today?", 
      }, 
    }
  }
}

A JSON object of delivery containing:

curl --location 'https://au.api.ingenious.ai/messaging/webhook/v1/{teamId}/{botId}/conversations/{conversationId}/delivery' \ 
--header 'Content-Type: application/json' \ 
--header 'Authorization: Bearer {accessToken}' \ 
--data '{ 
  "delivery" :{
    "state": "success",
    "message": { 
      "id": "xxxxxxxxx", 
      "author": { 
        "type": "chatbot" 
      }, 
      "content": { 
        "type": "text", 
        "text": "I am a helpful chatbot! What can I help you with today?", 
      }, 
    }
  }
}'

Response

Response code Description
200

Acknowledged. An empty JSON object is returned to acknowledge the request. 

Requests that result in issues still return the acknowledgement and empty object.

400 Error. Common causes of errors include a malformed or missing delivery payload, an incomplete webhook integration, incorrect or missing authorization headers, or invalid chatbot or team ID in the base URL.
Was this article helpful?
0 out of 0 found this helpful