Get conversation usage

SDK platic.usage.conversations()

Read conversation and autonomy metrics by platform, agent, channel, or tag.

Example

await platic.usage.conversations({ breakdown: "agent" });

Query parameters

ParameterTypeDescriptionRequired
workspacestringWorkspace ID. Required when your credential covers several workspaces (list workspaces); without it the answer is 400When the credential has several
startDatestringISO 8601 start date with offset. If omitted, uses the start of the billing period—
endDatestringISO 8601 end date with offset. If omitted, uses the end of the billing period—
breakdownenumBreakdown dimension: platform (default), agent, channel, or tag—

Response

{
  "status": "success",
  "data": {
    "workspaceId": "g6yCA16pkWl5eXo7KszB",
    "billingPeriod": {
      "startDate": "2026-06-01T00:00:00.000Z",
      "endDate": "2026-06-30T23:59:59.999Z"
    },
    "conversations": {
      "range": {
        "startDate": "2026-06-01T00:00:00.000Z",
        "endDate": "2026-06-30T23:59:59.999Z"
      },
      "freshness": {
        "source": "daily_aggregations",
        "lastUpdated": "2026-06-29T18:00:05.000Z",
        "expectedLagMinutes": 60
      },
      "summary": {
        "conversationCount": 340,
        "assistedConversationCount": 28,
        "assistanceRequestCount": 35,
        "autonomyRate": 91.76
      },
      "breakdown": {
        "dimension": "platform",
        "totals": [
          { "key": "whatsapp", "label": "WhatsApp", "value": 300 }
        ],
        "series": [
          { "date": "2026-06-29T12:00:00.000Z", "key": "whatsapp", "label": "WhatsApp", "value": 40 }
        ]
      }
    }
  }
}

Response fields

FieldDescription
workspaceIdWorkspace ID
billingPeriodActive billing period for the workspace
conversations.rangeEffective date range evaluated
conversations.summary.conversationCountTotal conversations
conversations.summary.assistedConversationCountConversations that required human assistance
conversations.summary.assistanceRequestCountAssistance requests recorded
conversations.summary.autonomyRatePercentage of conversations resolved without human assistance
conversations.breakdown.dimensionBreakdown dimension applied
conversations.breakdown.totalsPer-key totals with key, label, and value
conversations.breakdown.seriesDaily series per breakdown key
conversations.freshnessLatest update and expected lag

Errors

Statusdetails.codeWhen it happens
400INVALID_REQUESTA query parameter is not valid: one the endpoint does not know, a date that is not ISO 8601 with offset, or a value outside the allowed list (breakdown). details.issues says which one
400INVALID_REQUESTYour credential covers several workspaces and you did not send ?workspace=, or you sent one it does not cover. details.available lists the IDs you can use and details.requested the one you sent
401UNAUTHENTICATEDThe credential is missing or invalid
403FORBIDDENWith an OAuth token, the person has no access to the dashboard (statistics) in that workspace. The message is Missing dashboard permission
404NOT_FOUNDThe workspace no longer exists. This is rare
{
  "code": 400,
  "error": "Bad Request - The request has validation errors",
  "details": {
    "code": "INVALID_REQUEST",
    "message": "The request has validation errors",
    "issues": [
      {
        "code": "invalid_string",
        "validation": "datetime",
        "path": ["startDate"],
        "message": "Invalid datetime"
      }
    ]
  }
}

The general error format is in Errors.