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

# Get GitHub integration

> Get GitHub integration through the Towbar REST API.

Required permissions: integration.manage. Personal keys are capped by their owner’s current team role.

See [request conventions](/docs/api/overview) and [automation workflows](/docs/api/workflows). MCP clients use the task-oriented [tool catalogue](/docs/api/mcp-tools).


## OpenAPI

````yaml api-reference/openapi.json GET /github
openapi: 3.1.0
info:
  title: Towbar API
  version: 2.0.0
  description: >-
    Manage your Towbar control plane with a bearer API key. Keys inherit current
    workspace permissions.
servers:
  - url: https://api.example.com/v1/api
security: []
paths:
  /github:
    get:
      tags:
        - Integrations / GitHub
      summary: Get GitHub integration
      description: >-
        Required permissions: integration.manage. Personal keys are capped by
        the current member role; team keys use explicit grants.
      operationId: get_github
      parameters: []
      responses:
        '200':
          description: >-
            JSON object containing configuration, connection, and
            previewReporting.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Response_273'
                  - type: object
                    properties:
                      localization:
                        $schema: https://json-schema.org/draft/2020-12/schema
                        type: object
                        properties:
                          dateFormat:
                            type: string
                            enum:
                              - day-short-month-year
                              - short-month-day-year
                              - year-month-day
                              - day-month-year
                              - month-day-year
                          timeFormat:
                            type: string
                            enum:
                              - 24-hour
                              - 12-hour
                              - 24-hour-seconds
                              - 12-hour-seconds
                          timeZone:
                            type: string
                          timestamps:
                            type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              type: object
                              properties:
                                date:
                                  type: string
                                time:
                                  type:
                                    - string
                                    - 'null'
                                dateTime:
                                  type:
                                    - string
                                    - 'null'
                                timeZone:
                                  type: string
                                zoneLabel:
                                  type: string
                                epochMilliseconds:
                                  type: number
                                inputDateTime:
                                  type:
                                    - string
                                    - 'null'
                              required:
                                - date
                                - time
                                - dateTime
                                - timeZone
                                - zoneLabel
                                - epochMilliseconds
                                - inputDateTime
                              additionalProperties: false
                        required:
                          - dateFormat
                          - timeFormat
                          - timeZone
                          - timestamps
                        additionalProperties: false
                    required:
                      - localization
        '400':
          $ref: '#/components/responses/ApiError'
        '401':
          $ref: '#/components/responses/ApiError'
        '403':
          $ref: '#/components/responses/ApiError'
        '404':
          $ref: '#/components/responses/ApiError'
        '409':
          $ref: '#/components/responses/ApiError'
        '413':
          $ref: '#/components/responses/ApiError'
        '422':
          $ref: '#/components/responses/ApiError'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/ApiError'
      security:
        - bearerAuth: []
components:
  schemas:
    Response_273:
      type: object
      properties:
        canManage:
          type: boolean
        configuration:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_274'
        connection:
          anyOf:
            - type: 'null'
            - $ref: '#/components/schemas/Response_275'
            - $ref: '#/components/schemas/Response_277'
        previewReporting:
          $ref: '#/components/schemas/Response_279'
      required:
        - canManage
        - configuration
        - connection
        - previewReporting
    Response_274:
      type: object
      properties:
        appId:
          type: string
        appSlug:
          type: string
        source:
          type: string
          const: environment
      required:
        - appId
        - appSlug
        - source
    Response_275:
      type: object
      properties:
        permissionReadiness:
          $ref: '#/components/schemas/Response_276'
        accountLogin:
          type: string
        accountType:
          type: string
        id:
          type: string
        installationId:
          type: string
        suspendedAt:
          anyOf:
            - type: 'null'
            - type: string
              format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - permissionReadiness
        - accountLogin
        - accountType
        - id
        - installationId
        - suspendedAt
        - updatedAt
    Response_277:
      type: object
      properties:
        permissionReadiness:
          $ref: '#/components/schemas/Response_278'
        accountLogin:
          type: string
        accountType:
          type: string
        id:
          type: string
        installationId:
          type: string
        suspendedAt:
          anyOf:
            - type: 'null'
            - type: string
              format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - permissionReadiness
        - accountLogin
        - accountType
        - id
        - installationId
        - suspendedAt
        - updatedAt
    Response_279:
      type: object
      properties:
        failedCount:
          type: number
        lastError:
          anyOf:
            - type: 'null'
            - type: string
        lastFailedAt:
          anyOf:
            - type: 'null'
            - type: string
              format: date-time
      required:
        - failedCount
        - lastError
        - lastFailedAt
    Response_276:
      type: object
      properties:
        status:
          type: string
          const: unavailable
      required:
        - status
    Response_278:
      type: object
      properties:
        status:
          type: string
          const: available
        contents:
          anyOf:
            - type: string
              const: none
            - type: string
              const: read
            - type: string
              const: write
        deployments:
          anyOf:
            - type: string
              const: none
            - type: string
              const: read
            - type: string
              const: write
        preview:
          anyOf:
            - type: string
              const: ready
            - type: string
              const: missing
        pullRequests:
          anyOf:
            - type: string
              const: none
            - type: string
              const: read
            - type: string
              const: write
      required:
        - status
        - contents
        - deployments
        - preview
        - pullRequests
  responses:
    ApiError:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
    RateLimited:
      description: Request failed. The error object contains code, message, and requestId.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: object
                required:
                  - code
                  - message
                  - requestId
                properties:
                  code:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
      headers:
        Retry-After:
          description: Seconds before retrying
          schema:
            type: integer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Towbar API key

````