ACCELQ Integration
Use MailSlurp REST APIs, OpenAPI definitions, and SDKs with ACCELQ Web, API, and Unified test automation.
MailSlurp is an email and SMS testing and automation platform. Teams can use it from the MailSlurp dashboard for manual setup and debugging, or from the MailSlurp API and SDKs for automated test flows. When paired with third-party platforms like ACCELQ, MailSlurp lets teams create real inboxes and phone numbers, receive messages, wait for OTPs or magic links, extract verification codes, and assert message content inside automated tests, browser tests, API tests, mobile tests, and end-to-end release workflows.
ACCELQ integrates with MailSlurp by letting ACCELQ test flows call MailSlurp APIs for programmable inboxes, phone numbers, messages, and wait logic. ACCELQ can drive the application under test through Web, Mobile, API, Desktop, or Unified scenarios while MailSlurp handles the email and SMS side over the REST API.
The most reliable pattern is to create a fresh MailSlurp inbox during the ACCELQ run, use the generated emailAddress in the application flow, wait for the verification email, extract the OTP or link, and feed that value back into the next ACCELQ step.
MailSlurp concepts
| Concept | What it means | How ACCELQ uses it |
|---|---|---|
| A message received by, or sent from, a MailSlurp inbox. Emails include subject, sender, recipients, body, headers, and attachments. | Assert sign-up emails, password resets, magic links, notifications, and email content. | |
| Inbox | A programmable email address that can send and receive email. Create a new inbox per test run when you need isolation. | Generate a unique address, enter it into the app under test, then wait for the expected email. |
| Phone number | A real phone number managed by MailSlurp that can receive and send SMS messages. | Test phone verification, SMS OTP, account recovery, and mobile onboarding flows. |
| SMS | A text message received by or sent from a MailSlurp phone number. | Wait for inbound OTPs, extract codes, and assert SMS body content. |
| Wait methods | Blocking API endpoints that wait until an expected email or SMS arrives, or fail after a timeout. | Replace fixed sleeps in ACCELQ with deterministic waits for real message delivery. |
| API key | The secret used to authenticate MailSlurp API requests. | Store it as an encrypted ACCELQ property and pass it as the x-api-key header. |
| SDKs | Official MailSlurp clients for Java, C#, JavaScript, Python, and other languages. | Use in coded helpers, CI runners, Selenium projects, or ACCELQ Java User Extensions when REST Actions are not enough. |
Key MailSlurp API methods
These are the MailSlurp operations ACCELQ teams commonly start with. Each link opens the operation in the MailSlurp REST API reference.
| Operation | Endpoint | Use in ACCELQ |
|---|---|---|
createInbox |
POST /inboxes |
Create an inbox with explicit options such as name, domain, tags, or inbox type. |
createInboxWithDefaults |
POST /inboxes/withDefaults |
Create a default inbox for the current test run when you do not need custom inbox options. |
waitForLatestEmail |
GET /waitForLatestEmail |
Wait until the latest email arrives for an inbox, then return it to the ACCELQ flow. |
getEmail |
GET /emails/{emailId} |
Fetch the full email body, headers, and parsed content for assertions. |
getEmailContentMatch |
POST /emails/{emailId}/contentMatch |
Run a regex over an email body and return capture groups such as OTP codes. |
getEmailCodes |
POST /emails/{emailId}/codes |
Extract one-time passcodes and similar verification codes from an email. |
sendEmail |
POST /inboxes/{inboxId} |
Send email from a MailSlurp inbox when testing outbound flows. |
deleteInbox |
DELETE /inboxes/{inboxId} |
Clean up inboxes in high-volume or short-lived ACCELQ suites. |
createPhoneNumber |
POST /phone |
Add a phone number to an account when API phone creation is enabled. |
getPhoneNumber |
GET /phone/numbers/{phoneNumberId} |
Fetch phone number details before using them in a verification flow. |
waitForLatestSms |
POST /waitForLatestSms |
Wait for the latest SMS that matches filter conditions. |
getSmsMessage |
GET /sms/{smsId} |
Fetch SMS body content after a wait method returns an SMS ID. |
getSmsCodes |
POST /sms/{smsId}/codes |
Extract OTPs and verification codes from SMS content. |
sendSms |
POST /sms/send |
Send an SMS from MailSlurp when testing outbound text-message workflows. |
ACCELQ products and where MailSlurp fits
ACCELQ uses related terms for product areas and APIs. In this guide, "API" can mean ACCELQ API testing, the MailSlurp REST API, or ACCELQ's external APIs for running and reporting on ACCELQ jobs. For MailSlurp email and SMS testing, use this map:
| ACCELQ area | Meaning | MailSlurp integration path |
|---|---|---|
| ACCELQ Unified | One platform combining manual, Web, API, Mobile, Desktop, and other automation in shared scenarios and test management. | Use MailSlurp REST calls as reusable Actions inside the same end-to-end Scenario that drives the app. |
| ACCELQ Automate Web | Codeless Web, browser, desktop, packaged-app, file, and similar functional automation. | Use Web steps for the app UI and REST/API steps for MailSlurp inbox creation, waiting, and extraction. |
| ACCELQ Automate API | API, backend, middleware, and service-layer automation. | Import MailSlurp's OpenAPI definition or create REST Actions for the endpoints you need. |
| ACCELQ Mobile | Mobile app and browser testing. | Use the same REST Actions to provision email or SMS resources, then use the generated address or phone number in mobile flows. |
| ACCELQ User Extensions | Java-based extension commands surfaced in the ACCELQ logic editor. | Use when REST Actions do not cover a custom helper or SDK workflow, for example wrapping the MailSlurp Java SDK. |
For most teams, the REST API path is the right default because it works across ACCELQ Web, API, Mobile, and Unified scenarios without adding runtime dependencies.
Choose an integration path
Recommended: REST Actions in ACCELQ
Create a small set of reusable ACCELQ Actions that call MailSlurp endpoints directly:
Create MailSlurp inboxWait for latest MailSlurp emailExtract OTP from MailSlurp email- Optional:
Delete MailSlurp inbox - Optional:
Create phone numberandWait for latest SMS
This fits low-code ACCELQ projects because responses are JSON and ACCELQ can store extracted values as Action outputs or variables.
Faster API setup: import MailSlurp OpenAPI
MailSlurp publishes OpenAPI definitions that ACCELQ API projects can import to generate Actions for endpoints.
- OpenAPI JSON: https://api.mailslurp.com/v2/api-docs/
- Swagger/OpenAPI docs: https://swagger.mailslurp.com
- REST API reference: MailSlurp REST API
In ACCELQ, use the Swagger/OpenAPI import flow if it is available in your edition. Import only the MailSlurp endpoints your test team will maintain as reusable Actions. A focused import is easier to govern than publishing every MailSlurp endpoint into a shared module.
SDK and user extension option
MailSlurp has official SDKs for Java, C#, JavaScript, Python, and other languages, plus framework guides such as Selenium and Playwright.
Use SDKs when your ACCELQ run is orchestrated by a coded test harness, CI job, or helper service outside ACCELQ. Inside ACCELQ itself, prefer REST Actions unless you already use ACCELQ Java User Extensions and want to wrap MailSlurp SDK calls as custom commands.
Typical ACCELQ workflow
Use this sequence for sign-up, password reset, magic-link login, invitation, and email verification tests:
- Start an ACCELQ Scenario or reusable Action.
- Call
createInboxWithDefaultsand store the returnedidandemailAddress. - Use
emailAddressin the app under test. - Submit the page or API request that causes your app to send the email.
- Call
waitForLatestEmailwith the inboxid. - Store the returned email
id,subject,body, and any other values you need. - Call
getEmailContentMatchwith a regex pattern to extract an OTP, token, or link. - Use the extracted value in the next ACCELQ UI or API step.
- Assert the application reaches the expected state.
- Optional: delete the inbox or apply inbox retention policies for cleanup.
Authenticate requests
Use your MailSlurp dashboard API key in each MailSlurp request:
- Recommended:
x-api-key: YOUR_API_KEY - Alternative:
?apiKey=YOUR_API_KEY
In low-code runners, header-based authentication works well with environment variables, shared request definitions, and reusable actions.
In ACCELQ, keep the key in an encrypted Global Property such as MAILSLURP_API_KEY, then reference it from REST request headers. If your ACCELQ REST configuration accepts header rows, set header name x-api-key and value from the property. If it accepts comma-separated headers, use the equivalent x-api-key={prop: MAILSLURP_API_KEY} form.
Also define MAILSLURP_BASE_URL as https://api.mailslurp.com so Actions can be reused across projects and updated centrally.
Create the core ACCELQ Actions
1. Create an inbox for the test run
Create a REST POST Action for this endpoint:
POST https://api.mailslurp.com/inboxes/withDefaults
x-api-key: YOUR_API_KEY
Accept: application/json
In ACCELQ, store these response values:
idasmailSlurpInboxIdemailAddressasmailSlurpEmailAddress
Then pass mailSlurpEmailAddress into your Web, Mobile, or API step that registers, invites, or resets the user.
/inboxes/withDefaults
Create an inbox with default options. Uses MailSlurp domain pool address and is private.
Request, parameters, and responses
Responses
| Status | Schema | Description |
|---|---|---|
201 | InboxDto | Created |
HTTP and SDK snippets
HTTP
POST /inboxes/withDefaults HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
cURL
curl -X POST "https://api.mailslurp.com/inboxes/withDefaults" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"
JavaScript SDK
import { Configuration, InboxControllerApi } from "mailslurp-client";
const config = new Configuration({ apiKey: "YOUR_API_KEY" });
const inboxController = new InboxControllerApi(config);
const result = await inboxController.createInboxWithDefaults();
Python SDK
import mailslurp_client
from mailslurp_client.api.inbox_controller_api import InboxControllerApi
configuration = mailslurp_client.Configuration()
configuration.api_key["x-api-key"] = "YOUR_API_KEY"
with mailslurp_client.ApiClient(configuration) as api_client:
inboxController = InboxControllerApi(api_client)
result = inboxController.create_inbox_with_defaults()
2. Wait for the verification email
Create a REST GET Action that accepts mailSlurpInboxId, timeout, and unreadOnly inputs.
GET https://api.mailslurp.com/waitForLatestEmail?inboxId=INBOX_ID&timeout=120000&unreadOnly=true
x-api-key: YOUR_API_KEY
Accept: application/json
This makes ACCELQ wait on real email delivery instead of using a fixed sleep. Store at least the returned email id; many teams also store subject, from, and body for assertions and debugging.
/waitForLatestEmail
Fetch inbox's latest email or if empty wait for an email to arrive
Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
Request, parameters, and responses
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
inboxId | string:uuid | No | Id of the inbox we are fetching emails from |
timeout | integer:int64 | No | Max milliseconds to wait |
unreadOnly | boolean | No | Optional filter for unread only. |
before | string:date-time | No | Filter for emails that were before after the given timestamp |
since | string:date-time | No | Filter for emails that were received after the given timestamp |
sort | enum: ASC | DESC | No | Sort directionValues: ASC, DESC |
delay | integer:int64 | No | Max milliseconds delay between calls |
Responses
| Status | Schema | Description |
|---|---|---|
200 | Email | OK |
HTTP and SDK snippets
HTTP
GET /waitForLatestEmail?inboxId=00000000-0000-4000-8000-000000000000&timeout=value&unreadOnly=true HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
cURL
curl -X GET "https://api.mailslurp.com/waitForLatestEmail?inboxId=00000000-0000-4000-8000-000000000000&timeout=value&unreadOnly=true" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json"
JavaScript SDK
import { Configuration, WaitForControllerApi } from "mailslurp-client";
const config = new Configuration({ apiKey: "YOUR_API_KEY" });
const waitForController = new WaitForControllerApi(config);
const request = {
"inboxId": "00000000-0000-4000-8000-000000000000",
"timeout": null,
"unreadOnly": true
};
const result = await waitForController.waitForLatestEmail(request);
Python SDK
import mailslurp_client
from mailslurp_client.api.wait_for_controller_api import WaitForControllerApi
configuration = mailslurp_client.Configuration()
configuration.api_key["x-api-key"] = "YOUR_API_KEY"
with mailslurp_client.ApiClient(configuration) as api_client:
waitForController = WaitForControllerApi(api_client)
result = waitForController.wait_for_latest_email(inbox_id="00000000-0000-4000-8000-000000000000", timeout=NaN, unread_only=True)
3. Extract the OTP, token, or link
Create a REST POST Action that accepts emailId and pattern inputs.
POST https://api.mailslurp.com/emails/EMAIL_ID/contentMatch
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: application/json
{
"pattern": "(?:verification code|OTP|code)[:\\s-]*(\\d{6})"
}
getEmailContentMatch uses Java-style regular expressions. Put the value you want in a capture group so ACCELQ can store the returned matches[1] as verificationCode.
/emails/{emailId}/contentMatch
Run regex against hydrated email body and return matches
Executes a Java regex pattern over hydrated email body text and returns the full match plus capture groups. Pattern syntax follows Java `Pattern` rules.
Request, parameters, and responses
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
emailId | string:uuid | Yes | ID of email to match against |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
pattern | string | Yes | Java style regex pattern. Do not include the typical `/` at start or end of regex in some languages. Given an example `your code is: 12345` the pattern to extract match looks like `code is: (\d{6})`. This will return an array of matches with the first matching the entire pattern and the subsequent matching the groups: `['code is: 123456', '123456']` See htt... |
{
"pattern": "value"
}
Responses
| Status | Schema | Description |
|---|---|---|
200 | EmailContentMatchResult | OK |
HTTP and SDK snippets
HTTP
POST /emails/00000000-0000-4000-8000-000000000000/contentMatch HTTP/1.1
Host: api.mailslurp.com
x-api-key: YOUR_API_KEY
Accept: application/json
Content-Type: application/json
{
"pattern": "value"
}
cURL
curl -X POST "https://api.mailslurp.com/emails/00000000-0000-4000-8000-000000000000/contentMatch" \
-H "x-api-key: YOUR_API_KEY" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
--data '{"pattern":"value"}'
JavaScript SDK
import { Configuration, EmailControllerApi } from "mailslurp-client";
const config = new Configuration({ apiKey: "YOUR_API_KEY" });
const emailController = new EmailControllerApi(config);
const request = {
"emailId": "00000000-0000-4000-8000-000000000000",
"contentMatchOptions": {
"pattern": "value"
}
};
const result = await emailController.getEmailContentMatch(request);
Python SDK
import mailslurp_client
from mailslurp_client.api.email_controller_api import EmailControllerApi
configuration = mailslurp_client.Configuration()
configuration.api_key["x-api-key"] = "YOUR_API_KEY"
with mailslurp_client.ApiClient(configuration) as api_client:
emailController = EmailControllerApi(api_client)
content_match_options = {
"pattern": "value"
}
result = emailController.get_email_content_match("00000000-0000-4000-8000-000000000000", content_match_options)
4. Use the extracted value in ACCELQ
After the MailSlurp Actions run, the rest of the Scenario is standard ACCELQ automation:
- Enter
verificationCodein the app's OTP field, or call your app's verification API with it. - Submit the form or request.
- Verify the expected success page, status code, response field, or account state.
For API-only ACCELQ tests, the same sequence works without browser steps: create inbox, call your application's sign-up API with the generated address, wait for the email, extract the code, then call your application's verify endpoint.
OpenAPI import checklist
If you use ACCELQ Automate API or ACCELQ Unified with Swagger/OpenAPI import:
- Import https://api.mailslurp.com/v2/api-docs/ as the Swagger/OpenAPI source.
- Select only the endpoints needed for your first workflow, such as inbox creation, wait methods, email content matching, and cleanup.
- Set the base URL to
https://api.mailslurp.com. - Add
x-api-keyauthentication using an encrypted ACCELQ property. - Review generated Action names so non-developers can understand them.
- Add response extraction for
id,emailAddress, andmatches[1]. - Save the generated Actions into a shared Context or module that test authors can reuse.
OpenAPI import is a shortcut for building Actions. It does not replace test design: still wrap low-level API calls in clear business Actions such as Create disposable test email address or Get verification code for inbox.
Working with ACCELQ JSON responses
MailSlurp API responses are JSON. In ACCELQ, extract values from REST responses with JSONPath-style commands or response-node extraction:
- Inbox ID:
$.id - Email address:
$.emailAddress - Latest email ID:
$.id - Email subject:
$.subject - Regex result array:
$.matches[1]
Keep these values as Action outputs where possible. That makes your Scenario readable and avoids repeating JSON parsing logic in every test case.
Web, API, and Unified examples
Web sign-up with email OTP
- ACCELQ Web opens the sign-up page.
- MailSlurp REST Action creates an inbox.
- ACCELQ Web enters the generated email address and submits the form.
- MailSlurp REST Action waits for the latest email.
- MailSlurp REST Action extracts the OTP.
- ACCELQ Web enters the OTP and verifies the account is active.
API registration with magic link
- MailSlurp REST Action creates an inbox.
- ACCELQ API calls your app's registration endpoint with the generated address.
- MailSlurp REST Action waits for the email.
- ACCELQ extracts either the full link from the email body or a token parameter from the link.
- ACCELQ API calls the verification endpoint and asserts the response.
Unified Web plus API regression
- ACCELQ API creates a user with a MailSlurp email address.
- ACCELQ Web signs in as that user.
- The app sends a security notification.
- MailSlurp waits for the notification and asserts subject, sender, and body content.
- ACCELQ continues with UI assertions in the same Scenario.
SMS and phone verification
MailSlurp can also manage real phone numbers and inbound SMS. Use the same ACCELQ pattern:
- Create or fetch a MailSlurp phone number.
- Use the number in your app's phone verification flow.
- Wait for the inbound SMS.
- Extract the OTP from the SMS body.
- Continue the ACCELQ verification step.
Start with email first; inbox setup has fewer moving parts. Add SMS after the reusable REST Action pattern is working.
Reliability practices
- Create a fresh inbox per test run for parallel ACCELQ jobs.
- Use
unreadOnly=truewhen waiting for a message in a newly created inbox. - Use explicit timeouts such as
60000or120000milliseconds, then fail the ACCELQ step if the email does not arrive. - Match on subject, sender, or body when a shared inbox could receive more than one message.
- Store API keys in encrypted ACCELQ properties, not hardcoded request definitions.
- Keep regex patterns specific enough to avoid capturing unrelated numbers.
- Add cleanup for high-volume suites, or configure MailSlurp retention policies.
- Prefer direct API waits over fixed delays or visual inbox polling in CI.
When to use the MailSlurp test interface
The MailSlurp test interface is useful when building or debugging a new ACCELQ flow:
- Open https://test.mailslurp.com.
- Sign in with a MailSlurp API key.
- Create an inbox and copy its email address.
- Use that address in the ACCELQ-recorded app flow.
- Inspect the received email visually before turning the same steps into REST Actions.
Use the visual interface for authoring and debugging, not as the primary CI path. REST Actions are faster, easier to parameterize, and more deterministic.
Terminology notes
- MailSlurp REST API: the API ACCELQ calls to create inboxes, wait for email, extract OTPs, send email, manage phone numbers, and inspect messages.
- MailSlurp OpenAPI definition: the machine-readable schema ACCELQ can import to generate REST Actions.
- MailSlurp SDKs: language clients for coded test suites or helper services. Use them with Java user extensions or external runners when REST Actions are not enough.
- ACCELQ API testing: ACCELQ's product area for testing APIs, which can call MailSlurp like any other REST service.
- ACCELQ external APIs: APIs for controlling ACCELQ itself from CI or external tools. These are not required for MailSlurp email and SMS verification inside ACCELQ Scenarios.
Troubleshooting
401or403: confirm thex-api-keyheader is present and the ACCELQ property resolves at runtime.- Timeout waiting for email: increase the timeout, confirm the app sent to
emailAddress, and check sender allowlists or staging mail configuration. - OTP extraction returns the wrong value: tighten the regex and keep the OTP in the first capture group.
- OpenAPI import generates too many Actions: import a smaller endpoint set or delete unused generated Actions before publishing the shared module.
- Parallel runs read the wrong email: create a fresh inbox per run, or wait with stricter matching conditions.
ACCELQ references
These ACCELQ resources are useful when configuring the ACCELQ side of the integration:
- ACCELQ product overview
- ACCELQ Unified platform
- REST API test automation in ACCELQ
- Importing Swagger definitions in ACCELQ
- Extracting data from REST API responses in ACCELQ
- Working with JSON in ACCELQ
- ACCELQ user extensions