History APIs

1. Overview

UCI provides APIs to fetch the conversation history against a bot or a user.

2. APIs

2.1. User History

Use below API to fetch the history against a bot. **** This API uses below required parameters to fetch the user history.

  • userId: Phone number of user

  • provider: Conversation provider. Eg. gupshup

  • start & end date: Conversations between start & end date.

curl --location --request GET 'http://INBOUND:PORT/xmsg/history?userId=75********&provider=gupshup&endDate=03-07-2022&startDate=01-07-2022'

Limitation: This API can provide maximum 1000 conversations.

2.2. Bot History

Use below API to fetch the history against a user. This API uses below required parameters to fetch the user history.

  • botId: Conversation id

  • provider: Conversation provider. Eg. gupshup

  • start & end date: Conversations between start & end date.

Limitation: This API can provide conversations for 15 days only.

2.3. Bot + User History

Use below API to fetch the history against a user for a specific bot. This API uses below required parameters to fetch the history.

  • botId: Conversation id

  • userId: Phone number of user

  • provider: Conversation provider. Eg. pwa

  • start & end date: Conversations between start & end date.

Limitation: This API can provide maximum 1000 conversations.

These APIs will give the response in below format.

2.4. Flow Diagram

Below is the flow diagram of how the history API works.

Flow Diagram

Last updated

Was this helpful?