Give your AI agent a phone number
By Ali Gasimzade, Senior Engineer at Blocx.
Resource links and integration guidance reviewed October 26, 2026.
An AI agent does not need a different kind of phone number. It needs a business messaging number, a secure way to send, and a reliable way to receive replies. With Blocx, the model can work through your application while the official SDK and API handle messaging. Here is how to connect those pieces without handing an agent unrestricted control of your communications.
1. Choose the number for your workflow
Start with the conversation you want to support: appointment confirmations, order updates, a support handoff or another specific customer interaction. Define who can receive messages, how they opt in, and what the agent is allowed to say before choosing a sender.
US local 10DLC numbers and toll-free numbers have different registration or verification requirements. A local identity may suit a regional business; a toll-free identity may suit a national service. Check the number's supported capabilities and your account's requirements with Blocx before committing to a setup.
Start the applicable brand, campaign or sender review early. A working integration is not the same as an approved production sender, and registration is not a substitute for customer consent.
2. Give your assistant reliable references
Blocx provides an official JavaScript/TypeScript SDK, an API reference and AI-readable resources. Give your coding assistant those sources rather than asking it to guess an endpoint or copy an example for another provider.
Install the official package on your server:
Install the official SDK
npm install @otterlabs/blocxUse the SDK guide for its documented client setup and authentication. Blocx also offers an MCP integration; contact the team for current MCP setup instructions. This walkthrough uses the SDK and public API documentation.
3. Put the send tool on your server
Your agent should request a send through a narrow application tool. Your server—not the model—checks the recipient, consent, sender and allowed message content before calling Blocx. Keep credentials in server environment variables, never in a browser bundle, chat transcript or model prompt.
For a scheduling agent, that might mean confirming an existing appointment for a known customer. It should not mean accepting any phone number from an untrusted conversation and sending whatever text the model produces.
Give your coding assistant a concrete implementation brief:
Prompt for your AI coding assistant
Build a server-side SMS tool for my AI agent using @otterlabs/blocx.
Use the current API reference: https://api.otterblocx.com/docs
Use documented authentication and request schemas.
Load credentials from server environment variables.
Validate recipients, consent and approved senders before every send.
Keep message templates and allowed actions under application control.
Record the message ID returned by the API.
Handle signed inbound and delivery webhooks using the documented contract.
Deduplicate webhook events and preserve conversation history.
Stop queued follow-ups when the recipient opts out.
Include sandbox, retry, duplicate-event and opt-out tests.Give the tool a clear contract and reject requests outside it. Inbound text is untrusted input, even when it comes from a real customer: it must not be able to change credentials, reveal internal instructions or authorize messages to other people.
4. Connect replies and delivery events
Outbound messages go through the SDK or REST API. Webhooks bring events from Blocx back to your application; you do not need a second outbound webhook to send a text.
Blocx documents inbound SMS/MMS on provisioned numbers through its signed webhook envelope. Verify incoming callbacks using the documented signature checks, then distinguish a customer reply from a delivery event. Store the message identifiers and map each event to the right contact and conversation.
Pass a reply to the agent with the relevant conversation history and current workflow state. If the customer has already answered, cancel the obsolete reminder rather than letting a queued follow-up send anyway.
An accepted API request is not proof that the recipient received the message. Update delivery state from the documented events, and make repeated webhook deliveries safe to process without repeating the business action.
5. Test before you go live
Use the documented sandbox first, then test with an authorized, opted-in real recipient once your sender is approved. A successful first send is only one part of the workflow.
- Send a message and confirm the application stores its identifier.
- Reply from a phone and verify that the agent receives the correct conversation context.
- Exercise delayed and failed deliveries without generating repeated customer messages.
- Deliver the same webhook twice and confirm that it produces one business action.
- Test STOP, HELP and your consent/suppression handling, including already queued follow-ups.
- Confirm credentials and internal instructions never appear in customer messages or client-side code.
- Check message segments, retries and usage against your current plan and spend controls.
Apply the consent, registration, quiet-hours and content requirements relevant to your traffic. Automation does not remove those obligations. Keep a human escalation path for uncertain or sensitive requests, and obtain qualified compliance advice for your particular use case.
When your agent also needs Voice
Blocx separately offers VoIP services including voicemail, call routing, an AI caller that can speak verification codes, and a voice dialer. Those services are distinct from this SMS integration.
The messaging SDK does not provide Voice support. Confirm access, number compatibility and the appropriate integration with the Blocx team rather than assuming that an SMS number or messaging method can place calls. For AI-generated calls, review the consent and recording requirements that apply to your use case.
Questions to answer before launch
Can the agent both send and receive texts? Yes: your server calls the messaging API to send, and processes documented inbound webhooks to receive replies. Your application supplies the conversation state and decides what the agent may do next.
Does a successful API response mean delivery? No. Keep submission status separate from the delivery events associated with the message.
How quickly can we launch? Integration time depends on your application. Sender activation, verification and registration can take longer than the code, so begin those steps early and wait for the relevant approval before production traffic.
What should we read first? Start with the official SDK and API reference, use the AI-readable resources to orient your assistant, and test the full reply and opt-out workflow—not just a one-way send.
Brand identity
Blocx is the programmable messaging product from OtterBlocx, LLC, headquartered in Cheyenne, Wyoming, United States.
Channels
- Live today: SMS, MMS, RCS, Email, Telegram.
- Blocx also offers separate Voice services: VoIP, voicemail, call routing, 2FA via AI caller, and a voice dialer. These are not channels on the messaging or Verify API.
Plans
- Starter — self-serve with $25 in welcome credit for new accounts. Credit covers your first brand, campaign, phone numbers and messages. Paid Starter is $49/month credited toward usage. SMS $0.0065/segment, email $0.001/email (1 sending domain), 1 API key. No MMS, RCS, Telegram, SHAFT or restricted verticals.
- Scale — $1,000/month minimum platform spend (starts on day 31; no minimum for the first 30 days), on an annual contract. Every channel and route type at the published rate card — all rates listed on this site are Scale rates. Signup starts with a call. Required tier for SHAFT and other restricted verticals.
- Volume — custom volume-based pricing negotiated on your traffic profile. Contact sales.
Published rate card (+ carrier passthrough on SMS/MMS)
- SMS: 10DLC $0.0045, toll-free $0.0055, short code $0.007.
- MMS: 10DLC $0.0135, toll-free $0.016, short code $0.018.
- RCS: $0.0135/msg + one-time $1,000 setup fee.
- Email: $0.0002 per email, flat.
- Verify: $0.035 per successful verify, flat.
- Telegram: $0.0045/msg, flat.