Confirm or correct a check result
const url = 'https://example.com/MIDWATER_BASE_URL/v1/conversations/example/feedback';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"check_key":"need_unresolved","verdict":"fail","note":"Caller hung up before the booking went through."}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/MIDWATER_BASE_URL/v1/conversations/example/feedback \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "check_key": "need_unresolved", "verdict": "fail", "note": "Caller hung up before the booking went through." }'Records your team’s answer for one check on one conversation (stored as a label with source api).
id is Midwater’s ID or your external_id. Today each call adds a label; idempotency keys on this
endpoint are planned.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Midwater’s conversation ID or your external_id.
Header Parameters
Section titled “Header Parameters”Planned for every POST. Accepted today but not yet honoured on this endpoint, so don’t retry it blindly.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Your team’s answer: pass (no problem) or fail (the problem happened).
Example
{ "check_key": "need_unresolved", "verdict": "fail", "note": "Caller hung up before the booking went through."}Responses
Section titled “Responses”The label was stored.
object
Example
{ "id": "cmv0189as006no301jmgcwibw", "check_key": "need_unresolved", "verdict": "fail", "source": "api"}Headers
Section titled “Headers”Example
req_8Jx2kQ4mT9The request’s ID, also in error bodies as error.request_id. Quote it when contacting support.
The body isn’t valid JSON.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "invalid_json", "message": "Body must be valid JSON" }}Missing, malformed, unknown or revoked API key.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
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.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "permission_denied", "message": "This key can't do that", "request_id": "req_8Jx2kQ4mT9" }}No such conversation, or the conversation has no result for check_key ("No result for check <key>").
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "not_found", "message": "No result for check no_such_check" }}The path exists but doesn’t support this method. Allow lists the methods it does support.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "method_not_allowed", "message": "GET isn't supported here; use POST", "request_id": "req_8Jx2kQ4mT9" }}Headers
Section titled “Headers”Example
POSTThe methods the path supports, e.g. POST.
The Idempotency-Key was already used with a different body.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "idempotency_conflict", "message": "This Idempotency-Key was used with a different body", "request_id": "req_8Jx2kQ4mT9" }}The body is JSON but doesn’t match the schema. fields maps each dotted path to its messages.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "validation_error", "message": "The conversation payload is invalid", "fields": { "channel": [ "Invalid enum value. Expected 'voice' | 'chat', received 'fax'" ], "transcript": [ "transcript needs at least one turn" ] } }}Too many requests. Wait Retry-After seconds. The limits are published when they’re set.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "rate_limited", "message": "Too many requests", "request_id": "req_8Jx2kQ4mT9" }}Headers
Section titled “Headers”Seconds to wait before retrying.
Requests allowed in the current window. The numbers are published when the limits are set.
Requests left in the current window.
Seconds until the window resets.
Something went wrong on Midwater’s side. Safe to retry with the same Idempotency-Key.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "server_error", "message": "Something went wrong on our side" }}Midwater is briefly unavailable. Retry with backoff, honouring Retry-After when present.
object
object
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.
Human-readable; may change.
Validation errors by dotted path, e.g. transcript.0.speaker. _root for the body as a whole.
object
The request’s ID, the same as the Midwater-Request-Id header.
Example
{ "error": { "type": "service_unavailable", "message": "Midwater is briefly unavailable", "request_id": "req_8Jx2kQ4mT9" }}Headers
Section titled “Headers”Seconds to wait before retrying.