Docs
Email Accounts

Get a Microsoft single-mailbox consent link

Connect ONE Microsoft mailbox without running your own OAuth app. Give the mailbox address (email) you want connected; the connection completes only if the Microsoft account that grants consent resolves to that address, which is what confirms ownership. The returned link is single-use and expires in 30 minutes - send it to the mailbox owner to open when they are ready. Once they finish they land on a result page carrying partnerConnectStatus (and, on failure, partnerConnectReason); poll GET .../accounts to confirm the mailbox connected. Warmup is enabled automatically on the new account, subject to plan capacity.

GET
/v2/workspaces/{workspaceId}/accounts/microsoft/consent-url

Path Parameters

workspaceIdnumber

Query Parameters

emailstring

The mailbox address to connect. The connection only completes if the Microsoft account that grants consent resolves to this address - that is what confirms mailbox ownership, since the person clicking through is your customer, not you. It also pre-fills Microsoft's sign-in screen.

Response Body

curl -X GET "https://lynx-api.trulyinbox.com/v2/workspaces/0/accounts/microsoft/consent-url?email=alice%40customer-company.com"
{
  "data": {
    "url": "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=...&state=...",
    "expiresAt": "2026-09-07T12:30:00.000Z"
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}
{
  "error": {
    "code": "invalid_request",
    "message": "string",
    "details": {},
    "retry_after": 34
  },
  "meta": {
    "request_id": "req_2f1c…",
    "timestamp": "2019-08-24T14:15:22Z"
  }
}