get-sms-cost
Get SMS Cost (v1)
Method & Path
GET /api/v1/workspace/:workspaceId/sms/cost
Description
Returns the pricing rule for SMS: cost per segment and how many characters are counted as one segment.
Backend Path
The backend is mounted at /v1/workspace/:workspaceId/sms/cost.
Authentication
Required: Workspace authentication (JWT in Authorization header)
Persona Access:
- Admin: Not applicable (workspace-scoped endpoint)
- Workspace Owner: Allowed (root persona for workspace features)
- Staff: Allowed (role-based)
- Customer: Not allowed
Headers
Authorization: Bearer <workspace_token>
Content-Type: application/json
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
workspaceId | string | Yes | Workspace identifier |
Response 200 OK
{
"costPerMessage": 0.06,
"charsPerMessage": 150
}
Response Fields
costPerMessage(number): Cost per SMS segment in USD.charsPerMessage(number): Number of characters per segment used for pricing.
Common Errors
- 401 Unauthorized: Missing or invalid authentication token
- 403 Forbidden: User does not have permission
- 404 Not Found: Workspace not found
- 500 Internal Server Error: Server error occurred while processing the request