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

# Claim GitHub installations from an OAuth code



## OpenAPI

````yaml api-reference/openapi.account.json POST /github/installations/claim
openapi: 3.1.0
info:
  title: Aether Account & Integrations API
  version: 0.1.0
  description: >-
    Account, billing, and integration-management endpoints used by the Aether
    web app and CLI. Root-mounted; NOT part of the versioned /v1 contract.
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /github/installations/claim:
    post:
      tags:
        - github
      summary: Claim GitHub installations from an OAuth code
      operationId: claimGithubInstallations
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GitHubClaimInput'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GitHubStatus'
          description: OK
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Forbidden
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Internal Server Error
        '502':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Bad Gateway
components:
  schemas:
    GitHubClaimInput:
      additionalProperties: false
      properties:
        code:
          minLength: 1
          type: string
        state:
          minLength: 1
          type: string
      required:
        - code
        - state
      type: object
    GitHubStatus:
      oneOf:
        - $ref: '#/components/schemas/DisconnectedGitHubStatus'
        - $ref: '#/components/schemas/ConnectedGitHubStatus'
    ErrorResponse:
      additionalProperties: false
      properties:
        code:
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
      type: object
    DisconnectedGitHubStatus:
      additionalProperties: false
      properties:
        connected:
          enum:
            - false
          type: boolean
        installations:
          items:
            $ref: '#/components/schemas/GitHubInstallation'
          maxItems: 0
          type: array
      required:
        - connected
        - installations
      type: object
    ConnectedGitHubStatus:
      additionalProperties: false
      properties:
        connected:
          enum:
            - true
          type: boolean
        installations:
          items:
            $ref: '#/components/schemas/GitHubInstallation'
          minItems: 1
          type: array
      required:
        - connected
        - installations
      type: object
    GitHubInstallation:
      additionalProperties: false
      properties:
        account_login:
          minLength: 1
          type: string
        account_type:
          minLength: 1
          type: string
        connected_at:
          minLength: 1
          type: string
        installation_id:
          format: int64
          minimum: 1
          type: integer
      required:
        - installation_id
        - account_login
        - account_type
        - connected_at
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````