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

# Create new project

> CreateProject creates a new project.




## OpenAPI

````yaml /openapi/platform-api.yaml post /o/{organisation_id}/projects
openapi: 3.1.0
info:
  title: Versori Platform API
  version: 0.0.1
  license:
    name: UNLICENSED
servers:
  - description: Production
    url: https://platform.versori.com/api/v2
  - description: Staging
    url: https://platform-staging.versori.com/api/v2
  - description: Development
    url: http://localhost:8901
security:
  - bearerToken: []
  - cookie: []
paths:
  /o/{organisation_id}/projects:
    parameters:
      - $ref: '#/components/parameters/organisation_id'
    post:
      tags:
        - projects
      summary: Create new project
      description: |
        CreateProject creates a new project.
      operationId: CreateProject
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProjectCreate'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        default:
          description: Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    organisation_id:
      name: organisation_id
      in: path
      required: true
      schema:
        type: string
        format: ulid
        x-go-type: ulid.ULID
        x-go-name: OrganisationID
        x-go-type-import:
          path: versori.dev/vergo/ulid
  schemas:
    ProjectCreate:
      description: ProjectCreate is the request body for creating a new Project.
      type: object
      properties:
        name:
          type: string
          description: Name is the name of the project.
        executionPool:
          type: string
          description: >-
            The name of the execution pool used to deploy this project. This
            cannot be changed later.
          x-go-type-skip-optional-pointer: true
      required:
        - name
    Project:
      description: >
        The Project represents a deployable unit within our platform that
        includes both the functional components (files) and configuration. It
        serves as the backbone of custom or predefined functionalities, allowing
        organizations to create, update, and manage APIs and projects.
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the project.
          format: ulid
          x-go-name: ID
          x-go-type: ulid.ULID
          x-go-type-import:
            path: versori.dev/vergo/ulid
        environments:
          type: array
          description: |
            List of environments for the project.
          items:
            $ref: '#/components/schemas/ProjectEnvironment'
        name:
          type: string
        currentFiles:
          $ref: '#/components/schemas/Files'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        dynamicVariablesSchema:
          $ref: '#/components/schemas/DynamicVariablesSchema'
        settings:
          $ref: '#/components/schemas/ProjectSettings'
        metadata:
          $ref: '#/components/schemas/ProjectMetadata'
      required:
        - id
        - name
        - environments
        - createdAt
        - updatedAt
        - currentFiles
        - settings
        - metadata
    Error:
      type: object
      properties:
        code:
          type: string
          description: Code is a machine-readable error code.
        message:
          type: string
          description: Message is a human-readable error message.
        fields:
          type: array
          items:
            $ref: '#/components/schemas/ErrorField'
          x-go-type-skip-optional-pointer: true
        details:
          type: string
          x-go-type-skip-optional-pointer: true
      required:
        - code
        - message
    ProjectEnvironment:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the environment.
          format: ulid
          x-go-name: ID
          x-go-type: ulid.ULID
          x-go-type-import:
            path: versori.dev/vergo/ulid
        name:
          type: string
        status:
          type: string
          description: One of running|suspended|error|draft.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        publicUrl:
          type: string
        executionPool:
          type: string
          description: The name of the execution pool used to deploy this environment.
          x-go-type-skip-optional-pointer: true
        files:
          type: array
          description: The currently deployed files for the environment.
          items:
            $ref: '#/components/schemas/File'
          x-go-type-skip-optional-pointer: true
        labels:
          $ref: '#/components/schemas/Labels'
        config:
          $ref: '#/components/schemas/EnvironmentConfig'
        deployedVersion:
          $ref: '#/components/schemas/ProjectVersion'
      required:
        - id
        - name
        - status
        - createdAt
        - updatedAt
        - publicUrl
        - lastDeployedAt
        - config
    Files:
      type: object
      properties:
        files:
          type: array
          description: The files associated with the project.
          items:
            $ref: '#/components/schemas/File'
        labels:
          type: object
          description: >
            The labels associated with the project. Labels are stored as
            key-value pairs.

            Only string-string values are allowed
          x-go-type: map[string]string
          x-go-type-skip-optional-pointer: true
      required:
        - files
        - labels
    DynamicVariablesSchema:
      description: >
        DynamicVariablesSchema is the JSON schema for the project's dynamic
        variables.
      type: object
      x-go-type-skip-optional-pointer: true
      x-go-type: json.RawMessage
    ProjectSettings:
      description: ProjectSettings hold configuration for the project
      type: object
      properties:
        acceptCodeChangesAutomatically:
          type: boolean
        testingMockWithAI:
          description: >
            TestingMockWithAI is a flag that indicates whether the project
            should use AI to mock in the testing environment 

            or use the connection configured on the project. It defaults to
            using the configured connections
          type: boolean
        planningChatVersion:
          description: Version tag for the planning chat feature
          type: string
        chatStoredInDB:
          description: >
            ChatStoredInDB is a flag that indicates whether chat messages are
            stored in the database

            rather than in NATS. Defaults to false (NATS).
          type: boolean
    ProjectMetadata:
      description: ProjectMetadata hold metadata for the project
      type: object
      properties:
        sentimentHistory:
          type: array
          items:
            $ref: '#/components/schemas/Sentiment'
          x-go-type-skip-optional-pointer: true
    ErrorField:
      description: ErrorField denotes a field which has an error.
      type: object
      properties:
        field:
          type: string
          description: >
            Field is the name of the field which has an error, this may be a
            path to a nested field, including array

            elements. The format of this field is of the form:
            "field1.field2[0].field3"
        message:
          type: string
          description: Message is the error message for this specific field.
      required:
        - field
        - message
    File:
      type: object
      properties:
        filename:
          type: string
          description: The name of the file.
        content:
          type: string
          description: The content of the file.
      required:
        - filename
        - content
    Labels:
      type: object
      description: >
        Labels is a map of key-value pairs that can be used to store arbitrary
        metadata about a resource.

        Keys must start with a letter and can only contain letters, numbers, and
        underscores.

        Values can be any string.
      x-go-type: map[string]string
      x-go-type-skip-optional-pointer: true
    EnvironmentConfig:
      type: object
      properties:
        deploymentSpec:
          $ref: '#/components/schemas/DeploymentSpec'
    ProjectVersion:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier for the version.
          format: ulid
          x-go-name: ID
          x-go-type: ulid.ULID
          x-go-type-skip-optional-pointer: true
          x-go-type-import:
            path: versori.dev/vergo/ulid
        name:
          type: string
          x-go-type-skip-optional-pointer: true
          description: >
            The short name for this version. This name must be unique within
            this project.
        description:
          type: string
          x-go-type-skip-optional-pointer: true
          description: |
            The description of this version.
        labels:
          type: object
          x-go-type-skip-optional-pointer: true
          x-go-type: map[string]string
          description: |
            Key-value pairs of strings.
        state:
          $ref: '#/components/schemas/VersionState'
        createdAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - state
        - createdAt
    Sentiment:
      description: Sentiment is the sentiment of a project
      type: object
      properties:
        timestamp:
          type: string
          format: date-time
        sentimentScore:
          type: integer
        messageId:
          type: string
          x-go-name: MessageID
      required:
        - timestamp
        - sentimentScore
        - messageId
    DeploymentSpec:
      type: object
      properties:
        replicas:
          type: integer
        autoscaling:
          $ref: '#/components/schemas/DeploymentAutoscaling'
          x-go-type-skip-optional-pointer: true
        staticIP:
          type: boolean
          description: >
            If set to true it will configure the environment to use the static
            IP for the execution pool selected by the environment.
        resources:
          $ref: '#/components/schemas/Resources'
        serviceAccountName:
          type: string
    VersionState:
      type: string
      description: The state of the version.
      enum:
        - draft
        - failed
        - ready
        - superseded
    DeploymentAutoscaling:
      type: object
      properties:
        maxReplicas:
          type: integer
          description: >-
            The maximum number of replicas that can be created for this
            environment. When this is configured autoscaling will be enabled for
            the environment.
    Resources:
      type: object
      properties:
        limits:
          $ref: '#/components/schemas/ResourceRequirements'
        requests:
          $ref: '#/components/schemas/ResourceRequirements'
    ResourceRequirements:
      type: object
      properties:
        cpu:
          type: string
        memory:
          type: string
  securitySchemes:
    bearerToken:
      description: >
        Bearer token authentication used by the Versori Platform. External
        consumers must provide an API key, however

        internal consumers must provide a JWT id_token issued by our IdP.
      type: http
      scheme: bearer
    cookie:
      description: Cookie authentication used by the Versori Platform.
      type: apiKey
      in: cookie
      name: cookie

````