Skip to content

Get a group's health

GET
/v1/groups/{group_id}/health
curl --request GET \
--url https://example.com/MIDWATER_BASE_URL/v1/groups/front-desk/health \
--header 'Authorization: Bearer <token>'

The worst status among the group’s active agents, each agent’s status, and totals across them, in the key’s environment.

group_id
required

A letter or digit, then up to 127 letters, digits, ., _, : or -. No /, so IDs never need URL-encoding.

string
/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/

The group’s health.

Media typeapplication/json
object
group_id
required
string
name
required
string
environment
required
string
Allowed values: test live
health_status
required

not_enough_calls: fewer than 5 calls with an outcome in the last 7 days, so nothing is measured yet, unless a high-severity compliance failure puts the agent in watch (1) or at_risk (2 or more).

string
Allowed values: healthy watch at_risk not_enough_calls
reason
required

Watch and at risk name the agent that set the status.

string
agents
required
Array<object>
object
id
required
string
name
required
string
health_status
required

not_enough_calls: fewer than 5 calls with an outcome in the last 7 days, so nothing is measured yet, unless a high-severity compliance failure puts the agent in watch (1) or at_risk (2 or more).

string
Allowed values: healthy watch at_risk not_enough_calls
last_7_days
required
object
conversations
required

Conversations received in the window.

integer
with_outcome
required

Conversations with an outcome (customer calls that were scored).

integer
resolution_rate
required

Share of conversations with an outcome that were resolved.

number | null
handed_to_person_rate
required

Share handed to a person (a transfer, or a person requested and provided).

number | null
requests_for_person_not_honored
required

Conversations where the caller asked for a person and didn’t get one.

integer
avg_frustration
required

Average caller frustration, 0 (calm) to 1 (very frustrated).

number | null
compliance_failures
required

Compliance checks that failed in the window.

integer
last_30_days
required
object
conversations
required

Conversations received in the window.

integer
with_outcome
required

Conversations with an outcome (customer calls that were scored).

integer
resolution_rate
required

Share of conversations with an outcome that were resolved.

number | null
handed_to_person_rate
required

Share handed to a person (a transfer, or a person requested and provided).

number | null
requests_for_person_not_honored
required

Conversations where the caller asked for a person and didn’t get one.

integer
avg_frustration
required

Average caller frustration, 0 (calm) to 1 (very frustrated).

number | null
compliance_failures
required

Compliance checks that failed in the window.

integer

Examples

Exampledefault

A group set by its worst agent

{
"group_id": "brightsmile-dental",
"name": "BrightSmile Dental",
"environment": "live",
"health_status": "watch",
"reason": "Front desk: resolution 81% vs 87% 30-day baseline (−6 pts) since version 3.2.0",
"agents": [
{
"id": "front-desk",
"name": "Front desk",
"health_status": "watch"
},
{
"id": "after-hours",
"name": "After hours",
"health_status": "healthy"
}
],
"last_7_days": {
"conversations": 301,
"with_outcome": 255,
"resolution_rate": 0.83,
"handed_to_person_rate": 0.08,
"requests_for_person_not_honored": 2,
"avg_frustration": 0.21,
"compliance_failures": 0
},
"last_30_days": {
"conversations": 1270,
"with_outcome": 1088,
"resolution_rate": 0.87,
"handed_to_person_rate": 0.08,
"requests_for_person_not_honored": 6,
"avg_frustration": 0.19,
"compliance_failures": 1
}
}
Midwater-Request-Id
string
Example
req_8Jx2kQ4mT9

The request’s ID, also in error bodies as error.request_id. Quote it when contacting support.

Missing, malformed, unknown or revoked API key.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "authentication_error",
"message": "Missing or invalid API key. Use Authorization: Bearer mw_test_… or mw_live_…"
}
}

The key is valid but not allowed to do this.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "permission_denied",
"message": "This key can't do that",
"request_id": "req_8Jx2kQ4mT9"
}
}

Not found in the key’s environment.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "not_found",
"message": "Conversation not found"
}
}

The path exists but doesn’t support this method. Allow lists the methods it does support.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "method_not_allowed",
"message": "GET isn't supported here; use POST",
"request_id": "req_8Jx2kQ4mT9"
}
}
Allow
string
Example
POST

The methods the path supports, e.g. POST.

Too many requests. Wait Retry-After seconds. The limits are published when they’re set.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "rate_limited",
"message": "Too many requests",
"request_id": "req_8Jx2kQ4mT9"
}
}
Retry-After
integer

Seconds to wait before retrying.

RateLimit-Limit
integer

Requests allowed in the current window. The numbers are published when the limits are set.

RateLimit-Remaining
integer

Requests left in the current window.

RateLimit-Reset
integer

Seconds until the window resets.

Something went wrong on Midwater’s side. Safe to retry with the same Idempotency-Key.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "server_error",
"message": "Something went wrong on our side"
}
}

Midwater is briefly unavailable. Retry with backoff, honouring Retry-After when present.

Media typeapplication/json
object
error
required
object
type
required

Stable machine-readable type. Each has a set status: invalid_json 400, authentication_error 401, permission_denied 403, not_found 404, method_not_allowed 405, idempotency_conflict 409, payload_too_large 413, validation_error 422, rate_limited 429, server_error 500, service_unavailable 503. Types not yet returned are planned. Treat a type you don’t know by its status class.

string
Allowed values: invalid_json authentication_error permission_denied not_found method_not_allowed idempotency_conflict payload_too_large validation_error rate_limited server_error service_unavailable
message
required

Human-readable; may change.

string
fields

Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.

object
key
additional properties
Array<string>
request_id

The request’s ID, the same as the Midwater-Request-Id header.

string

Example

{
"error": {
"type": "service_unavailable",
"message": "Midwater is briefly unavailable",
"request_id": "req_8Jx2kQ4mT9"
}
}
Retry-After
integer

Seconds to wait before retrying.