Message2Give Logo
Message2Give DocsVersion 1.2.8

Statistics

View statistics of your workspace chats.


GET Chat Statistics

https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/stats/chat/{chat_type}?timezone_offset={timezone_offset}&month={month}

Authentication Required: Yes

Description

Retrive the chat statistics from your workspace during a specific month. The endpoint needs a timezone to accurately mark the start of the month.

Note: this endpoint only works with token authentication.

Path Parameters

  • workspace_id: the ID of your workspace.

  • chat_type: the type of chat to retrieve the stats of. Either "web" or "sms".

Query Parameters

  • timezone_offset*: offset in minutes of the desired timezone from GMT. E.g. -600 is 10 hours ahead of GMT.

  • month*: UTC-formatted date corresponding to the start of the desired month.

Example JSON Response
{
  "stats": {
    "users": {
      "891ebf4b4bd4b76f9a3dc37f0c94db42948d60e008a0aefb28abaadf1a159627": {
        "response": {
          "2021-06-04T14:00:00.000Z": {
            "average": 72
          },
          "2021-06-03T14:00:00.000Z": {
            "average": null
          },
          "2021-06-02T14:00:00.000Z": {
            "average": null
          }
        },
        "wait": {
          "2021-06-04T14:00:00.000Z": {
            "average": 19
          },
          "2021-06-03T14:00:00.000Z": {
            "average": null
          }
        },
        "sessions": {
          "2021-06-04T14:00:00.000Z": {
            "average": 95,
            "count": 1
          }
        }
      }
    },
    "ccts": {
      "8a355f0054431c91e44c957100e870b8daf8f4f53b9c132c88544a1cbb5ec83b": {
        "users": {
          "891ebf4b4bd4b76f9a3dc37f0c94db42948d60e008a0aefb28abaadf1a159627": {
            "response": {
              "2021-06-04T14:00:00.000Z": {
                "average": null
              }
            },
            "wait": {
              "2021-06-04T14:00:00.000Z": {
                "average": null
              },
              "2021-06-03T14:00:00.000Z": {
                "average": null
              }
            },
            "sessions": {
              "2021-06-04T14:00:00.000Z": {
                "average": null,
                "count": 0
              },
              "2021-06-03T14:00:00.000Z": {
                "average": null,
                "count": 0
              }
            }
          },
        }
      }
    }
  },
  "status": "OK"
}

Code Snippet


GET SMS Usage

https://api.app.message2give.com/2019-01-23/organisations/{workspace_id}/usage/sms/console?timezone_offset={timezone_offset}&month={month}

Authentication Required: Yes

Description

Retrive the SMS usage of your workspace during a specific month. The endpoint needs a timezone to accurately mark the start of the month.

Path Parameters

  • workspace_id: the ID of your workspace.

Query Parameters

  • timezone_offset*: offset in minutes of the desired timezone from GMT. E.g. -600 is 10 hours ahead of GMT.

  • month*: UTC-formatted date corresponding to the start of the desired month.

Example JSON Response
{
  "usage": {
    "surveys": {
      "c4ee72be34977846454f42c109e6eccd95bc269e5d59e6391cbd5d54e407ce08": {
        "messages": {
          "2021-06-04T14:00:00.000Z": 0,
          "2021-06-03T14:00:00.000Z": 0,
          "2021-06-02T14:00:00.000Z": 0,
          "2021-06-01T14:00:00.000Z": 0,
          "2021-05-31T14:00:00.000Z": 0
        },
        "units": {
          "2021-06-04T14:00:00.000Z": 0,
          "2021-06-03T14:00:00.000Z": 0,
          "2021-06-02T14:00:00.000Z": 0,
          "2021-06-01T14:00:00.000Z": 0,
          "2021-05-31T14:00:00.000Z": 0
        }
      },
    }
  },
  "status": "OK"
}

Code Snippet

How is this guide?

On this page