Docs menu

Get message usage

GET/v1/usage

  • Scope messages:read

Inbound, outbound and failed outbound message counts per line for a period. Defaults to this calendar month (UTC).

Parameters

Query

  • fromtimestamp

    Start, ISO 8601 with an offset (default: the 1st of this month, UTC).

  • totimestamp

    End, ISO 8601 with an offset (default: now).

Response

200 OKCounts per line.

  • object"usage"required

  • fromtimestamprequired

  • totimestamprequired

  • dataarray of objectrequired

    Fields of data
    • profile_idstringrequired

    • inboundintegerrequired

    • outboundintegerrequired

    • outbound_failedintegerrequired

Errors

StatusCodeMeans
400validation_failedA field is missing or invalid.
401unauthorizedThe API key is missing, unknown or revoked.
403insufficient_scopeThe API key lacks the scope this needs.
404not_foundNo such object, or the key can't see it.

Every error is { "error": { "code", "message" } }. All error codes.

Keys come with your first line.

Request an invite and we'll set up a line for your team. API access is part of every plan.

Request an invite