Get usage metrics

GET /v1/users/me/usage

Returns usage metrics including total conversations and knowledge base entries across all replicas owned by the authenticated user.

Headers

  • X-API-Version string

    Default value is 2025-03-25.

Responses

  • 200 application/json

    Usage metrics

    Hide response attributes Show response attributes object
    • conversations object Required

      Conversation usage metrics

      Hide conversations attributes Show conversations attributes object
      • currentMonthTotal integer Required

        Total conversations for the current calendar month

        Minimum value is 0.

      • currentMonthByReplica object Required

        Current calendar month conversations breakdown by replica

        Hide currentMonthByReplica attribute Show currentMonthByReplica attribute object
        • * integer Additional properties

          Count for this replica

          Minimum value is 0.

    • knowledgeBaseEntries object Required

      Knowledge base entries usage metrics

      Hide knowledgeBaseEntries attributes Show knowledgeBaseEntries attributes object
      • total integer Required

        Total knowledge base entries across all replicas

        Minimum value is 0.

      • byReplica object Required

        Knowledge base entries breakdown by replica

        Hide byReplica attribute Show byReplica attribute object
        • * integer Additional properties

          Count for this replica

          Minimum value is 0.

    • success boolean Required

      Indicates the request was successful

      Value is true.

  • 400 application/json

    Bad Request

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 401 application/json

    Unauthorized

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 404 application/json

    Not Found

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 415 application/json

    Unsupported Media Type

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

  • 500 application/json

    Internal Server Error

    Hide response attributes Show response attributes object
    • success boolean Required

      Indicates the status of the request

    • error string Required

      A text representation of the error

    • fingerprint string

      A unique identifier of the event, useful for reporting

    • request_id string Required

      A unique identifier of the request, useful for reporting

    • inner_exception object

      The inner exception

      Hide inner_exception attributes Show inner_exception attributes object
      • name string Required
      • message string Required
      • cause string
      • stack string
GET /v1/users/me/usage
curl \
 --request GET 'https://api.sensay.io/v1/users/me/usage' \
 --header "X-ORGANIZATION-SECRET: $API_KEY" \
 --header "X-USER-ID: $API_KEY" \
 --header "X-API-Version: 2025-03-25"
Response examples (200)
{
  "conversations": {
    "currentMonthTotal": 42,
    "currentMonthByReplica": {
      "14e42ac9-369e-432c-97ab-7e7250a779b7": 5,
      "5ee26dc3-49d2-43a8-a45b-25a1c78382cd": 12,
      "9c0cf332-387e-4067-96e5-007c1f03e0d4": 3
    }
  },
  "knowledgeBaseEntries": {
    "total": 67,
    "byReplica": {
      "14e42ac9-369e-432c-97ab-7e7250a779b7": 25,
      "5ee26dc3-49d2-43a8-a45b-25a1c78382cd": 32,
      "9c0cf332-387e-4067-96e5-007c1f03e0d4": 10
    }
  },
  "success": true
}
Response examples (400)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (401)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (404)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"
}
Response examples (415)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b"
}
Response examples (500)
{
  "error": "A text representation of the error",
  "success": false,
  "request_id": "xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab",
  "fingerprint": "14fceadd84e74ec499afe9b0f7952d6b",
  "inner_exception": {
    "name": "Server overheated",
    "cause": "Request too complicated",
    "error": "The server overheated due to an unexpected situation",
    "stack": "Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."
  }
}