chat

Get or create the chat with an assigned patient

Operator-side get-or-create of the chat with one of their assigned patients (patient_id). Idempotent: returns the existing chat if present.

post/api/chat/chats/get-or-create

Query parameters

patient_idstring uuid required

Patient UUID (an assigned patient of the operator)

Patient UUID (an assigned patient of the operator)

Response

Successful Response

idstring nullable

Chat UUID (null for a not-yet-created chat)

patient_idstring required

Patient UUID

operator_idstring required

Operator UUID

professionstring required

Operator profession: 'PSICOLOGO' or 'NUTRIZIONISTA'

statusstring nullable

Chat status: 'active', 'archived', 'closed'

last_message_atstring date-time nullable

Last message timestamp

created_atstring date-time nullable

Chat creation timestamp

updated_atstring date-time nullable

Chat last update timestamp

operator_first_namestring nullable

Operator first name

operator_last_namestring nullable

Operator last name

patient_first_namestring nullable

Patient first name

patient_last_namestring nullable

Patient last name

Example response

{
  "created_at": "2025-01-15T08:00:00Z",
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "last_message_at": "2025-01-20T10:00:00Z",
  "operator_first_name": "Mario",
  "operator_id": "operator-uuid",
  "operator_last_name": "Rossi",
  "patient_first_name": "Luigi",
  "patient_id": "patient-uuid",
  "patient_last_name": "Verdi",
  "profession": "PSICOLOGO",
  "status": "active",
  "updated_at": "2025-01-20T10:00:00Z"
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.