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

# Create Application Api Endpoint



## OpenAPI

````yaml https://platform.ankra.app/openapi.json post /api/v1/org/applications
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://platform.ankra.app
security: []
paths:
  /api/v1/org/applications:
    post:
      tags:
        - Applications API
      summary: Create Application Api Endpoint
      operationId: create_application_api_endpoint_api_v1_org_applications_post
      parameters:
        - in: header
          name: authorization
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Authorization
        - in: header
          name: x-ankra-organisation-id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Ankra-Organisation-Id
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateApplicationRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateApplicationResponse'
          description: Successful Response
        '401':
          description: Unauthorized
        '404':
          description: Not found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
components:
  schemas:
    CreateApplicationRequest:
      properties:
        app_repo_branch:
          default: main
          title: App Repo Branch
          type: string
        app_repo_credential_name:
          title: App Repo Credential Name
          type: string
        app_repo_name:
          title: App Repo Name
          type: string
        app_repo_owner:
          title: App Repo Owner
          type: string
        image_registry:
          anyOf:
            - $ref: '#/components/schemas/ApplicationImageRegistry'
            - type: 'null'
          description: >-
            Registry this application publishes to. Omit to publish to the
            organisation's own registry project.
          title: Image Registry
        name:
          title: Name
          type: string
      required:
        - name
        - app_repo_credential_name
        - app_repo_owner
        - app_repo_name
      title: CreateApplicationRequest
      type: object
    CreateApplicationResponse:
      properties:
        errors:
          default: []
          items:
            $ref: '#/components/schemas/usecase__application__models__ResourceError'
          title: Errors
          type: array
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
      title: CreateApplicationResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ApplicationImageRegistry:
      properties:
        admin_credential_name:
          description: >-
            Registry credential of this organisation that may administer robot
            accounts on the declared project. Setting it lets Ankra mint, rotate
            and revoke a push robot for the application on a registry the
            organisation operates.
          title: Admin Credential Name
          type: string
        api_url:
          description: Registry management API base. Defaults to https://<host>.
          title: Api Url
          type: string
        credential_name:
          description: >-
            Registry credential of this organisation that authenticates to the
            registry.
          title: Credential Name
          type: string
        component_repositories:
          additionalProperties:
            type: string
          description: >-
            Repository inside the project for a component, keyed by component
            name (a single-component application is keyed by its repository
            name), for a registry whose layout follows neither Ankra's nesting
            nor the flat component name. Unnamed components keep the derived
            path.
          title: Component Repositories
          type: object
        flat_repositories:
          default: false
          description: >-
            Publish monorepo components straight under the project
            (<project>/<component>) instead of <project>/<app>/<component>,
            matching a registry whose repositories were laid out flat before
            Ankra.
          title: Flat Repositories
          type: boolean
        manage_actions_secrets:
          default: false
          description: >-
            Let Ankra write the declared credential into the repository Actions
            secrets.
          title: Manage Actions Secrets
          type: boolean
        password_secret_name:
          description: Repository Actions secret holding the registry password.
          title: Password Secret Name
          type: string
        pull_secret_name:
          description: >-
            Kubernetes dockerconfigjson Secret the generated manifests pull
            with.
          title: Pull Secret Name
          type: string
        url:
          description: Registry project the images publish to, as oci://<host>/<project>.
          title: Url
          type: string
        username_secret_name:
          description: Repository Actions secret holding the registry username.
          title: Username Secret Name
          type: string
      title: ApplicationImageRegistry
      type: object
    usecase__application__models__ResourceError:
      properties:
        errors:
          default: []
          items:
            $ref: '#/components/schemas/ErrorItem'
          title: Errors
          type: array
        kind:
          type: string
          title: Kind
        name:
          title: Name
          type: string
      required:
        - name
        - kind
      title: ResourceError
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    ErrorItem:
      properties:
        key:
          type: string
          title: Key
        message:
          title: Message
          type: string
      required:
        - key
        - message
      title: ErrorItem
      type: object

````