The Campaign object
One message sent to many patients from a clinic phone number, with per-patient delivery.
Attributes
idUUIDRequiredUnique ID of the campaign.
namestringRequiredA name for staff, like “Flu shot reminders, October”. Patients never see it.
statusdraft, running, paused, completed, stoppedRequireddraft until started; completed once every recipient is sent; stopped if someone stopped it early.
channelsecure, smsRequiredHow recipients receive the message. Secure unless the campaign asks for SMS.
bodystringRequiredThe message every recipient gets.
phone_numberPhoneNumberRefRequiredThe clinic phone number a patient conversation is on.
Show child attributes
numberstringRequiredThe phone number.
teamstringRequiredThe team it belongs to.
senderCampaignSenderRequiredWho the campaign’s messages come from.
Show child attributes
idUUIDRequiredID of the admin or API key.
namestringRequiredThe admin’s name, or the API key’s name, like “Reminder service”.
kindstaff, api_keyRequiredWhether an org admin (through OAuth) or an API key created the campaign.
send_interval_secondsnumberRequiredSeconds between messages.
countsCampaignCountsRequiredProgress across the campaign’s recipients.
Show child attributes
recipientsintegerRequiredPatients on the campaign.
pendingintegerRequiredWaiting to be sent.
sentintegerRequiredSent, including delivered.
deliveredintegerRequiredConfirmed delivered or opened.
failedintegerRequiredFailed or undelivered.
skippedintegerRequiredNot sent: opted out, no contact method, or cancelled.
archivedbooleanRequiredWhether the campaign is archived.
created_attimestampRequiredWhen the campaign was created.
started_attimestamp or nullRequiredWhen it first started. Null for a draft.
finished_attimestamp or nullRequiredWhen it completed or was stopped. Null otherwise.
Endpoints
| Method | Path | Endpoint |
|---|---|---|
| GET | /campaigns | List campaigns |
| POST | /campaigns | Create a campaign |
| GET | /campaigns/{campaignId} | Retrieve a campaign |
| PATCH | /campaigns/{campaignId} | Update a campaign |
| DELETE | /campaigns/{campaignId} | Delete a campaign |
| GET | /campaigns/{campaignId}/recipients | List campaign recipients |
| POST | /campaigns/{campaignId}/recipients | Add campaign recipients |
| POST | /campaigns/{campaignId}/recipients/remove | Remove campaign recipients |
| POST | /campaigns/{campaignId}/start | Start a campaign |
| POST | /campaigns/{campaignId}/pause | Pause a campaign |
| POST | /campaigns/{campaignId}/stop | Stop a campaign |