This endpoint allows you to create a new Microsoft/Outlook mailbox (campaign) using OAuth authentication.
The request should be sent as an HTTP POST to {{host}}/campaigns/microsoft with the form-data request body type.
The request payload should include basic campaign information. Upon successful validation, the API will return an OAuth URL that must be used to complete the Microsoft authentication process.
Response upon successful request
-The API responds with a success status, a 200 status code, and provides an OAuth URL that must be visited to complete the Microsoft authentication process.
-The campaign will be created automatically after successful OAuth completion.
After the user completes OAuth — what your system must do
Once the mailbox owner finishes Microsoft consent, Mailivery creates the campaign in pending status and sends a webhook to your configured webhook URL. A pending campaign is not warming up yet — warmup starts only after you confirm the connection on your side.
Your webhook handler should:
- Confirm that this mailbox was actually expected. Compare the email in the webhook payload against your own records to make sure a real user in your system intended to connect this mailbox. This prevents accidental or unauthorized campaigns from going live.
- If expected → start warmup. Call the
Start Warmup(for new campaigns) orResume Warmup(for previously paused campaigns) endpoint to move the campaign frompendinginto active warmup. - If not expected → ignore or delete. Either call the delete-campaign endpoint, or simply leave the campaign in
pending— it will not send or consume resources while pending.
If a partner reports a campaign that "never started warmup", it is almost always because step 2 was skipped — the campaign is sitting in pending waiting for the warmup-start call.