Agentic Solutions
Back to Free Resources

Twilio: Texting From Your App

What it does

Twilio gives your app a phone number that can send and receive texts. Your app can text a drywall sub that the Miller job is dried out and ready Thursday, and when he texts back, the reply lands in that job's history instead of on one person's phone.

What it costs

  • Free trial: no card, 30 days, 100 free texts. But it can only text up to 5 numbers you've verified, using Twilio's pre-written templates, not your own words. Kicking the tires only.
  • Paying (US): $0.0083 per text segment, sent or received, plus a carrier fee per text ($0.0035 to $0.005 depending on carrier). A local number is $1.15 a month.
  • Business texting registration (A2P 10DLC):
    • Sole Proprietor (no EIN): $4 brand fee + $15 campaign vetting once, then $2 a month for the campaign.
    • Low-Volume Standard brand (most small LLCs): $4 brand fee + $15 campaign vetting, then $1.50 to $10 a month for the campaign.
    • Standard brand: $44 brand fee + $15 campaign vetting, then $1.50 to $10 a month for the campaign.
  • You have to upgrade to register, so plan on paid from day one.

A 10-minute setup (plus a wait you can't skip)

Where your keys go. Every service here gives you secret keys. Keep them in exactly two places: your password manager, and your app's settings.

  • If an AI agent with its own cloud computer builds for you (like Grok Bot): paste each key into the agent's secret card or Secrets section, never into the chat. Saved values can't be read back, so keep your own copy.
  • If you build in a folder on your own computer: put keys in a .env.local file, and make sure .gitignore lists .env* before your first save.
  • On Vercel: add the same keys under Settings, Environment Variables, then redeploy.

Never put a key in a screenshot, an email, or browser code. Anything starting with NEXT_PUBLIC_ is readable by anyone.

  1. Sign up at twilio.com, verify your cell, and upgrade to a paid account with a small balance.
  2. Buy a local number with SMS turned on.
  3. Copy your Account SID, Auth Token, and number (like +15551234567) into your settings.
  4. Start A2P 10DLC registration in the Console: Trust Hub, Registrations, or search the Console for "A2P 10DLC."
  5. Wait. Twilio's 10DLC page estimates under a week for campaign approval; its onboarding guide says campaign reviews are currently taking 10 to 15 days. Start this first and build email while you wait.

Common mistakes and gotchas

  • Texting without registering. US carriers require it for business texting from a local number. Unregistered texts face more filtering and extra carrier fees.

  • Text only people who agreed to it. Subs, homeowners, and adjusters all need to have said yes, and STOP has to work.

  • Sole Proprietor is small: one campaign, and Twilio lists 1,000 segments a day to T-Mobile. Have an EIN? Look at Low-Volume Standard.

  • Check that incoming texts really came from Twilio (the X-Twilio-Signature check).

  • Long texts cost more. A long message bills as several segments.

Where it fits in your build

Start Twilio registration early, because approval takes days to weeks. Build and test email while you wait. After approval, send a test to your own phone, then (once the app is live) point the number's incoming message webhook at your live address and check that a reply lands in the job's history.

Sources

Last checked: October 7, 2026

Read the full guide


Full article

Why texting is worth the trouble in this business

Your subs live on their phones. A text that says "Mitigation signed off at 412 Oak, drywall can start Thursday, reply YES to confirm" gets read. The problem today is that those texts live on one PM's phone, so when someone asks "did we tell the painter about the change order?" nobody can check. Texting through your app puts every message in the job's history, where anyone in the office can see it.

What it costs, in more detail

  • Per text: $0.0083 per segment each way. A short text is one segment. Longer texts split into more segments, and each one is billed.
  • Carrier fees: on top of Twilio's price, each US carrier adds its own fee. Twilio lists AT&T at $0.0035, T-Mobile at $0.0045, and Verizon at $0.005 per outbound text.
  • Number: $1.15 a month for a local number, $2.15 for toll-free.
  • Failed messages: $0.001 each.
  • Registration: see the summary. Twilio's own pages disagree on the brand fee ($4 on one page, $4.50 on another). Budget for the higher number.

A rough example, as math only: 300 texts a month, all one segment, about $0.0083 + $0.005 each (worst-case carrier fee) is about $4, plus $1.15 for the number, plus the monthly campaign fee. Your real bill depends on your volume and carriers.

The full setup, step by step

Day 1, 30 minutes:

  1. Sign up at twilio.com. Verify your email and your own cell number.
  2. Upgrade to a paid account and add a small balance. You can't register for business texting on a trial.
  3. Buy a number. Phone Numbers, Buy a number. Pick a local area code your subs and customers will recognize. Make sure the SMS box is checked.
  4. Copy three values into your settings:
    TWILIO_ACCOUNT_SID=
    TWILIO_AUTH_TOKEN=
    TWILIO_PHONE_NUMBER=
    
    The SID and token are on the Console home page. The number goes in with +1 in front, no dashes or spaces.
  5. Start A2P 10DLC registration. Go to Trust Hub, Registrations in the Console, or search the Console for "A2P 10DLC." You'll set up:
    • A Brand (who's sending). No EIN: Sole Proprietor. Have an EIN: Low-Volume Standard is usually the fit for a single shop.
    • A Campaign (what you send and why). Describe it plainly: "Job scheduling and status updates to subcontractors and customers of [Your Company], a water, fire, and mold restoration contractor." Explain how people agree to get texts (for example, subs agree on their onboarding paperwork; homeowners agree on the work authorization), and give sample messages that include "Reply STOP to opt out."
  6. Connect the number to the campaign when Twilio asks.

Then wait. Twilio's estimates range from under a week to two or three weeks. Build and test your email features in the meantime.

After approval:

  1. Send yourself a test from the app, to your own phone.
  2. After your app is live, set the number's incoming message webhook to your app's live address: on the Console's Numbers page, click the number, find the Messaging section and A message comes in, choose Webhook, and paste the address. Then text the number from your phone and confirm the reply shows up in the job's history.

More gotchas worth knowing

  • Be specific in your campaign. Say exactly who you text and how they agreed to it. Your business website gets checked too: it has to load, match your business name, and not need a login to view. If people sign up for texts on your website, it also needs a terms page and a privacy policy that says you won't share their mobile numbers. Read the campaign form's instructions before you submit.

  • Consent is your job, not Twilio's. Write down how each sub and customer agreed, and honor STOP right away.

  • Homeowners are a different audience than subs. If you'll text homeowners about equipment pickup or rebuild dates, say so in your campaign description.

  • The account itself can be the problem. If everything looks set up right and texts still fail, check the account's compliance status in the Console before blaming your app.

  • Check the signature on incoming texts. Your incoming text endpoint is open to the internet and uses an all-access database key. Twilio signs every request with X-Twilio-Signature. Ask your AI coding assistant to verify it with Twilio's official library and reject anything that fails.

  • Toll-free numbers have their own verification. They can't text US and Canadian numbers until verified. Verification is free to complete.

The order that saves the most trouble

  1. Day 1: upgrade the account, buy a local number, start A2P 10DLC registration.
  2. While you wait: build email and the screens that show message history.
  3. After approval: test sending to your own phone.
  4. After the app is live: set the incoming webhook and verify X-Twilio-Signature.
  5. Every year: keep the registration and your consent records current.

Back to Free Resources