crm-notifications

Schedule a CRM notification

Changed on

Stores a push notification for a group of patients, sent at scheduled_at by the per-minute scheduler (a time already past sends it at the next run). Filter audiences are resolved when it goes out.

post/api/notification-campaigns

Request

  • Base URL: https://api.corabea.it (the document declares no server; this is the origin it was published from)
  • URL: https://api.corabea.it/api/notification-campaigns
  • Auth: HTTP bearer

Request body

patient_statesstring[]

Stato paziente filters, the same values as the CRM emails.

registration_reasonsstring[]

Motivo iscrizione filters (users.registration_reason).

filter_match'any' | 'all'

How stato and motivo filters combine: 'any' (OR, default) or 'all' (AND).

recipient_emailsstring[]

Explicit recipient email addresses (e.g. an uploaded CSV); addresses with no account are skipped.

user_idsstring[]

Explicit patient user ids (e.g. the filtered CRM patient list).

scheduled_atstring date-time required

When to send the notification (timezone-aware).

titlestring required

Notification title.

bodystring required

Notification text.

notesstring nullable

Internal note on why the notification is sent; shown in the CRM only.

Response

Successful Response

idstring required

Campaign UUID.

statusstring required

scheduled | sending | sent | failed | cancelled.

scheduled_atstring date-time nullable

When it is, or was, scheduled to go out.

titlestring required

Notification title.

bodystring required

Notification text.

notesstring nullable

Internal note; CRM-only.

audience_typestring required

'filters', 'csv' or 'users'.

audience_sizeinteger nullable

Addresses (csv) or patients (users) in an explicit audience; null for filters.

resolved_countinteger nullable

Patients in the audience when it was sent.

reached_countinteger nullable

Patients reached on at least one device.

unreached_countinteger nullable

Patients not reached.

sent_atstring date-time nullable

When the send finished.

errorstring nullable

Failure reason, if the send failed.

created_by_namestring nullable

Who created it, when known.

created_atstring date-time required

When it was created.

patient_statesstring[]

Stato filters (filters only).

registration_reasonsstring[]

Motivo filters (filters only).

filter_match'any' | 'all'

How stato/motivo filters combine.

recipient_emailsstring[]

Uploaded addresses (csv only).

user_idsstring[]

Selected patient user ids (users only).

Changes