In April, Twilio announced a requirement that looked trivial. Starting June 30, 2026, every new SMS campaign would need two extra links at registration time: a link to the business's privacy policy and a link to its terms and conditions. That gave us 12 weeks, which seemed like plenty for two form fields.
On the backend, that meant two more parameters on a Twilio call we already made. On the frontend, two more inputs on the onboarding form. The code to send them was six lines:
def policy_url_args
args = {}
args[:privacy_policy_url] = privacy_policy_url if privacy_policy_url.present?
args[:terms_and_conditions_url] = terms_url if terms_url.present?
args
end
It turned out to be the smallest part of the project. Instead of asking practices for two links, we wrote and hosted the pages for them. Since June 30, 190 of 193 new practices have used our pages, and none of their campaigns have been rejected. The rest of this post is about why we did it, and how we fit it into 12 weeks.
Why a text message needs a privacy policy
Practices use NexHealth to send over 24 million text messages a month to their patients: appointment reminders, confirmations, recall notices, review requests, and two-way conversations. Those texts go out from the practice's own phone number, which NexHealth sets up and manages for them. In the US, business texting from a regular 10-digit number runs under a carrier program called A2P 10DLC (application-to-person, 10-digit long code).
Under A2P 10DLC, carriers want to know who is sending and what they are sending before they deliver it. Every practice we onboard gets registered as a brand (the business, verified against its tax ID), and each kind of messaging the practice does is registered as a campaign under that brand. Twilio passes those registrations on to the carriers, who review them and decide whether a practice's messages get delivered or filtered.
![flowchart LR subgraph PR[Practice] P[Completes<br/>onboarding] end subgraph NH[NexHealth] N[Registers brand<br/>and campaigns] end subgraph TW[Twilio] T[Submits<br/>registration] end subgraph CR[Carriers] direction TB C[Review and<br/>approve] --> D[Patient texts<br/>get delivered] end P --> N --> T --> C classDef practice fill:#FDE7C2,stroke:#B26A00,color:#1F2937 classDef nexhealth fill:#CFEDEA,stroke:#0F766E,color:#1F2937 classDef twilio fill:#FAD4D4,stroke:#C22E32,color:#1F2937 classDef carrier fill:#E2E8F0,stroke:#475569,color:#1F2937 class P practice class N nexhealth class T twilio class C,D carrier style PR fill:#FFF8EC,stroke:#B26A00 style NH fill:#F0FAF9,stroke:#0F766E style TW fill:#FEF2F2,stroke:#C22E32 style CR fill:#F8FAFC,stroke:#475569](https://cdn.prod.website-files.com/62fb498ac6d6005848af0f22/6b0f99a91efa3c02689d217e_4a105277.png)
The practice never talks to Twilio or the carriers directly. We handle the registration for them during onboarding. But the practice is the brand on that registration, so the policy links have to be the practice's, not NexHealth's. As a result, when carriers add a requirement to campaign registration, NexHealth has to collect it from every practice.
Carriers are specific about what they want in those two documents. The privacy policy needs to say that mobile opt-in data is not shared with or sold to third parties. Twilio calls a missing statement "a major source of 10DLC rejection."
The terms need to:
- Name the messaging program.
- Describe what kinds of messages patients will get and how often.
- Include the familiar "Message and data rates may apply."
- Explain how to opt out (STOP) and get help (HELP).
Then we looked at our customers
Before building the two inputs, we checked what practices would actually paste into them. We had never collected policy links during onboarding, so there was no data to start from. Instead, we pulled up about 10 of our practices' websites. None of them had a privacy policy or a terms page.
That makes sense once you remember who our customers are. A software company registering for SMS usually already has these pages, often generated by an off-the-shelf tool. A dental practice doesn't. To get one, the office manager would have to ask whoever built their website to add one, pay a lawyer to draft one, or copy a page from another practice's site and hope it covers texting. If we added the two fields and stopped there, that's the process we'd be handing them.
If we did nothing, campaigns already registered before June 30 would be fine, since the rule only applied to new campaigns. But every new practice after June 30, about 40 a month, couldn't start texting its patients until it had both pages. The same went for any existing practice adding a new campaign.
The easy option
The easy version of this project would have looked like this:
- Add the two fields to the form and make them required.
- Write a help article explaining what carriers expect in each document.
- Pass whatever the practice enters to Twilio.
That would have filled in Twilio's two new fields, and it would have shipped in a sprint. But every hour of work we saved would have been spent by every practice that uses NexHealth instead. The page an office manager found or wrote would likely miss the carrier language, and they'd only find out when the campaign was rejected, well after they submitted it. Then they'd have to do it all over again.
Office managers are not experts in carrier compliance, and they shouldn't need to be. Practices rely on NexHealth to get their messages to patients, so handling the carrier rules that come with sending those messages is our job, not theirs.
Making the call
Publishing legal pages in a practice's name wasn't something engineering could decide on its own. In week 2, we wrote up both options in a short decision doc and took it to leadership and Legal: require practices to bring their own links, or generate policy pages for them. Engineering estimated about three weeks for the second option, which still left room for legal review and testing before June 30.
Most of the discussion happened in comments on that doc over a few days. One of our engineers suggested cutting the plan down further: no editing of our template at all. A practice either uses our page as written, or links its own. That cut a lot of work, and product and leadership signed off on April 21, at the start of week 3. Legal started reviewing the template wording the same week.
Fitting it into 12 weeks
Dropping template editing was the biggest cut, and without it we wouldn't have made June 30. We also skipped a separate domain. Hosting the pages on their own subdomain was about two more weeks plus a new deployment, so we served them from app.nexhealth.com, which already runs our patient-facing pages.
After the decision, the milestones looked like this:
Twilio sent guidance on both templates, and we revised each one within a day. The new flow turned on for everyone on June 23, a week early, and the last fixes landed June 29.
What we built
Templates written with Legal. We worked with Legal on a model privacy policy and a terms and conditions document that cover the carrier requirements above. Each practice gets its own copy at a stable URL on a NexHealth domain, rendered with the practice's name, e.g. /legal/{practice}/privacy and /legal/{practice}/terms.
Templates are the default. On the onboarding form and on the SMS registration page, each document gets a simple choice: use NexHealth's, or provide your own. Our template is preselected, and a Preview button shows the practice exactly what will be published in their name. A practice that already has compliant pages can paste in its own links instead, for either document.
![flowchart TD F[Onboarding form] --> Q{Privacy policy<br/>and terms} Q -->|default| A[Use NexHealth template<br/>preview, then agree] Q -->|optional| B[Paste own URL] A --> R[Record agreement<br/>and publish practice page] R --> S[Register campaigns<br/>with both URLs] B --> S S --> T[Twilio and carriers review]](https://cdn.prod.website-files.com/62fb498ac6d6005848af0f22/6b0f99a91efa3c02689d2182_d86fddd6.png)
Recording who agreed to what
A privacy policy is a legal document published in the practice's name. We wrote the template, but the practice is the one adopting it. It still has to agree to it, and we need to show exactly what it agreed to.
When a practice chooses our template, we store an acknowledgement record rather than flipping a boolean:
A boolean can tell you that someone agreed. It can't tell you which version, when, or who. Each record points at the practice and at the registration it was agreed for. If a registration is removed or replaced, its agreements stay. They're only deleted if the practice's account is.
We also didn't backfill anything, so no practice got documents it hadn't seen.
How the pages are served
Each template version is its own file in our codebase, and we never edit one in place. A wording change means a new version file. When someone opens a practice's link, we find its registration from the URL, and if the practice hasn't agreed to the template, the page returns a 404. Otherwise we render the latest version it agreed to, with its name, contact email, website, and state. So if we ship a v2 of the template, practices who agreed to v1 keep seeing v1 until they accept the new one.
The URLs also have to be permanent, because carriers keep the links a campaign was registered with. Practices can rename their NexHealth subdomain, which changes the URL, so we also look up the page by the exact URL we sent to Twilio. That way old links still work after a rename.
What this costs us
Once we register on a practice's behalf, every quirk in how a practice presents itself is ours to handle. For example, when a practice's name differs from its legal entity, we register it as "Legal Name DBA Practice Name" so reviewers can connect the two.
What went wrong
A few weeks after launch, while removing the feature flag, we changed the form to save the practice's agreement before creating its brand registration. That felt like the safer order for compliance. But an agreement has to point at the registration it was given for, since that's where the policy links live, and a practice registering for the first time didn't have one yet. The form waited for the agreement to save before sending the registration. Saving the agreement failed, preventing the practice from completing SMS registration. Practices resubmitting an existing registration weren't affected. Our error monitoring caught it, and because we deploy throughout the day, we shipped a fix within a couple of hours. Only one practice's onboarding was held up.
The ordering rule comes from two tables:
Saving an agreement does two things: it adds a row pointing at the registration, and it sets a2p_policies_acknowledged_at on that registration. Both need the registration to exist first.
![flowchart LR none["No registration yet"] registered["Registration saved<br/>Policy links stored<br/>Pages return 404"] agreed["Agreement saved<br/>Agreed-at time set<br/>Pages load"] rejected["Agreement rejected<br/>Nothing to point at"] none -->|"1. Create registration"| registered registered -->|"2. Save agreement"| agreed none -.->|"Save agreement first"| rejected classDef ok fill:#e8f5e9,stroke:#2e7d32,color:#000 classDef bad fill:#fdecea,stroke:#c62828,color:#000 class none,registered,agreed ok class rejected bad](https://cdn.prod.website-files.com/62fb498ac6d6005848af0f22/6b0f99a91efa3c02689d2185_6c064897.png)
There were three ways to fix it. Letting an agreement save without a registration and linking it later would have weakened the record, since an agreement could end up on the wrong registration or on none. Creating the registration and the agreement in one backend request was the cleanest option, but it meant a new endpoint and changes to both registration forms while a practice was waiting. So we went back to the original order, and the data model didn't change.
Registration first leaves a short gap where a registration exists before its agreement. Because the public page checks a2p_policies_acknowledged_at, the practice's policy pages return a 404 during that gap, so nothing is published in its name early. If saving the agreement fails, the registration still goes through, the pages stay at 404, and the error shows up in our monitoring.
Results
Since the requirement took effect on June 30, 193 new practices have registered for texting through the new flow:
- 190 chose our templates for both documents. One used our privacy policy with its own terms, and two used their own pages for both.
- All 317 campaigns registered for them are approved. In the first half of 2026, before the rule, about 1.5% of campaigns (9 of 617) failed review, so the new policy step didn't add rejections.
- 181 already have an approved campaign and are texting their patients. Most of the other 12 are stuck earlier, at brand verification, usually because the legal name or tax ID didn't match.
- Support has had two tickets that mention privacy policies, terms, or A2P since launch.
Only three practices brought their own pages, which matches what we saw on those 10 websites.
What we'd tell another team
When you register on your customers' behalf, their compliance paperwork is part of your product. We learned that in 2023, when carriers began rejecting campaigns over opt-in wording and we rewrote that copy for practices instead of asking each of them to fix their own. And if you publish something in a customer's name, store what they agreed to as a versioned record. That's what lets us improve the template later without changing anything a practice already agreed to.
The best compliance work is the kind practices barely notice. They click through onboarding, reminders get sent on time, and they get back to what they do best: taking care of patients.
If you want to help build software that makes healthcare professionals' lives easier, take a look at our careers page.
.avif)


.svg.avif)


