Skip to content
Get an API key
Reference

Status

2 endpoints in this family.

Is everything working

GET/api/v1/health

Key role admin or above

Returns the state of the workspace and what is wrong, if anything: a channel that has gone silent, one missing its credentials, a number whose quality is red, a queue that is not moving. Each finding says what it is and how serious it is.

Poll this rather than guessing from failures.

Response

An overall status and the list of findings.

  • data.healthyboolean

    true when nothing is wrong.

  • data.alertsobject[]

    What is wrong, most serious first.

    Show fields
    • levelstring

      How serious.

      warningcritical

    • codestring

      A stable code, e.g. channel_silent.

    • messagestring

      What it is, in words.

curl https://coplace.io/api/v1/health \ -H "Authorization: Bearer $COPLACE_KEY"

Response

200 OK
{ "data": { "healthy": true, "alerts": [ { "level": "warning", "code": "…", "message": "…" } ] }}

What has been consumed

GET/api/v1/usage

Key role admin or above

Returns monthly counters for this workspace — conversations handled by the collaborator, messages in and out, templates sent — over the last 3 months (?months= 1 to 12).

Plan limits are counted across the whole client account; a key only ever sees its own workspace's counters.

Query parameters

  • monthsinteger

    How many months back, 1 to 12. Default 3.

Response

The counters and the limits they run against.

  • data.monthsstring[]

    The months covered, YYYY-MM.

  • data.workspacesobject[]

    For a key: its own workspace only.

    Show fields
    • idstring

      The workspace id.

    • byMonthobject[]

      Per month: conversations handled by the collaborator, messagesIn, messagesOut (counted as the plan counts its monthly messages: sent from Coplace, outside tests), templates, aiCalls.

curl https://coplace.io/api/v1/usage \ -H "Authorization: Bearer $COPLACE_KEY"

Response

200 OK
{ "data": { "months": [ "…" ], "workspaces": [ { "id": "…", "byMonth": [] } ] }}