> ## Documentation Index
> Fetch the complete documentation index at: https://docs.optareach.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect a platform account

> Connects a sender account using the platform-supported connection method. Optareach encrypts credentials, enforces account limits, and queues validation. Supported connectionMethod values: linkedin (credentials, credentials_2fa, extension); email (app_password); reddit (extension, browser_session); x (extension); github and hackernews (credentials, extension); stackoverflow (extension).



## OpenAPI

````yaml /api-reference/openapi.json post /api/v1/platforms/{platform}/accounts
openapi: 3.1.0
info:
  title: Optareach Public API
  version: 1.0.0
  description: >-
    Platform-first API surface for accounts, prospects, campaigns, inbox,
    tracked searches, AI rooms, workspaces, analytics, billing, profile, and
    knowledge bases.
servers:
  - url: https://optareach.com
    description: Production
security: []
tags:
  - name: Meta
    description: API metadata and discovery
  - name: Platforms
    description: Platform registry and capabilities
  - name: Accounts
    description: Connected sender accounts
  - name: Prospects
    description: Prospect lists and leads
  - name: Campaigns
    description: Campaign lifecycle and performance
  - name: Inbox
    description: Conversations and messages
  - name: TrackedSearches
    description: Mentions and tracked search streams
  - name: AI
    description: AI chat rooms and enrichment
  - name: Workspaces
    description: Workspace management
  - name: KnowledgeBases
    description: Knowledge base management
  - name: Analytics
    description: Global dashboard metrics
  - name: Billing
    description: Subscriptions and credits
  - name: Profile
    description: Current user profile
  - name: Tags
    description: Conversation tags
paths:
  /api/v1/platforms/{platform}/accounts:
    post:
      tags:
        - Accounts
      summary: Connect a platform account
      description: >-
        Connects a sender account using the platform-supported connection
        method. Optareach encrypts credentials, enforces account limits, and
        queues validation. Supported connectionMethod values: linkedin
        (credentials, credentials_2fa, extension); email (app_password); reddit
        (extension, browser_session); x (extension); github and hackernews
        (credentials, extension); stackoverflow (extension).
      parameters:
        - $ref: '#/components/parameters/platform'
      requestBody:
        description: >-
          Use connectionMethod for the platform-specific connection flow. The
          legacy dashboard fields (login_method, two_factor_secret, extension,
          cookies, and userAgent) remain accepted for backwards compatibility.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountWrite'
            example:
              connectionMethod: credentials_2fa
              username: simeon@example.com
              password: your-linkedin-password
              country: North Macedonia
              twoFactorSecret: YOUR_AUTHENTICATOR_SECRET
      responses:
        '200':
          description: >-
            Browser session captured; the account was created or updated and
            validation was queued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/AccountCaptureResult'
                required:
                  - data
              examples:
                success:
                  summary: Example response
                  value:
                    data:
                      id: 3c7de2c5-617c-4c1b-9c6f-b6e659b08d92
                      created: true
        '201':
          description: Account connection accepted and validation queued.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountConnectionResult'
              examples:
                success:
                  summary: Example response
                  value:
                    data:
                      id: 3c7de2c5-617c-4c1b-9c6f-b6e659b08d92
                      owner_id: 7b5740db-28bb-4e2c-89b0-bd4f19a37b10
                      service: linkedin
                      metadata:
                        username: simeon@example.com
                        name: Simeon
                        status: Healthy
                        tracking_preference: all_conversations
                    refreshOn:
                      - accounts.create
                      - accounts.update
                      - accounts.delete
        '422':
          $ref: '#/components/responses/ValidationError'
components:
  parameters:
    platform:
      name: platform
      in: path
      required: true
      schema:
        type: string
  schemas:
    AccountWrite:
      type: object
      properties:
        connectionMethod:
          type: string
          enum:
            - credentials
            - credentials_2fa
            - extension
            - browser_session
            - app_password
            - embedded_signup
        username:
          type: string
        password:
          type: string
          writeOnly: true
        country:
          type: string
        twoFactorSecret:
          type: string
          writeOnly: true
        extension:
          type: boolean
        cookies:
          type: array
          items:
            type: object
            additionalProperties: true
        profile:
          type: object
          additionalProperties: true
        localStorage:
          type: object
          additionalProperties: true
        sessionStorage:
          type: object
          additionalProperties: true
        userAgent:
          type: string
        browserId:
          type: string
        proxyId:
          type: number
        browser_session_version:
          enum:
            - '2'
            - legacy
        auth_method:
          type: string
        provider:
          type: string
        phone_number:
          type: string
        phone_number_id:
          type: string
        waba_id:
          type: string
        business_id:
          type: string
        trackingPreference:
          enum:
            - all_conversations
            - campaign_only
    AccountCaptureResult:
      type: object
      properties:
        id:
          type: string
        created:
          type: boolean
      required:
        - id
        - created
    AccountConnectionResult:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Account'
        refreshOn:
          type: array
          items:
            type: string
      required:
        - data
        - refreshOn
    Account:
      type: object
      properties:
        id:
          type: string
        owner_id:
          type: string
        service:
          type: string
        metadata:
          type: object
          additionalProperties: true
      required:
        - id
        - owner_id
        - service
        - metadata
  responses:
    ValidationError:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  details: {}
                required:
                  - code
                  - message
            required:
              - error
          example:
            error:
              code: validation_error
              message: Payload failed validation.
              details:
                field: body

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.