# Real phone numbers for testing, automation, and AI agents.

Build with real phone numbers and SMS APIs. Receive messages through webhooks, power AI agents and support workflows, and automate OTP tests with MailSlurp.

Build SMS into your applications with MailSlurp. Receive messages through APIs and webhooks, feed ingest pipelines, power AI agents and support conversations, or automate OTP tests.

Free account. Phone numbers require a paid plan and number rental.

[Create free account](https://app.mailslurp.com/sign-up/?onboardingRequest=phone\&returnTo=%2Fmobile%2Fsms%3FonboardingRequest%3Dphone) [Talk to sales](https://www.mailslurp.com/sales/schedule/)

![A mobile phone, SMS message bubble and programming terminal](https://www.mailslurp.com/_astro/messaging.BX3QJH2o_ZtxuuL.png)

Trusted by teams at

- ![Broadcom](https://www.mailslurp.com/assets/companies/broadcom.svg)
- ![Scraper](https://www.mailslurp.com/assets/companies/scraper.svg)
- ![Trivago](https://www.mailslurp.com/assets/companies/trivago.svg)
- ![Avast](https://www.mailslurp.com/assets/companies/avast.svg)
- ![Wolt](https://assets-cdn.mailslurp.com/image-variants/340/assets/companies/wolt.png?v=dc7fb842f641f940097f96e2be35ff279c5c6eff)
- ![Panasonic](https://www.mailslurp.com/assets/companies/panasonic.svg)

## Dedicated numbers for your team and test environments.

Choose dedicated SMS numbers across supported countries. Assign them to applications, AI agents, support workflows or test environments and keep incoming messages in one place.

Review number types, receiving and sending capabilities, availability and rental pricing in the app. Keep a number for an ongoing workflow, or use pools and locks to reserve one for a test.

![Dedicated SMS numbers across supported countries](https://www.mailslurp.com/_astro/mobile-networks.-2Bm3ONA_1BwHVp.png)

| Country                         | Calling code | Variants                     |
| ------------------------------- | ------------ | ---------------------------- |
| United States                   | US (+1)      | Local · Toll-free · Non-VoIP |
| United Kingdom                  | GB (+44)     | Mobile · Non-VoIP            |
| Australia                       | AU (+61)     | Mobile · Non-VoIP            |
| Canada                          | CA (+1)      | Local                        |
| Estonia                         | EE (+372)    | Mobile                       |
| Poland                          | PL (+48)     | Mobile                       |
| Netherlands                     | NL (+31)     | Mobile                       |
| Israel                          | IL (+972)    | Mobile                       |
| Finland                         | FI (+358)    | Mobile                       |
| Sweden                          | SE (+46)     | Mobile                       |
| Contact us about other regions. |              |                              |

Non-VoIP is an optional number filter. Types and availability vary by inventory and billing currency; check receiving and sending capabilities in the app.

[View pricing](https://app.mailslurp.com/pricing/)

## Build SMS into your applications.

Turn incoming SMS into an application event. Use webhooks to feed an ingest pipeline, trigger a background job or route a customer message to support. Read the sender, message body and history through the API.

Use the REST API or official SDKs for JavaScript, TypeScript, Python, Java, C#, PHP, Ruby and more. Add SMS to the language and test framework your team already uses.

[Read the SMS API docs](https://www.mailslurp.com/docs/txt-sms/)

[![Javascript](https://www.mailslurp.com/icons/javascript.svg)](https://www.mailslurp.com/docs/sdks/) [![Python](https://www.mailslurp.com/icons/python.svg)](https://www.mailslurp.com/docs/sdks/) [![CSharp](https://www.mailslurp.com/icons/csharp.svg)](https://www.mailslurp.com/docs/sdks/) [![Java](https://www.mailslurp.com/icons/java.svg)](https://www.mailslurp.com/docs/sdks/) [![Postman](https://www.mailslurp.com/icons/postman.svg)](https://www.mailslurp.com/docs/sdks/) [![PHP](https://www.mailslurp.com/icons/php.svg)](https://www.mailslurp.com/docs/sdks/) [![Ruby](https://www.mailslurp.com/icons/ruby.svg)](https://www.mailslurp.com/docs/sdks/) [![Playwright](https://www.mailslurp.com/icons/playwright.svg)](https://www.mailslurp.com/docs/sdks/) [![Selenium](https://assets-cdn.mailslurp.com/image-variants/340/assets/brands/icons/selenium.png?v=dc7fb842f641f940097f96e2be35ff279c5c6eff)](https://www.mailslurp.com/docs/sdks/)

[![Javascript](https://www.mailslurp.com/icons/javascript.svg)](https://www.mailslurp.com/docs/sdks/) [![Python](https://www.mailslurp.com/icons/python.svg)](https://www.mailslurp.com/docs/sdks/) [![CSharp](https://www.mailslurp.com/icons/csharp.svg)](https://www.mailslurp.com/docs/sdks/) [![Java](https://www.mailslurp.com/icons/java.svg)](https://www.mailslurp.com/docs/sdks/) [![Postman](https://www.mailslurp.com/icons/postman.svg)](https://www.mailslurp.com/docs/sdks/) [![PHP](https://www.mailslurp.com/icons/php.svg)](https://www.mailslurp.com/docs/sdks/) [![Ruby](https://www.mailslurp.com/icons/ruby.svg)](https://www.mailslurp.com/docs/sdks/) [![Playwright](https://www.mailslurp.com/icons/playwright.svg)](https://www.mailslurp.com/docs/sdks/) [![Selenium](https://assets-cdn.mailslurp.com/image-variants/340/assets/brands/icons/selenium.png?v=dc7fb842f641f940097f96e2be35ff279c5c6eff)](https://www.mailslurp.com/docs/sdks/)

Connect SMS to your application

```javascript
// create a webhook for a phone number to have new SMS sent to your server
const webhook = await mailslurp.webhookController.createWebhookForPhoneNumber({
  phoneNumberId: phoneNumber.id,
  createWebhookOptions: {
    eventName: CreateWebhookOptionsEventNameEnum.NEW_SMS,
    url: 'https://myserver.com',
    name: 'Process SMS'
  }
});
```

## Test the code that actually arrives.

Submit a MailSlurp number in your application, wait for its SMS and extract the one-time code. Enter it in the browser and check that your customer can complete verification.

Cover new-account verification, two-factor login and account recovery. Use built-in code extraction to find the OTP, with length and pattern options to match your application.

[Follow the SMS OTP guide](https://www.mailslurp.com/guides/test-sms-otp-mfa-using-playwright/)

app.example.com/verify

### Enter the one-time code

MailSlurp received the SMS OTP and your test can submit it automatically.

482913

The browser test fills this field with the code MailSlurp captured.

![Separate development, staging and production environments](https://www.mailslurp.com/_astro/envs.EOQF3L3J_IQRrz.png)

### Keep parallel tests separate

Reserve a number from a pool for each test run. Wait for messages received after your test starts, so an old code cannot satisfy a new check.

[Explore phone pools](https://www.mailslurp.com/docs/phone-pools/)

![Playwright, Cypress, Selenium and k6](https://www.mailslurp.com/_astro/testing-logo-cluster-v1.BXSfkQDI_Z2axoUG.png)

### Keep your test framework

Bring SMS into Playwright, Cypress, Selenium or your own API tests. Run the same verification journey in CI.

[See the Cypress guide](https://www.mailslurp.com/guides/test-sms-cypress-js/)

![Email inboxes for combined email and SMS tests](https://www.mailslurp.com/_astro/independent-inboxes-v3.Bx7bc8BG_ZNYf02.png)

### Cover email and SMS together

Test email confirmation and SMS verification in one suite, including fallback and recovery journeys.

[Explore email and SMS testing](https://www.mailslurp.com/product/email-integration-testing/)

## Turn incoming SMS into useful data.

A customer texts an order number, a delivery request or a support question. Extract the fields your application needs, then pass structured JSON into your CRM, database or next workflow.

Define the fields with a prompt and output schema, or attach a reusable AI Transformer to a phone number. Review the extracted values before taking action. AI features require an eligible plan; token usage applies.

[Explore SMS data extraction](https://www.mailslurp.com/docs/ai-transformers/)

From an incoming text to structured JSON

```typescript
import { StructuredOutputSchemaTypeEnum as SchemaType } from "mailslurp-client";
import { MailSlurp } from "mailslurp-client";

const mailslurp = new MailSlurp({
  apiKey: process.env.MAILSLURP_API_KEY!,
});

// SMS_ID is the ID of a received message in your account.
const extracted = await mailslurp.aiController.generateStructuredContentFromSms({
  generateStructuredContentSmsOptions: {
    smsId: process.env.SMS_ID!,
    instructions: "Extract the order ID and requested delivery day. Use null if absent.",
    outputSchema: {
      type: SchemaType.object,
      properties: {
        orderId: { type: SchemaType.string, nullable: true },
        requestedDay: { type: SchemaType.string, nullable: true },
      },
      required: ["orderId", "requestedDay"],
    },
  },
});

// Validate the result before updating your system.
console.log(extracted.result);
```

![An SMS message transformed into a structured JSON document](https://www.mailslurp.com/_astro/sms-structured-data-v1.C9zebLeF_Z2eMbS1.png)

### Extract the details that matter

Turn free-form texts into order IDs, request types and customer details. Choose the fields and formats your software expects.

[Review extraction results](https://www.mailslurp.com/docs/ai-results/)

![Incoming messages routed to a database, spreadsheet and application code](https://www.mailslurp.com/_astro/message-routing.Cw0ysKWv_Zhj2kY.png)

### Build an SMS ingest pipeline

Receive a webhook when a text arrives. Store the original message alongside extracted data, trigger a job, or connect it to your CRM or support system.

[Connect incoming SMS](https://www.mailslurp.com/docs/txt-sms/#use-sms-webhooks)

![Claude, ChatGPT, Gemini and custom AI agents](https://www.mailslurp.com/_astro/agent-network.C8VWDe1l_OBSJQ.png)

### Give AI agents a phone number

Assign numbers with scoped access to messages and conversation history. Enable permitted replies separately, and use claims and handoffs to coordinate agents and people.

[Explore agent SMS workflows](https://www.mailslurp.com/docs/agent-sms-totp/)

## Keep the conversation moving.

Receive a customer message, look up the context and send a reply from the same number. Build support conversations and status updates into your application, with message history available to your team and agents.

Choose a number with sending capability and confirm recipient permission. By default, replies are limited to people who have contacted your number first. Route requests that need a person into your support workflow.

[Explore two-way SMS](https://www.mailslurp.com/docs/txt-sms/)

Receive, reply and manage SMS

```typescript
import { MailSlurp } from "mailslurp-client";

const mailslurp = new MailSlurp({
  apiKey: process.env.MAILSLURP_API_KEY!,
});

// Use the smsId from a NEW_SMS webhook after verifying the event.
const sms = await mailslurp.smsController.getSmsMessage({
  smsId: process.env.SMS_ID!,
});

console.log(sms.fromNumber, sms.body);
// Match the sender to a customer or route the message to your team.
```

![A shield and lock representing controlled message access](https://www.mailslurp.com/_astro/enterprise-access.AP_-7xDv_3qpk8.png)

### Choose who can reach you

Allow or block incoming SMS from specific numbers or matching patterns. Apply rules to a particular number to keep unwanted messages out of your workflow.

[Configure sender rules](https://www.mailslurp.com/docs/routing-rulesets/)

![A webhook request to inspect and verify](https://www.mailslurp.com/_astro/webhook-concept.DkeEMi7p_24Tgi1.png)

### Verify incoming events

Check webhook signatures before accepting an event. Store each message ID in a durable queue so repeated deliveries do not create duplicate work.

[Connect verified webhooks](https://www.mailslurp.com/docs/webhooks/)

![Message delivery routes into your application and data systems](https://www.mailslurp.com/_astro/message-routing.Cw0ysKWv_Zhj2kY.png)

### Recover failed deliveries

Inspect delivery results and HTTP responses when a webhook fails. MailSlurp retries unsuccessful deliveries; you can fix your receiver and replay affected events.

[See webhook recovery](https://www.mailslurp.com/docs/pipeline-recovery/)

## One dashboard for your numbers and conversations.

Give developers, QA and support a shared place to work with SMS. Review numbers and messages in the dashboard, or build the same workflows into your own software through the API.

![A phone exchanging incoming messages and replies](https://www.mailslurp.com/_astro/sms-conversation-v1.C8-CzUWy_ZKNp10.png)

### Follow the whole conversation

Review received texts and message threads without passing around a handset. Connect customer messages to your support workflow; replies require sending capability and recipient permission.

[See the SMS dashboard guide](https://www.mailslurp.com/docs/txt-sms/)

![Development, staging and production environments](https://www.mailslurp.com/_astro/envs.EOQF3L3J_IQRrz.png)

### Organize numbers by purpose

Name and tag numbers for development, staging, production or a customer workflow. Use pools and reservations to allocate numbers to parallel tests.

[Manage number pools](https://www.mailslurp.com/docs/phone-pools/)

![A shield and lock representing shared access controls](https://www.mailslurp.com/_astro/enterprise-access.AP_-7xDv_3qpk8.png)

### Control access as your team grows

Use roles and scoped API keys to control access. Enterprise options add SSO, SCIM provisioning and audit logs for teams with central access requirements.

[Explore MailSlurp Enterprise](https://www.mailslurp.com/product/enterprise/)

## From phone number to working workflow.

Connect a real number to the application, agent or test you already run.

![Choose a dedicated phone number](https://www.mailslurp.com/_astro/phones-v2.DDXkX9NT_djrC3.png)

01

### Choose your number

Create a free account, review number types and rental pricing, then add a number for your workflow.

![Programming languages and SDKs for connecting incoming SMS](https://www.mailslurp.com/_astro/code-sdks.EuifXJuw_1niiPz.png)

02

### Connect incoming messages

Set up a webhook to your server, or use an SDK to wait for incoming SMS and read its contents.

![Route incoming messages into your application](https://www.mailslurp.com/_astro/message-routing.Cw0ysKWv_Zhj2kY.png)

03

### Put each message to work

Store it in your pipeline, route it to an agent or support team, or extract a code to complete an automated test.

## Questions about phone numbers and SMS

What kinds of phone numbers can I use?

MailSlurp offers dedicated SMS numbers in supported countries, including mobile and toll-free options where available. Check the live number catalogue for number type, receiving and sending capabilities, availability and rental pricing. A third-party service may apply its own rules to verification messages. [Review phone numbers and capabilities.](https://www.mailslurp.com/docs/txt-sms/)

Can I use SMS for an ingest pipeline or application workflow?

Yes. Connect an incoming-SMS webhook to your server to trigger a job, store a message or pass it into your application. You can also read messages and their history through the REST API or SDKs, or wait for a new message when your workflow needs one. [Connect SMS webhooks.](https://www.mailslurp.com/docs/txt-sms/)

Can I extract structured data from incoming SMS?

Yes. Use a prompt and output schema to extract fields from an SMS, or connect a reusable AI Transformer to a phone number. Review results as structured JSON and connect them to your own workflow. AI features require an eligible plan; token usage applies. For verification codes, use the separate built-in pattern extraction API. [Set up an SMS transformer.](https://www.mailslurp.com/docs/ai-transformers/)

Can an AI agent use a phone number?

Yes. Assign a number to an agent with scoped access so it can read messages and conversation history. Enable sending separately when replies are needed, and use conversation claims and handoffs to coordinate agents and people. Sending remains subject to the number's capabilities and recipient permissions. [Read the agent SMS guide.](https://www.mailslurp.com/docs/agent-sms-totp/)

Can my team use it for SMS support?

Yes. Keep a dedicated number for incoming customer messages, review SMS threads in the dashboard or your own application, and route messages to your support workflow. Replies require sending capability and recipient permission; by default, sending is limited to recipients who have contacted your number first. [Review SMS receiving and sending.](https://www.mailslurp.com/docs/txt-sms/)

Can I control a real phone number in an automated OTP test?

Yes. Create or assign a MailSlurp phone number, reserve it for the current test, submit it to the application, wait for the inbound SMS, extract the OTP, complete the verification step, and release or retain the number according to your test policy. [Run an OTP test with Playwright.](https://www.mailslurp.com/guides/test-sms-otp-mfa-using-playwright/) [Run an OTP test with Cypress.](https://www.mailslurp.com/guides/test-sms-cypress-js/)

Do automated tests have to share the same phone number?

No. Allocate numbers by environment, worker, suite, tenant, or customer journey. Number pools, locks, tags, and message history keep parallel runs isolated and make failures easier to trace. [Review the SMS verification API workflow.](https://www.mailslurp.com/mobile/sms-verification-api/)

Can one test cover email and SMS verification together?

Yes. MailSlurp provides programmable inboxes and phone numbers under one API model, so a test can validate email confirmation, SMS fallback, OTP, MFA, and recovery paths in the same suite. [Explore programmable email and SMS APIs.](https://www.mailslurp.com/product/programmable-email-and-sms-apis/) [Explore authentication testing.](https://www.mailslurp.com/solutions/authentication-testing/)

Is it free to get started?

You can create a free account and explore the dashboard. Phone numbers require a paid plan and number rental. Review the available numbers, capabilities and pricing in the app before adding one. Keep a number for an ongoing application or release it when you no longer need it. [Open the phone and SMS docs.](https://www.mailslurp.com/docs/txt-sms/)

## Build your next SMS workflow.

Start with a free account and explore the phone number dashboard. Review number availability, capabilities and rental pricing before adding your first number.

[Create your free account](https://app.mailslurp.com/sign-up/?onboardingRequest=phone\&returnTo=%2Fmobile%2Fsms%3FonboardingRequest%3Dphone) [Read the SMS guide](https://www.mailslurp.com/docs/txt-sms/)

![Dedicated phone numbers for your next SMS workflow](https://www.mailslurp.com/_astro/phones-v2.DDXkX9NT_djrC3.png)
