Drip campaign settings
Change one setting of a drip campaign at a time, and read how it is doing. The settings calls need the send_sms permission and refuse test keys (403 test_key_not_allowed). An id that isn’t a whole number answers 400 invalid_id, and one that isn’t a drip campaign on your account answers 404 DRIP_NOT_FOUND.
#Rename a drip campaign
Changes the drip’s name. Returns {"success": true}.
Parameters
idinteger, pathRequired- The drip campaign id.
namestringRequired- The new name, up to 120 characters. Spaces around it are trimmed.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | No name, a blank one, or one over 120 characters. |
| 500 | DRIP_RENAME_WRITE_FAILED | It wasn’t renamed. Try again. |
#Set a drip’s sending hours
Sets the hours and days the drip may text, and its time zone. Send only what you change: a field you leave out keeps its saved value, and one you send as null or "" is cleared. Send all four as null to clear the window. With no window the drip texts at any hour quiet hours allow. A text that comes due outside the window waits for the next opening. Returns the saved values in data.
Parameters
idinteger, pathRequired- The drip campaign id.
delivery_window_startstring- 24 hour time like
08:30. delivery_window_endstring- 24 hour time like
17:00, later than the start. delivery_window_daysstring- Comma separated days from
mon,tue,wed,thu,fri,sat,sun. Other words are dropped. timezonestring- An IANA name such as
America/Los_Angeles. Cleared or never set, the drip usesAmerica/New_York. This zone also reads astart_atwith no zone when you add contacts.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_field | A time that isn’t like 08:30, or a zone name that isn’t shaped like one. |
| 400 | DRIP_WINDOW_ORDER | The end is the same as the start, or before it. Windows that run overnight aren’t supported. |
| 400 | DRIP_TIMEZONE_INVALID | A zone we don’t know, such as Pacific Time or PDT. |
| 500 | DRIP_WINDOW_SAVE_FAILED | Nothing was changed. Try again. |
#Turn Smart Scheduling on or off
Smart Scheduling moves each step after the first toward the hour the contact usually replies, up to 12 hours later. Returns {"success": true}.
Parameters
idinteger, pathRequired- The drip campaign id.
enabledbooleanRequiredtrueorfalse."false"and0also mean off.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | BAD_SHAPE | enabled is missing or isn’t on or off. |
| 500 | DRIP_SMART_SEND_SAVE_FAILED | Nothing was changed. Try again. |
#Set a drip’s sending number
Picks the number the drip texts from: one of your numbers, several of them, or neither (Automatic), so your account picks as it does for any text. A number that has since stopped working is passed over at send time, never a reason to drop a text. Returns the saved phone_number_id and from_phone_ids in data.
Parameters
idinteger, pathRequired- The drip campaign id.
phone_number_idinteger- The id of one of your numbers that can send.
from_phone_idsinteger[]- Or several of your number ids to send from. These win over
phone_number_id, and only the ids that can send are kept. Send neither to go back to your account’s choice.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | DRIP_FROM_NUMBER_NOT_USABLE | The number isn’t yours or can’t send, or none of the numbers you picked can. Nothing was changed. |
| 500 | DRIP_FROM_NUMBER_SAVE_FAILED | Nothing was changed. Try again. |
#Drip campaign results
These calls only read. A team member limited to their assigned contacts sees only those contacts' rows in the logs and lists.
#Get results per step
For each step: texts sent, delivered and failed, how many contacts texted back before this drip’s next text to them, how many of those opted out, and how many contacts are waiting at it now. Returns one row per step in data.
Returns
data[]object[]step,sent,delivered,failed,replied,opted_out,waiting, anddelivery_rate: delivered out of delivered plus failed, as a percent, ornullbefore any result.delivery_ratenumber or null- The same for the whole drip.
partialbooleantrueon a very large drip whose reply counts took too long:repliedandopted_outread 0;sent,delivered,failedandwaitingare filled in.
Errors
| HTTP | Code | When |
|---|---|---|
| 500 | DRIP_STEP_STATS_LOAD_FAILED | We couldn’t read them. Try again. |
#List a drip’s sent texts
The texts this drip sent, newest first. Each row has id, direction, body, status, sent_at, created_at, the contact’s first_name, last_name and phone, and error_detail, a plain reason when it failed.
Parameters
idinteger, pathRequired- The drip campaign id.
limitinteger, queryDefault100- From 1 to 300. There is no paging: this is the newest texts only.
Errors
| HTTP | Code | When |
|---|---|---|
| 500 | DRIP_ACTIVITY_LOAD_FAILED | We couldn’t read them. Texts may still have gone out. |
#List who is scheduled on a day
The active contacts whose next step is due on one day, in the drip’s time zone (America/New_York when it has none), soonest first. Returns date, total, limit, offset and contacts (each contact_id, current_step, next_send_at, first_name, last_name, phone) in data.
Parameters
idinteger, pathRequired- The drip campaign id.
datestring, queryRequired- The day, like
2027-01-05. limitinteger, queryDefault100- From 1 to 500.
offsetinteger, queryDefault0- How many to skip.
Errors
| HTTP | Code | When |
|---|---|---|
| 400 | DATE_REQUIRED | No date, or not a real day. |
| 500 | DRIP_SCHEDULE_LOAD_FAILED | We couldn’t read it. Try again. |
#Get active contacts per rep
How many active contacts in the drip each team member is assigned, and the daily cap each is held to. Returns sequence (id, name, status, daily_cap, daily_cap_mode), cap_summary (a sentence) and assignees (each assignee_id, name, email, active_enrollments, daily_cap) in data. Unassigned contacts have assignee_id: null; a daily_cap of null is no cap.
Errors
| HTTP | Code | When |
|---|---|---|
| 500 | DRIP_BREAKDOWN_LOAD_FAILED | We couldn’t read it. Try again. |
#Get the schedule per rep
Sends due in the next 14 days, per assigned team member, busiest first. Each row has assigned_to (null for unassigned contacts), name, total and days, one {date, count} per day with sends.
Errors
| HTTP | Code | When |
|---|---|---|
| 500 | DRIP_SCHEDULE_LOAD_FAILED | We couldn’t read it. Try again. |
See also: the guide to doing this in the app.