Layero Github App API

The github-app API from Layero — 11 operation(s) for github-app.

GitHub OpenAPI

Operations 12

POST /github-app/install/start Install Start Json #
GET /github-app/install/start Install Start #
POST /github-app/install/identify Install Identify Start #
GET /github-app/install/lookup-org Install Lookup Org #
GET /github-app/install/eligible-targets Install Eligible Targets #
GET /github-app/install/callback Install Callback #
GET /github-app/installations/{org_slug} List Installations For Org #
GET /github-app/installations/{org_slug}/pending List Pending Installs #
DELETE /github-app/installations/{org_slug}/pending/{pending_id} Cancel Pending Install #
GET /github-app/installations/{org_slug}/{installation_id}/repos List Repos For Installation #
DELETE /github-app/installations/{org_slug}/{installation_id} Disconnect Specific Installation #
POST /github-app/installations/{org_slug}/disconnect Disconnect Primary Installation #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/layero-ru:layero-ru-github-app-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

layero-ru-github-app-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Layero Github App API
  version: 0.1.0
tags:
- name: github-app
paths:
  /github-app/install/start:
    post:
      tags:
      - github-app
      summary: Install Start Json
      description: 'Mint an install URL for the dashboard XHR flow.


        Optionally pinned to a specific GitHub target (User or Organization id).

        The dashboard exposes a picker fed by `/install/eligible-targets` so the

        user can pick a GitHub Org directly, bypassing GitHub''s "auto-pick the

        personal account" UX trap when the App is private or the org has

        restricted third-party access.


        `target_login` is the GitHub login the user picked — captured into

        the state JWT so a `setup_action=request` flow can record a pending

        row keyed by login. Without it the pending → `installation.created`

        webhook match wouldn''t have an anchor.


        `return_to` is a whitelisted dashboard path (`/new`, `/account/team`,

        `/account`) that the callback will redirect to after a successful

        install. Lets the New Project page round-trip the user back without

        them losing their import context.'
      operationId: install_start_json_github_app_install_start_post
      parameters:
      - name: org_slug
        in: query
        required: true
        schema:
          type: string
          title: Org Slug
      - name: target_id
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Target Id
      - name: target_type
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Type
      - name: target_login
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Login
      - name: return_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Return To
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstallStartOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - github-app
      summary: Install Start
      description: 'Begin the install flow for `org_slug` via 302 redirect.


        Kept for CLI / curl / direct-link flows. The dashboard uses the POST

        variant above because anchor clicks don''t carry our localStorage JWT.'
      operationId: install_start_github_app_install_start_get
      parameters:
      - name: org_slug
        in: query
        required: true
        schema:
          type: string
          title: Org Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/install/identify:
    post:
      tags:
      - github-app
      summary: Install Identify Start
      description: 'Начать проверку «кто вы на GitHub» перед установкой (SUP_228).


        Для аккаунтов, вошедших почтой или Яндексом: их GitHub нам неизвестен, и

        прямой переход на установку заводил в тупик, когда приложение на их

        GitHub уже стояло. Отдаём адрес верхнеуровневого перехода с билетом на

        пять минут; сессионный токен в адрес не кладём. Сам вход и ответ —

        `/auth/github/identify/start` и `services/github_identify.py`.'
      operationId: install_identify_start_github_app_install_identify_post
      parameters:
      - name: org_slug
        in: query
        required: true
        schema:
          type: string
          title: Org Slug
      - name: return_to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Return To
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IdentifyStartOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/install/lookup-org:
    get:
      tags:
      - github-app
      summary: Install Lookup Org
      description: 'Resolve a GitHub Organization login → install target metadata.


        Used when the user''s OAuth token lacks `read:org` scope and the

        `/eligible-targets` endpoint can''t enumerate their orgs. The user

        types an org name in the dashboard, we look it up via the App JWT

        (which doesn''t need user OAuth at all) and hand back a target_id

        they can use to start a targeted install.


        Returns 404 if the org doesn''t exist or is private and the App

        can''t see it.'
      operationId: install_lookup_org_github_app_install_lookup_org_get
      parameters:
      - name: login
        in: query
        required: true
        schema:
          type: string
          title: Login
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LookupOrgOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/install/eligible-targets:
    get:
      tags:
      - github-app
      summary: Install Eligible Targets
      description: 'List GitHub accounts the user could install the App on.


        Returns the user''s personal GitHub identity (always installable when

        public App) + every GitHub Organization they''re a member of (installable

        if they''re admin; otherwise the install becomes a request the owner

        must approve).


        Requires the user has a stored OAuth token (`users.github_token`). For

        accounts that signed up via Google/Yandex without linking GitHub we

        return `has_oauth_token=false` and the dashboard falls back to the

        plain (non-targeted) install URL.'
      operationId: install_eligible_targets_github_app_install_eligible_targets_get
      parameters:
      - name: org_slug
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Org Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EligibleTargetsOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/install/callback:
    get:
      tags:
      - github-app
      summary: Install Callback
      description: 'GitHub redirects here after a successful install (or "configure").


        `setup_action` is `install` (fresh install), `update` (granted access to

        more repos), or `request` (org owner needs to approve — no

        installation_id yet). We don''t trust query params blindly: state is

        JWT-signed by us so a malicious URL can''t attach an arbitrary

        installation to someone else''s org.


        On `request` we record a pending row keyed by the target login from

        the state JWT, so the eventual `installation.created` webhook (fired

        when the org owner approves) can backfill the installation. The user

        sees a "awaiting approval" badge in the dashboard meanwhile.'
      operationId: install_callback_github_app_install_callback_get
      parameters:
      - name: setup_action
        in: query
        required: false
        schema:
          type: string
          default: ''
          title: Setup Action
      - name: state
        in: query
        required: true
        schema:
          type: string
          title: State
      - name: installation_id
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Installation Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}:
    get:
      tags:
      - github-app
      summary: List Installations For Org
      description: 'All GitHub App installations linked to this Layero org.


        Used by the dashboard to render the account-switcher dropdown above

        the repo picker (Vercel-style: one installation per dropdown entry).

        Member-level access is enough — non-admins still need to *see* repo

        sources to import projects.'
      operationId: list_installations_for_org_github_app_installations__org_slug__get
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InstallationsOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}/pending:
    get:
      tags:
      - github-app
      summary: List Pending Installs
      description: 'Active install requests awaiting org-admin approval.


        Populated when a non-admin user clicks Install on a GitHub Organization

        that restricts third-party apps. The dashboard renders these as

        "awaiting approval" entries next to the installed accounts so users

        don''t think their install vanished.'
      operationId: list_pending_installs_github_app_installations__org_slug__pending_get
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PendingInstallsOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}/pending/{pending_id}:
    delete:
      tags:
      - github-app
      summary: Cancel Pending Install
      description: 'Withdraw a pending install request.


        Doesn''t notify GitHub — there''s no API to cancel an install request

        on their side. The org owner''s approval email is harmless; if they

        approve it later, the resulting `installation.created` webhook will

        miss the consumed pending row and fall through to the orphan branch

        (logged + ignored), which is the correct outcome.'
      operationId: cancel_pending_install_github_app_installations__org_slug__pending__pending_id__delete
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: pending_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Pending Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}/{installation_id}/repos:
    get:
      tags:
      - github-app
      summary: List Repos For Installation
      description: 'Repos accessible to a specific installation linked to this org.


        The repo picker UI calls this with the installation_id the user picked

        in the account-switcher dropdown, so they only see repos from the

        chosen GitHub account/organization — no mixing of personal and org

        repos in one list.'
      operationId: list_repos_for_installation_github_app_installations__org_slug___installation_id__repos_get
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: installation_id
        in: path
        required: true
        schema:
          type: integer
          title: Installation Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  additionalProperties: true
                title: Response List Repos For Installation Github App Installations  Org Slug   Installation Id  Repos Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}/{installation_id}:
    delete:
      tags:
      - github-app
      summary: Disconnect Specific Installation
      description: 'Detach one specific installation from this Layero org.


        Doesn''t uninstall the App on GitHub — that''s a separate destructive

        action on github.com. Other installations linked to this org stay in

        place. If this was the "primary" installation (the one in the legacy

        `organizations.github_app_installation_id` column), we either promote

        another installation to primary, or null out the legacy column when

        no installations remain.'
      operationId: disconnect_specific_installation_github_app_installations__org_slug___installation_id__delete
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: installation_id
        in: path
        required: true
        schema:
          type: integer
          title: Installation Id
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /github-app/installations/{org_slug}/disconnect:
    post:
      tags:
      - github-app
      summary: Disconnect Primary Installation
      operationId: disconnect_primary_installation_github_app_installations__org_slug__disconnect_post
      parameters:
      - name: org_slug
        in: path
        required: true
        schema:
          type: string
          title: Org Slug
      - name: authorization
        in: header
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Authorization
      responses:
        '204':
          description: Successful Response
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    IdentifyStartOut:
      properties:
        url:
          type: string
          title: Url
      type: object
      required:
      - url
      title: IdentifyStartOut
    InstallStartOut:
      properties:
        install_url:
          type: string
          title: Install Url
      type: object
      required:
      - install_url
      title: InstallStartOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    EligibleTargetsOut:
      properties:
        targets:
          items:
            $ref: '#/components/schemas/EligibleTarget'
          type: array
          title: Targets
        has_oauth_token:
          type: boolean
          title: Has Oauth Token
        has_read_org_scope:
          type: boolean
          title: Has Read Org Scope
          default: false
        reauthorize_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Reauthorize Url
      type: object
      required:
      - targets
      - has_oauth_token
      title: EligibleTargetsOut
    PendingInstallsOut:
      properties:
        pending:
          items:
            $ref: '#/components/schemas/PendingInstallOut'
          type: array
          title: Pending
      type: object
      required:
      - pending
      title: PendingInstallsOut
    InstallationsOut:
      properties:
        installations:
          items:
            $ref: '#/components/schemas/InstallationOut'
          type: array
          title: Installations
      type: object
      required:
      - installations
      title: InstallationsOut
    LookupOrgOut:
      properties:
        target_id:
          type: integer
          title: Target Id
        target_type:
          type: string
          title: Target Type
        login:
          type: string
          title: Login
        avatar_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Avatar Url
      type: object
      required:
      - target_id
      - target_type
      - login
      title: LookupOrgOut
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    InstallationOut:
      properties:
        installation_id:
          type: integer
          title: Installation Id
        account_login:
          type: string
          title: Account Login
        account_type:
          type: string
          title: Account Type
        installed_at:
          type: string
          title: Installed At
        suspended_at:
          anyOf:
          - type: string
          - type: 'null'
          title: Suspended At
        configure_url:
          type: string
          title: Configure Url
      type: object
      required:
      - installation_id
      - account_login
      - account_type
      - installed_at
      - configure_url
      title: InstallationOut
    PendingInstallOut:
      properties:
        id:
          type: string
          title: Id
        requested_target_login:
          type: string
          title: Requested Target Login
        requested_target_type:
          type: string
          title: Requested Target Type
        requested_by_user_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Requested By User Id
        requested_at:
          type: string
          title: Requested At
        expires_at:
          type: string
          title: Expires At
      type: object
      required:
      - id
      - requested_target_login
      - requested_target_type
      - requested_at
      - expires_at
      title: PendingInstallOut
      description: A request awaiting org-admin approval on github.com.
    EligibleTarget:
      properties:
        target_id:
          type: integer
          title: Target Id
        target_type:
          type: string
          title: Target Type
        login:
          type: string
          title: Login
        avatar_url:
          anyOf:
          - type: string
          - type: 'null'
          title: Avatar Url
        connection:
          anyOf:
          - type: string
          - type: 'null'
          title: Connection
      type: object
      required:
      - target_id
      - target_type
      - login
      title: EligibleTarget
      description: A GitHub account/org the user could install the App on.