Connect a Microsoft Mailbox

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 https://app.mailivery.io/api/v1/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 — warm-up starts only after you confirm the connection on your side.

Your webhook handler should:

  1. 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.
  2. If expected → start warm-up. Call the Start Warm-Up (for new campaigns) or Resume Warm-Up (for previously paused campaigns) endpoint to move the campaign from pending into active warm-up.
  3. 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 warm-up", it is almost always because step 2 was skipped — the campaign is sitting in pending waiting for the warm-up start call.

Body Params
string
required
length ≤ 255
string | null
string
required
length ≤ 255

Microsoft/Outlook email address. Must be unique across existing campaigns.

integer | null
0 to 2000

Daily email volume for warmup. Subject to account limits.

integer | null
0 to 100

Target response rate percentage. Subject to account limits.

meta
object
required
string
enum
Defaults to inherit

Optional. Warm-up audience for the mailbox being created.

  • all -> warm up with both business and consumer mailboxes.
  • business -> warm up with business mailboxes only.
  • consumer -> warm up with consumer mailboxes only.
  • inherit -> follow the team-level setting. This is the default when the field is omitted.
Allowed:
string
enum
Defaults to inherit

Optional. Warm-up topics for the mailbox being created. See the Warm-Up Topics endpoints for the catalogue and the selection rules.

  • inherit -> follow the team setting. This is the default when the field is omitted.
  • general -> General content only for this mailbox. Send no warmup_topic_selections.
  • custom -> use warmup_topic_selections, which is then required.

The topic fields are checked when you call this endpoint and saved when the mailbox owner completes Microsoft consent and the mailbox is created. To confirm what was saved, call GET /campaigns/{campaignId}/preferences/warmup-topics for the new mailbox.

Allowed:
warmup_topic_selections
array of objects | null

Required when warmup_topic_mode is custom; omit it, or send [], otherwise. Sending industries in it without warmup_topic_mode returns 400 VALIDATION_ERROR.

Same rules as PATCH /campaigns/{campaignId}/preferences/warmup-topics: at most 5 industries with 1 to 5 topics each, names exactly as GET /warmup-topics returns them. Every industry must be available: true, because a new mailbox has nothing saved yet.

warmup_topic_selections
Headers
string
required

Any unique string, timestamp, or UUID for logging.

string
enum
Defaults to application/json

Generated from available request content types

Allowed:
Responses

WARMUP_TOPICS_NOT_ENABLED when warmup_topic_mode is general or custom and warm-up topic selection is not enabled for the team the new mailbox inherits from. No mailbox is created.

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json