CLI First
Prerequisites
Provisioning a number requires a completed LLC formation and the company’s EIN — numbers are carrier-registered against your business entity, and the EIN is required for the carrier (10DLC) brand registration. The full chain is:Form the company
naive formation submit — form the LLC (Surge registers the number against this business).The EIN is required the first time you provision (it registers the carrier brand). Provide it as 9 digits, with or without the hyphen (e.g.
12-3456789).How SMS gating works
| Capability | When it works |
|---|---|
| Voice | Out of scope for this primitive |
| Inbound SMS | Immediately on provisioning — no carrier gate |
| Outbound SMS | After the 10DLC campaign is approved (auto, ~1-2 business days) |
naive phone send before the campaign is approved returns compliance_pending — no message is sent and no credit is charged. The campaign auto-activates via a Surge webhook; check progress with naive phone status.
Provisioning a number
202):
Sending SMS
Receiving SMS
Inbound texts are captured automatically (Surgemessage.received webhook) and stored against the receiving number. List and read them:
sms.received webhook event to react in real time.
Agent assignment
Like cards and email, a phone number is a company resource that agents connect to with permissions (send_sms, receive_sms):
send_sms on a number is refused with forbidden when it tries to send.
Campaign statuses
| Status | Meaning |
|---|---|
created | Campaign submitted, not yet in review |
in_review | Under carrier review |
active | Approved — outbound SMS unlocked |
rejected | Carrier rejected the campaign (contact support) |
Releasing a number
Release a number back to the provider when you no longer need it — this is permanent and stops further rental billing:JavaScript
Pricing
| Action | Credits |
|---|---|
| Provision your first number (one-time carrier registration + first month) | ~44 |
| Provision an additional number (first month) | ~4 |
| Monthly number rental (recurring, per number) | ~4 |
| Outbound SMS (per 160-char segment) | ~0.04 |
| Inbound SMS | Free |
Approval gating: provisioning a number is approval-gated by default (it spends credits and registers a carrier campaign) and can be toggled per Account Kit. Sending SMS is not approval-gated — it’s a routine action like sending email.
Error handling
| Error | Cause | Recovery |
|---|---|---|
invalid_input (no formation) | No completed LLC formation for this user | Run naive formation submit first |
invalid_input (EIN required) | No EIN provided on the first provision | Pass --ein <ein> (9 digits) |
compliance_pending | Outbound SMS attempted before campaign approval | Wait for approval (auto) — retry after naive phone status shows active |
forbidden | Agent lacks send_sms on the number | Assign the agent with naive phone assign |
feature_not_configured | Phone provider not enabled on this environment | Contact support / set SURGE_ENABLED |
resource_not_found | Phone/message id doesn’t exist or belongs to another user | Use naive phone list for valid ids |