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

# Set App Source

> Make the customer's GitHub repo the app's source; a push to its branch deploys dev.



## OpenAPI

````yaml https://api.getfloo.com/openapi.json put /v1/apps/{app_id}/source
openapi: 3.1.0
info:
  title: floo API
  version: 0.1.0
servers:
  - url: https://api.getfloo.com
security: []
paths:
  /v1/apps/{app_id}/source:
    put:
      tags:
        - apps
      summary: Set App Source
      description: >-
        Make the customer's GitHub repo the app's source; a push to its branch
        deploys dev.
      operationId: apps_set_app_source
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: App Id
        - $ref: '#/components/parameters/X-Floo-Org-Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppSourceRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppSourceChange'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  parameters:
    X-Floo-Org-Id:
      name: X-Floo-Org-Id
      in: header
      required: false
      schema:
        type: string
        format: uuid
      description: Organization to act in; defaults to the one joined most recently.
  schemas:
    AppSourceRequest:
      properties:
        kind:
          $ref: '#/components/schemas/AppSourceKind'
        repo:
          anyOf:
            - type: string
              maxLength: 200
              pattern: ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$
            - type: 'null'
          title: Repo
        branch:
          anyOf:
            - type: string
              maxLength: 255
              minLength: 1
            - type: 'null'
          title: Branch
        starter:
          type: boolean
          title: Starter
          default: false
      additionalProperties: false
      type: object
      required:
        - kind
      title: AppSourceRequest
      description: >-
        The code source a new app starts with.


        ``github`` connects the caller's repository: ``repo`` is required and
        ``branch``

        defaults to ``main``. ``floo`` creates a private repository floo hosts.
        It starts

        empty and the first push to ``branch`` (default ``main``) deploys it;
        ``starter``

        seeds it with floo's starter app on the starter's branch and deploys
        that now, for

        callers with no git, such as a chat.
    AppSourceChange:
      properties:
        app:
          type: string
          title: App
        source:
          $ref: '#/components/schemas/AppSource'
        previous:
          anyOf:
            - $ref: '#/components/schemas/AppSource'
            - type: 'null'
        archived_repo:
          anyOf:
            - type: string
            - type: 'null'
          title: Archived Repo
        message:
          type: string
          title: Message
      type: object
      required:
        - app
        - source
        - previous
        - archived_repo
        - message
      title: AppSourceChange
      description: >-
        What ``PUT /v1/apps/{app_id}/source`` changed.


        ``previous`` is the source before the call, null for an app that had
        none.

        ``archived_repo`` is the repo floo hosted for the app, archived by a
        move to

        GitHub; it is null when nothing was archived.
    ErrorResponse:
      properties:
        detail:
          $ref: '#/components/schemas/ErrorDetail'
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Body of every error response except request validation (422).
    AppSourceKind:
      type: string
      enum:
        - github
        - floo
      title: AppSourceKind
      description: Where an app's code lives.
    AppSource:
      properties:
        kind:
          $ref: '#/components/schemas/AppSourceKind'
        repo:
          type: string
          title: Repo
        branch:
          anyOf:
            - type: string
            - type: 'null'
          title: Branch
      type: object
      required:
        - kind
        - repo
        - branch
      title: AppSource
      description: |-
        Where an app's code lives: a push to ``branch`` of ``repo`` deploys dev.

        ``branch`` is null when floo cannot tell which branch deploys dev.
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      additionalProperties: true
      type: object
      required:
        - code
        - message
      title: ErrorDetail
      description: Standard error envelope with operation-specific JSON context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A `floo_` API key.

````

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