DocumentationAPI v1
Browse documentation

Conversations & messages

Submit a request, retain its identity and inspect the work that follows.

Create a conversation

POST /v1/conversations requires converse scope and a live agent accessible to the credential. The response is 201 with the conversation identity and links. Replace the example UUID with your real agent ID.

curl -X POST "$MUWKL_BASE_URL/v1/conversations" \
  -H "Authorization: Bearer $MUWKL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $CREATE_REQUEST_ID" \
  -d '{
    "agent_id": "00000000-0000-4000-8000-000000000001",
    "subject": "Customer service enquiry",
    "language": "en"
  }'
FieldTypeMeaning
agent_idUUID · requiredLive agent to use
subjectstring · 1–200Nonblank conversation subject
language"en" | "ar"Defaults to en

Submit a message

POST a message to the returned conversation ID. Supply a stable client_message_id, body and language. The body is nonblank and at most 16,000 characters. Keep the same message identity when retrying the same input.

curl -X POST \
  "$MUWKL_BASE_URL/v1/conversations/$CONVERSATION_ID/messages" \
  -H "Authorization: Bearer $MUWKL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $MESSAGE_REQUEST_ID" \
  -d '{
    "client_message_id": "00000000-0000-4000-8000-000000000002",
    "body": "Can you help me with my request?",
    "language": "en"
  }'

Inspect turns and outcomes

Use the read credential to inspect the conversation’s turns. A turn can be admitted, sealed, finalized or abandoned. Inspect its output and operation state separately; do not map every state to a successful result.

curl \
  "$MUWKL_BASE_URL/v1/conversations/$CONVERSATION_ID/turns" \
  -H "Authorization: Bearer $MUWKL_API_KEY"
MethodPath
GET/v1/conversations/{id}
GET/v1/conversations/{id}/messages
GET/v1/conversations/{id}/turns
GET/v1/conversations/{id}/turns/{turn_id}
GET/v1/conversations/{id}/turns/{turn_id}/outputs
GET/v1/conversations/{id}/operations/{operation_id}

Handle unavailable capabilities explicitly

An environment may report a capability as unavailable when output, evidence, handoff or delivery is not configured. Preserve that state in your UI. For an operation in unknown state, reconcile the recorded result before attempting another action.