American Hospital DubaiMedricsAI integration handbook

API contract

A deliberately small, versioned interface that Sprinklr can validate and map without exposing any OpenAI credential.

Sprinklr
Medrics
OpenAI
Handoff

Production request

POSThttps://api.ahd.ai.medrics.net/v1/ahd/chat

Send JSON over HTTPS with the Medrics-issued bearer token. The current message and conversation history are required. The channel and locale fields are optional.

Request body

{
  "message": "What services does AHD cardiology provide?",
  "conversation_history": [
    { "role": "user", "content": "I need heart care information." },
    { "role": "assistant", "content": "I can help with general AHD information." }
  ],
  "channel": "whatsapp",
  "locale": "en-AE"
}

Response body

{
  "answer": "AHD Cardiology provides assessment and care for heart and vascular conditions...",
  "handoff": false
}

When handoff is false and answer is non-empty, the AHD channel displays only answer. It must never render the complete response object. When handoff is true, the dialogue tree routes to the configured human queue and does not display answer.

Channel-ready answer

The gateway parses the Responses API output text and does not forward its separate file-citation annotations. Live samples show phone numbers and email addresses already in the approved display format, so they remain unchanged. The observed bare AHD website address receives only an HTTPS prefix. Content policy remains controlled by the versioned AHD application policy.

Monitoring

OpenAI abuse monitoring is enabled for this project.

Status behavior

StatusMeaningSprinklr action
200Answer or intentional handoffRead both response fields
400Invalid request bodyLog request ID and use fallback
401Missing or invalid tokenStop calls and contact Medrics
413 / 415Payload or media type rejectedCorrect the API node configuration
502 / 503 / 504Gateway or upstream unavailableTransfer to human support
Continue to platform setup