Global Clinic ConnectGuides
Integration step 06

Errors, retries, and production readiness

Turn API responses into predictable retry, alerting, and support behavior.

OutcomeAn integration that fails safely and recovers without duplicate actions
Required scopesChoose scopes for the capabilities you implement
Step by step

Typical integration workflow

01

Separate request errors from service failures

Fix 400 validation problems, replace invalid credentials after 401, and request the missing scope after 403.

02

Respect business denials

Consent, suppression, policy, and file-type denials require a business correction rather than automatic retry.

03

Back off after rate limits

Wait until the next minute after 429 and add jitter when several workers may resume together.

04

Retry safely

Retry transient failures with bounded exponential backoff. For message sends, keep the same idempotency key for the same intended message.

05

Escalate with safe evidence

Record status, machine code, request time, endpoint, and returned resource IDs. Do not place API keys, patient content, or temporary upload fields in support tickets.

Production checklist

Best practices

  • Set connection and response timeouts.
  • Cap retry attempts.
  • Alert on sustained 401, 403, 429, and 5xx patterns separately.
  • Test with synthetic data before production.
Interactive console

Try a supported API

Requests go directly from this browser tab to the API environment you choose. Keys and responses are held in memory only and are cleared when the page closes.

Do not use real patient data in tests
POST/api/public/v1/messages
Response
Ready when you are

Enter a test key, review the sample request, and send it. The response will appear here.

Equivalent cURL example
curl -X POST 'https://api.connect.globalclinic.app/api/public/v1/messages' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  --data '{
  "to": "+15551230000",
  "type": "template",
  "kind": "transactional",
  "template": {
    "template_id": "appointment_confirmation",
    "variables": { "name": "Sample Patient", "time": "10:30 AM" }
  },
  "idempotency_key": "9ac86af7-43f5-4b5d-a1e2-2b57a0743324"
}'
Required scopemessages:send

Queue a WhatsApp text or approved template message for a recipient.

Next steps