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

# Read channel connection progress

> Use attemptId returned by create_channel_connection_link. Read saved progress on user request; do not run unbounded polling. Pending/authorizing/selecting requires human browser completion. Processing is uncertain and must not trigger another callback. Completed/partial returns actual saved channelIds; inspect each with get_channel to verify readiness. Failed or expired does not prove no channel was saved: reconcile returned IDs and list_channels before a new attempt. Records expire after 24 hours; a later 404 is a retention gap, not evidence of no connection. Requires `channels:read`.



## OpenAPI

````yaml /openapi.json get /channels/connection-attempts/{attemptId}
openapi: 3.0.3
info:
  title: Visito M2M API
  version: 1.0.0
  description: >-
    Tenant-scoped server-to-server API for channels, conversations, commerce,
    custom AI tools, and WhatsApp templates. Send operations are asynchronous
    and return queued acknowledgements. Expansion adds conversation controls,
    knowledge, sales opportunities, delivery status, reporting, and signed
    webhooks.
servers:
  - url: https://platform-api.visitoai.com/m2m/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Channels
  - name: Conversations
  - name: Commerce
  - name: Custom tools
  - name: WhatsApp templates
  - name: Properties
  - name: Knowledge
  - name: Sales CRM
  - name: Delivery
  - name: Reporting
  - name: Webhooks
paths:
  /channels/connection-attempts/{attemptId}:
    get:
      tags:
        - Channels
      summary: Read channel connection progress
      description: >-
        Use attemptId returned by create_channel_connection_link. Read saved
        progress on user request; do not run unbounded polling.
        Pending/authorizing/selecting requires human browser completion.
        Processing is uncertain and must not trigger another callback.
        Completed/partial returns actual saved channelIds; inspect each with
        get_channel to verify readiness. Failed or expired does not prove no
        channel was saved: reconcile returned IDs and list_channels before a new
        attempt. Records expire after 24 hours; a later 404 is a retention gap,
        not evidence of no connection. Requires `channels:read`.
      operationId: get_channel_connection_attempt
      parameters:
        - name: attemptId
          in: path
          required: true
          description: >-
            attemptId returned by create_channel_connection_link, not a channel
            ID or OAuth state.
          schema:
            type: string
            minLength: 36
            maxLength: 36
            pattern: ^[a-fA-F0-9-]{36}$
      responses:
        '200':
          description: Read channel connection progress
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChannelConnectionAttempt'
        default:
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    ChannelConnectionAttempt:
      type: object
      properties:
        attemptId:
          type: string
        tenantId:
          type: string
        type:
          type: string
          enum:
            - instagram
            - messenger
            - whatsapp
        provider:
          type: string
          enum:
            - meta
        status:
          type: string
          enum:
            - pending
            - authorizing
            - processing
            - selecting
            - completed
            - partial
            - failed
            - expired
        expiresAt:
          type: string
          format: date-time
        channelIds:
          type: array
          items:
            type: string
          maxItems: 100
        failureCode:
          type: string
        nextAction:
          type: string
        connectionUrl:
          type: string
          format: uri
          description: >-
            Temporary browser link. Share with the intended business admin; do
            not log, index or expose to third parties.
        failures:
          type: array
          maxItems: 100
          description: >-
            Saved failed provider resources and safe reason codes. Resolve
            ownership_conflict with the owning business; missing_messaging_task
            requires provider messaging permission; activation_failed requires
            WhatsApp activation checks; persistence failures require
            reconciliation before another attempt. Raw provider text is omitted.
          items:
            type: object
            properties:
              resourceId:
                type: string
              reason:
                type: string
                enum:
                  - ownership_conflict
                  - missing_messaging_task
                  - activation_failed
                  - channel_upsert_failed
                  - binding_write_failed
                  - resource_failed
            required:
              - resourceId
              - reason
            additionalProperties: false
      additionalProperties: false
      required:
        - attemptId
        - tenantId
        - type
        - provider
        - status
        - expiresAt
        - channelIds
        - nextAction
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              example: M2M_AUTH_INSUFFICIENT_SCOPE
            message:
              type: string
            details:
              type: object
              additionalProperties: true
      example:
        error:
          code: M2M_AUTH_INSUFFICIENT_SCOPE
          message: M2M credential does not have required scope.
          details:
            requiredScopes:
              - conversations:write
            missingScopes:
              - conversations:write
  responses:
    Error:
      description: Structured error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Visito M2M API key
      description: Server-side tenant-scoped credential created from Build > API Keys.

````

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