Skip to content
First requestVisit website ↗
Navigation

SMS/MMS segment counts and estimated Twilio cost for one contact

Counts every billable SMS/MMS for the contact across full history (not the conversation window), computes Twilio billable segments from message encoding, and prices them against the hardcoded rate card in src/config/smsRates.js. Cost is an ESTIMATE — see that file for measured rates and known variance. Available to every workspace; each one reads only its own contacts' messages, priced against its own Twilio account's rates.

GET
https://api.channelautomation.com/api/contacts/{contactId}/sms-usage

Authorization

  • bearerAuth
    bearerAuth
    required

Path parameters

  • contactId
    string
    required
    format: uuid

Query parameters

  • includeMessages
    optional
    true
    or
    false

    Include the per-message breakdown rows. Defaults to true.

Returns

200

Usage totals, per-direction breakdown, encoding waste and rate card.

400

Missing contact or workspace.

401

Authentication required
JSON
  • error
    optional
    string
  • success
    optional
    boolean

404

Contact not found in the workspace.

500

Internal server error
JSON
  • error
    optional
    string
  • details
    optional
    string
  • success
    optional
    boolean

Type to search…

↑↓ navigate↵ selectEsc close