Returns messages usage history of the specified contract within defined period.
Returns aggregated message counts per month for all workspaces of the contract. Only a corresponding contract member or a client with global usage read permission can be authorized to access this resource. Returns aggregated message counts for the contract within the given period. By default the response is aggregated across all workspaces of the contract. When per_workspace=true is provided, the response contains per-workspace breakdown (each item includes workspaceId).
Path parameters
Contract identifier
Query parameters
Start Date of the period (inclusive). Format – ISO 8601.
End Date of the period (inclusive). Format – ISO 8601.
Param to specify aggregation period. Format - 'day', 'month' (default: 'month')
When set to true, returns usage history broken down per workspace. By default, the response is aggregated across all workspaces of the contract.
Optional list of workspace IDs to limit the messages usage history to. Can be repeated for multiple IDs. Only workspaces belonging to the contract are considered.
Response
OK
Example response
{
"data": [
{
"id": "2024-01-01",
"messagesCount": 1000
}
]
}