Usage Actors

Returns message consumption grouped by actor: automatic agents, workspace users, contacts, or other buckets captured by Platica.

GET https://api.platica.mx/v1/usage/actors

Query parameters

ParameterTypeDescriptionRequired
workspacestringFilters the response to one workspace. If omitted, returns all accessible workspaces
startDatestringISO 8601 start date. If omitted, uses the start of the billing period
endDatestringISO 8601 end date. If omitted, uses the end of the billing period

Response

{
  "workspaces": [
    {
      "id": "g6yCA16pkWl5eXo7KszB",
      "name": "My company",
      "billingPeriod": {
        "startDate": "2026-06-01T00:00:00.000Z",
        "endDate": "2026-06-30T23:59:59.999Z"
      },
      "actors": {
        "range": {
          "startDate": "2026-06-01T00:00:00.000Z",
          "endDate": "2026-06-30T23:59:59.999Z"
        },
        "freshness": {
          "source": "daily_aggregations",
          "lastUpdated": "2026-06-29T18:31:10.000Z",
          "expectedLagSeconds": 30
        },
        "actorTypes": [
          { "actorType": "Agente IA / automático", "messages": 870 },
          { "actorType": "Usuarios del workspace", "messages": 80 }
        ],
        "workspaceUsers": [
          { "userId": "user_123", "email": "ana@example.com", "messages": 45 }
        ],
        "summary": {
          "totalMessages": 1200
        }
      }
    }
  ],
  "workspacesCount": 1
}

Response fields

FieldDescription
idWorkspace ID
nameWorkspace name
billingPeriodActive billing period for the workspace
actors.rangeEffective date range evaluated
actors.actorTypesMessages per actor type with actorType and messages
actors.workspaceUsersMessages per workspace user with userId, email, and messages
actors.summary.totalMessagesTotal messages used in the range
actors.freshnessLatest update and expected lag