Migration
Change provider without rewriting your tests
The real cost of switching testing tools is not the subscription: it is the week spent rewriting assertions that already worked. We removed that week.
// Two lines change. The rest of the file does not.
const mailosaur = new MailosaurClient(
process.env.FACTEUR_API_KEY,
{ baseUrl: 'https://api.facteur.eu/compat' }
);
// Your existing calls work as they are.
const message = await mailosaur.messages.get(serverId, {
sentTo: address,
});// The native SDK adds OTP extraction, quotas and
// alerts. Migrate file by file.
import { Facteur } from '@facteur/client';
const facteur = new Facteur(process.env.FACTEUR_API_KEY);
const message = await facteur.messages.await({
inbox: 'j3k9x2mq',
sentTo: address,
});
expect(message.otp).toBe('265279');How to do it
Five steps, none irreversible
How it goes the day the compatibility layer opens. The first step, though, you can take right now.
- 1
Create an account and an inbox
The free plan is enough to validate the migration. Note the inbox identifier: it plays the role of the “server ID”.
- 2
Switch the base URL on a single test
Two lines to change. Run that test: if it passes, your suite will pass. That is the moment of truth, and it costs five minutes.
- 3
Run the full suite in parallel
Keep the old provider alongside for a week, long enough to compare pass rates. We are not asking you to cancel before you are convinced.
- 4
Set your quotas and alerts
This is the step the old tool did not allow. A limit per inbox, alert thresholds, and the team’s Slack channel.
- 5
Move to the native SDK at your own pace
File by file, to gain OTP extraction and the blocking wait. The compatibility layer stays supported: nothing forces you.
Mapping
API endpoint conversion table
For the cases where you call the API directly rather than through an SDK. The rows marked “coming” are not open yet: we would rather say so here than let you find out mid-migration.
| At Mailosaur | At Facteur | Note |
|---|---|---|
| GET /api/servers | GET /v1/inboxes | A Mailosaur “server” is an “inbox” here. The vocabulary changes, the semantics do not. |
| POST /api/messages/search | POST /v1/messages/search | Same criteria, the same ALL / ANY matching logic, with the blocking wait on top. |
| GET /api/messages/:id | GET /v1/messages/:id | Compatible response structure, enriched with otp, links, codes and images. |
| GET /api/files/attachments/:id | GET /v1/attachments/:idcoming | Identical binary download. |
| GET /api/files/email/:id | GET /v1/messages/:id/emlcoming | .eml export. |
| GET /api/analysis/deliverability/:id | GET /v1/messages/:id/analysiscoming | SPF, DKIM, DMARC and spam score. Neither the endpoint nor the plan that will carry it is settled. |
| POST /api/devices/otp | POST /v1/authenticator/otpcoming | TOTP code generation from a shared secret. |
| GET /api/usage/limits | GET /v1/usagecoming | Enriched: breakdown per inbox, remaining credits and expiry date. |
What the compatibility layer does not cover
Features specific to the other platform — multi-client rendering previews, visual editor, automatic rules — have no equivalent in the compatibility layer. If your suite depends on them, write to us at hello@facteur.eu: we will tell you honestly whether migrating makes sense today or not.
Try the migration on a single file
The free plan asks for no card. Two lines to change, and you will know.