Skip to main content

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

ParameterTypeRequiredDescription
workspaceIdstringYesThe 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 messages
  • failedMessages (number): Number of failed messages
  • pendingMessages (number): Number of pending messages
  • totalCost (number): Total cost of all SMS messages in USD
  • totalPaid (number): Total amount paid for SMS in USD
  • remainingBalance (number): Remaining balance (totalPaid - totalCost) in USD
  • costPerMessage (number): Cost per SMS message in USD
  • minimumAllowedBalance (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