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

# Create an app

> Create an app and its source repository, with the starter for the selected shape committed to `main`. Clone source.gitUrl, commit and push, build the release bundle with the starter’s build-release.mjs, upload it with createAppReleaseUpload and deploy it with createAppDeployment. Creation deploys nothing. The ID is immutable and is the retry key: after a lost response, get the app; an existing ID returns 409 app_exists.

Alpha: this operation may change or be removed without notice.



## OpenAPI

````yaml /openapi.json post /apps/apps
openapi: 3.0.3
info:
  title: Effective API
  version: 2.0.0
  description: The public Effective REST API. Authenticate using an Effective API key.
servers:
  - url: https://api.effectiveai.app/api/v2
    description: Production
security:
  - bearerAuth: []
paths:
  /apps/apps:
    post:
      tags:
        - Apps
      summary: Create an app
      description: >-
        Create an app and its source repository, with the starter for the
        selected shape committed to `main`. Clone source.gitUrl, commit and
        push, build the release bundle with the starter’s build-release.mjs,
        upload it with createAppReleaseUpload and deploy it with
        createAppDeployment. Creation deploys nothing. The ID is immutable and
        is the retry key: after a lost response, get the app; an existing ID
        returns 409 app_exists.


        Alpha: this operation may change or be removed without notice.
      operationId: createApp
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/V2AppCreate'
      responses:
        '201':
          description: The new app.
          headers:
            Location:
              schema:
                type: string
              required: true
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2App'
        '400':
          description: Invalid request, or invalid_app_id.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '401':
          description: Authentication required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '403':
          description: >-
            You lack the permission this needs on the app, or are a read-only
            member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '404':
          description: The Mission Control this request was made in was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '409':
          description: 'app_exists: the ID is already in use in your organization.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '413':
          description: JSON request body exceeds 64 KiB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '415':
          description: Content-Type must be application/json.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
        '503':
          description: Temporarily unavailable; retry later.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/V2CodedError'
      security:
        - bearerAuth: []
components:
  schemas:
    V2AppCreate:
      type: object
      properties:
        id:
          type: string
          maxLength: 63
          pattern: ^app-[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
          description: >-
            App ID: `app-` followed by lowercase letters, digits and hyphens,
            ending in a letter or digit. It is part of the app’s hostname, so
            your organization’s subdomain and the ID together must fit 63
            characters.
        shape:
          type: string
          enum:
            - full
            - service
            - instructions
          default: full
        title:
          type: string
          minLength: 1
          maxLength: 120
          pattern: '^[^\x00-\x1f\x7f-\x9f\s]+(?: [^\x00-\x1f\x7f-\x9f\s]+)*$'
          description: Display title; defaults to the ID.
        description:
          type: string
          maxLength: 1000
          description: Catalog description.
        iconEmoji:
          type: string
          minLength: 1
          maxLength: 16
          description: A single emoji, such as 📊.
        iconUrl:
          type: string
          maxLength: 2048
          format: uri
          description: HTTPS URL of an icon image.
        visibility:
          type: string
          enum:
            - private
            - team
          description: >-
            Defaults to `team`. An app governed by a Mission Control is always
            `private`.
      required:
        - id
      additionalProperties: false
    V2App:
      type: object
      properties:
        id:
          type: string
          maxLength: 63
          pattern: ^app-[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$
          description: >-
            App ID: `app-` followed by lowercase letters, digits and hyphens,
            ending in a letter or digit. It is part of the app’s hostname, so
            your organization’s subdomain and the ID together must fit 63
            characters.
        title:
          type: string
          description: Display title; the ID when no title was set.
        description:
          type: string
          nullable: true
          description: Catalog description, or null.
        iconEmoji:
          type: string
          nullable: true
          description: Emoji icon, or null.
        iconUrl:
          type: string
          nullable: true
          description: Icon image URL, or null.
        visibility:
          type: string
          enum:
            - private
            - team
          description: >-
            `team` lists the app for your organization; `private` lists it only
            for people granted access.
        public:
          type: boolean
          description: True when anyone with the link can open the app without signing in.
        managed:
          type: boolean
          description: >-
            True when the app was installed from the app store. A managed app
            has no source of its own and cannot be deployed from a bundle.
        liveDeploymentId:
          type: string
          nullable: true
          description: >-
            The deployment the app serves now, or null before its first
            deployment.
        url:
          type: string
          nullable: true
          format: uri
          description: >-
            Where the app’s interface opens, or null when it has no interface or
            no deployment yet.
        webUrl:
          type: string
          format: uri
          description: 'The app’s page in Effective: activity, access and settings.'
        source:
          type: object
          nullable: true
          properties:
            gitUrl:
              type: string
              format: uri
              description: >-
                HTTPS Git remote of the app’s source repository. Authenticate
                with your API key as the password; any username works. Push one
                branch at a time; pushes to `main` must fast-forward.
            defaultBranch:
              type: string
              enum:
                - main
              description: >-
                The branch that holds the source meant to be live.
                createAppDeployment leaves Git unchanged. publishAppBranch
                merges into this branch.
          required:
            - gitUrl
            - defaultBranch
          additionalProperties: false
          description: >-
            Where to clone and push the app’s source, when you have `build`
            permission; null otherwise and for an app installed from the app
            store.
        shape:
          type: string
          enum:
            - full
            - service
            - instructions
          description: The app shape, including before deployment.
        archived:
          type: boolean
          description: >-
            Archived apps stop execution and use existing owner, tenant
            administrator or governing Mission Control editor restore
            permissions.
        runtimeState:
          type: string
          enum:
            - not_deployed
            - ready
            - recovering
            - unavailable
            - archived
        previousSuccessfulDeploymentId:
          type: string
          nullable: true
          format: uuid
        latestDeploymentId:
          type: string
          nullable: true
          format: uuid
          description: >-
            The newest deployment, live or not; find a deployment whose response
            was lost.
        runtimeUrl:
          type: string
          nullable: true
          format: uri
        mcpUrl:
          type: string
          nullable: true
          format: uri
        capabilities:
          type: array
          items:
            type: string
        configurationBlockers:
          type: array
          nullable: true
          items:
            type: object
            properties:
              kind:
                type: string
                enum:
                  - secret
                  - connection
                  - authorization
              name:
                type: string
              code:
                type: string
              message:
                type: string
            required:
              - kind
              - name
              - code
              - message
            additionalProperties: false
          description: >-
            Caller-specific blockers; null when not evaluated, including list
            responses.
        permissions:
          type: array
          items:
            type: string
            enum:
              - run
              - build
              - publish
              - manage
            description: >-
              `run` opens and uses the app; `build` reads and writes its source,
              secrets and logs; `publish` uploads release bundles, deploys and
              sets the live deployment; `manage` changes access in Effective.
          description: >-
            What you can do with the app. Lists and reads include only apps you
            can `run`; a new app may lack it.
      required:
        - id
        - title
        - description
        - iconEmoji
        - iconUrl
        - visibility
        - public
        - managed
        - liveDeploymentId
        - url
        - webUrl
        - source
        - shape
        - archived
        - runtimeState
        - previousSuccessfulDeploymentId
        - latestDeploymentId
        - runtimeUrl
        - mcpUrl
        - capabilities
        - configurationBlockers
        - permissions
      additionalProperties: false
    V2CodedError:
      allOf:
        - $ref: '#/components/schemas/V2Error'
        - type: object
          properties:
            code:
              type: string
              minLength: 1
              description: Stable error code. Clients must tolerate unknown future codes.
            details:
              type: array
              items:
                type: object
                properties:
                  location:
                    type: string
                    enum:
                      - path
                      - query
                      - header
                      - body
                  path:
                    type: array
                    items:
                      type: string
                      maxLength: 64
                    maxItems: 12
                  code:
                    type: string
                    enum:
                      - required
                      - invalid_type
                      - invalid_value
                      - unknown_field
                  message:
                    type: string
                    minLength: 1
                    maxLength: 200
                required:
                  - location
                  - path
                  - code
                  - message
              minItems: 1
              maxItems: 20
              description: Bounded safe validation issues; may omit some invalid fields.
            requestId:
              type: string
              minLength: 1
              maxLength: 128
              description: >-
                Existing server correlation for this HTTP attempt, when
                available.
            dataset:
              type: string
              enum:
                - naic
                - osha
              description: Dataset needed for dataset_not_enabled.
            businessCode:
              type: string
              description: The rater’s own refusal code, for business_rejection.
            violations:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                    description: Authored or built-in constraint code
                  message:
                    type: string
                    description: Authored message for the failed constraint
                  path:
                    type: string
                    description: Input path of the offending value; empty for the request
                  value:
                    nullable: true
                    description: Offending input value, size-bounded by the runtime
                  constraint:
                    type: string
                    description: The constraint the value failed, as text
                  cite:
                    type: string
                    nullable: true
                    description: >-
                      Filing citation of the constraint, when the source cites
                      one
                required:
                  - code
                  - message
                  - path
                  - value
                  - constraint
                  - cite
                additionalProperties: false
              maxItems: 256
              description: >-
                Each input constraint the submission failed, for invalid_inputs
                and business_rejection.
            violationsTruncated:
              type: boolean
              description: >-
                True when the rater reported more violations than violations
                holds.
            executionId:
              type: string
              description: >-
                The recorded execution of a failed rating, for rater rating
                failures.
            accessUrl:
              type: string
              nullable: true
              format: uri
              description: Not currently returned.
          required:
            - code
    V2Error:
      type: object
      properties:
        error:
          type: string
          minLength: 1
          description: Human-readable explanation of the failure.
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Effective API key. Send Authorization: Bearer sk-eai-...'

````

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