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

# Poll a browser pairing for the machine credential

> Returns the machine credential exactly once after approval, rotating and revoking any previous credential of the same machine. Membership is rechecked when the credential is issued. All responses use Cache-Control: no-store.



## OpenAPI

````yaml /openapi/v1.json post /hosts/pairings/poll
openapi: 3.1.0
info:
  title: Felan API
  description: >-
    Team-scoped access to Felan sessions, members, invitations, integrations,
    environments, environment variables, automations, skills, custom subagents,
    and inbound events.
  version: 1.0.0
  contact:
    name: Felan Support
    url: https://felan.ai
servers:
  - url: https://app.felan.ai/api/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Hosts
  - name: Teams
  - name: Integrations
  - name: Environments
  - name: Environment Variables
  - name: Automations
  - name: Skills
  - name: Subagents
  - name: Sessions
  - name: Events
  - name: OpenAPI
paths:
  /hosts/pairings/poll:
    post:
      tags:
        - Hosts
      summary: Poll a browser pairing for the machine credential
      description: >-
        Returns the machine credential exactly once after approval, rotating and
        revoking any previous credential of the same machine. Membership is
        rechecked when the credential is issued. All responses use
        Cache-Control: no-store.
      operationId: pollHostPairing
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HostPairingPollRequest'
      responses:
        '200':
          description: >-
            Approved: machine credential and host identity. Never cache this
            response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPairingPollResponse'
        '400':
          description: >-
            authorization_pending: keep polling; slow_down: add 5 seconds to the
            interval; access_denied: the user denied the request; expired_token:
            the code expired or was already used. A body without a code means
            the request was malformed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPairingError'
        '429':
          description: 'rate_limited: retry with backoff according to Retry-After.'
          headers:
            Retry-After:
              description: Seconds until the rate limit resets.
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HostPairingError'
        '500':
          description: Retry with backoff.
      security: []
components:
  schemas:
    HostPairingPollRequest:
      type: object
      required:
        - deviceCode
      properties:
        deviceCode:
          type: string
          pattern: ^[A-Za-z0-9_-]{32,128}$
    HostPairingPollResponse:
      type: object
      required:
        - credential
        - host
      properties:
        credential:
          type: string
          minLength: 1
          maxLength: 512
          description: Machine credential for POST /hosts/token. Returned exactly once.
        host:
          type: object
          required:
            - id
            - teamId
            - userId
          properties:
            id:
              type: string
              pattern: >-
                ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            teamId:
              type: string
              pattern: >-
                ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
            userId:
              type: string
              pattern: >-
                ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$
    HostPairingError:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          enum:
            - authorization_pending
            - slow_down
            - access_denied
            - expired_token
            - unsupported_schema
            - rate_limited
        message:
          type: string
          minLength: 0
          maxLength: 4096
          x-maxBytes: 4096
          pattern: "^[^\0-\x1F\x7F-\x9F]*$"
        supported:
          type: object
          required:
            - protocol
            - rowSchemaVersion
          properties:
            protocol:
              type: array
              items:
                type: integer
                minimum: 0
                maximum: 9007199254740991
            rowSchemaVersion:
              type: array
              items:
                type: integer
                minimum: 0
                maximum: 9007199254740991
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Team API key. Current keys retain the bzy_team_ compatibility prefix.

````

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