# Initiate Microsoft OAuth login flow

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /webhook/partner-microsoft-oauth-url:
    post:
      summary: Initiate Microsoft OAuth login flow
      deprecated: false
      description: >-
        These endpoints allow email infrastructure provider partners to
        programmatically initiate the Google/Microsoft OAuth login flow to add
        an account to PlusVibe.

        ***Infrastructure provider is required to have its own browser
        automation***
      operationId: >-
        For Email Infra Provider
        Partner_pipl-partner-google-oauth-url-api/initiate-microsoft-oauth-login-flow
      tags:
        - For Email Infra Provider Partner
        - For Email Infra Provider Partner
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                flow:
                  type: string
                pipl_username:
                  type: string
                pipl_password:
                  type: string
                workspace_id:
                  type: string
                min_interval:
                  type: integer
                  description: ' the minimum sending interval per account'
                daily_limit:
                  type: integer
                  description: daily campaign limit
                enable_camp_rampup:
                  type: string
                  description: >-
                    enables or disables campaign ramp-up (yes = enable, no =
                    disable)
                camp_ramup_start:
                  type: integer
                  description: the initial campaign ramp-up value
                camp_rampup_increment:
                  type: integer
                  description: the daily campaign ramp-up increment
                enable_warmup:
                  type: string
                  description: enables or disables warm-up (yes = enable, no = disable)
                warmup_daily_limit:
                  type: integer
                  description: daily warm-up email limit
                enable_warmup_rampup:
                  type: string
                  description: >-
                    enables or disables warm-up ramp-up (yes = enable, no =
                    disable)
                warmup_rampup_start:
                  type: integer
                  description: the initial warm-up ramp-up value
                warmup_rampup_increment:
                  type: integer
                  description: the daily warm-up ramp-up increment
              required:
                - flow
                - pipl_username
                - pipl_password
                - workspace_id
              x-apidog-orders:
                - flow
                - pipl_username
                - pipl_password
                - workspace_id
                - min_interval
                - daily_limit
                - enable_camp_rampup
                - camp_ramup_start
                - camp_rampup_increment
                - enable_warmup
                - warmup_daily_limit
                - enable_warmup_rampup
                - warmup_rampup_start
                - warmup_rampup_increment
            example:
              flow: app_user
              pipl_username: pv@username.com
              pipl_password: fuibrn567
              workspace_id: 65099a0dd96fae8ab61120c0
              min_interval: 4
              daily_limit: 30
              enable_camp_rampup: 'yes'
              camp_ramup_start: 4
              camp_rampup_increment: 2
              enable_warmup: 'yes'
              warmup_daily_limit: 20
              enable_warmup_rampup: 'yes'
              warmup_rampup_start: 5
              warmup_rampup_increment: 1
      responses:
        '200':
          description: Successfully generated redirect URL for OAuth
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                    description: ''
                    examples:
                      - 1
                  message:
                    type: string
                    description: ''
                    examples:
                      - success
                  data:
                    type: object
                    description: ''
                    properties:
                      redirect_url:
                        type: string
                        description: ''
                        format: uri
                        examples:
                          - >-
                            https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=12345678-abcd-1234-efgh-56789abcdef0&state=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ3c19pZCI6IjY1YWFiYmNjZDk2ZjEyMzQ1Njc4OWFiIiwiX3VfaWQiOiI2NWNjYmI5YzEyMzQ1Njc4OWFiY2RlZiIsImZsb3ciOiJhcHBfdXNlciIsIndhcm11cF9zdGF0dXMiOiJJTkFDVElWRSIsInBhcnRuZXJfaWQiOiJub2RlX2FwaV91c2VyIiwicmFuZG9tIjoiYWJjZGVmZ2hpamtsbW5vcHFyc3QiLCJpYXQiOjE3NDAwMDAwMDAsImV4cCI6MTc0MDAwOTAwMH0.fake-signature-string&response_type=code&redirect_uri=https%3A%2F%2Fapi.fakecorp.com%2Fv1%2Fwebhook%2Fadd-microsoft-email-account-by-partner&prompt=select_account&scope=https%3A%2F%2Foutlook.office.com%2Fmail.readwrite%20https%3A%2F%2Foutlook.office.com%2FIMAP.AccessAsUser.All%20https%3A%2F%2Foutlook.office.com%2FSMTP.Send%20offline_access%20profile%20email%20openid&response_mode=query
                      client_id:
                        type: string
                        examples:
                          - 3266ec29-af23-4877-80cf-f688adeb5b62
                    x-apidog-orders:
                      - redirect_url
                      - client_id
                x-apidog-orders:
                  - code
                  - message
                  - data
          headers: {}
          x-apidog-name: OK
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
              example:
                code: 0
                message: MAX_ALLOWED_ACCOUNTS_REACHED
                data:
                  current: 10
                  max_allowed: 10
          headers: {}
          x-apidog-name: MAX_ALLOWED_ACCOUNTS_REACHED
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: For Email Infra Provider Partner
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-17238039-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
