Skip to content
Facteur
FRGet started

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.

At launch — compatibility layerTypeScript
// 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,
});
Then — native SDKTypeScript
// 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. 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. 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. 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. 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. 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 MailosaurAt FacteurNote
GET /api/serversGET /v1/inboxesA Mailosaur “server” is an “inbox” here. The vocabulary changes, the semantics do not.
POST /api/messages/searchPOST /v1/messages/searchSame criteria, the same ALL / ANY matching logic, with the blocking wait on top.
GET /api/messages/:idGET /v1/messages/:idCompatible response structure, enriched with otp, links, codes and images.
GET /api/files/attachments/:idGET /v1/attachments/:idcomingIdentical binary download.
GET /api/files/email/:idGET /v1/messages/:id/emlcoming.eml export.
GET /api/analysis/deliverability/:idGET /v1/messages/:id/analysiscomingSPF, DKIM, DMARC and spam score. Neither the endpoint nor the plan that will carry it is settled.
POST /api/devices/otpPOST /v1/authenticator/otpcomingTOTP code generation from a shared secret.
GET /api/usage/limitsGET /v1/usagecomingEnriched: 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.