Get SMS Summary (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/sms/summary
Description
Retrieves a summary of SMS usage statistics for a workspace, including total messages, costs, and balance information.
Authentication
Required: Workspace authentication via session cookie.
Headers
Content-Type: application/json- Cookie with workspace session
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | string | Yes | The workspace ID |
Response 200 OK
{
"totalMessages": 1250,
"sentMessages": 1200,
"failedMessages": 30,
"pendingMessages": 20,
"totalCost": 125.50,
"totalPaid": 100.00,
"remainingBalance": 25.50,
"costPerMessage": 0.10,
"minimumAllowedBalance": 10.00
}
Fields:
totalMessages(number): Total number of SMS messages (sent + failed + pending)sentMessages(number): Number of successfully sent messagesfailedMessages(number): Number of failed messagespendingMessages(number): Number of pending messagestotalCost(number): Total cost of all SMS messages in USDtotalPaid(number): Total amount paid for SMS in USDremainingBalance(number): Remaining balance (totalPaid - totalCost) in USDcostPerMessage(number): Cost per SMS message in USDminimumAllowedBalance(number): Minimum allowed balance before SMS sending is blocked (in USD)
Note: All monetary values are in USD (US Dollars) regardless of the workspace currency setting.
Common Errors
400 Bad Request: Invalid workspace ID format 404 Not Found: Workspace not found or access denied 401 Unauthorized: Authentication required 403 Forbidden: Subscription expired or insufficient permissions