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

# Create project

> Create a new project. If there is an existing project with the same name as the one specified in the request, will return the existing project unmodified



## OpenAPI

````yaml /openapi.yaml post /v1/project
openapi: 3.1.1
info:
  version: 1.0.0
  title: Braintrust API
  description: >-
    API specification for the backend data server. The API is hosted globally at

    https://api.braintrust.dev or in your own environment.


    You can access the OpenAPI spec for this API at
    https://github.com/braintrustdata/braintrust-openapi.
  license:
    name: Apache 2.0
servers:
  - url: https://api.braintrust.dev
security:
  - bearerAuth: []
  - {}
paths:
  /v1/project:
    post:
      tags:
        - Projects
      summary: Create project
      description: >-
        Create a new project. If there is an existing project with the same name
        as the one specified in the request, will return the existing project
        unmodified
      operationId: postProject
      requestBody:
        description: Any desired information about the new project object
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProject'
      responses:
        '200':
          description: Returns the new project object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Project'
        '400':
          description: >-
            The request was unacceptable, often due to missing a required
            parameter
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema: {}
        '401':
          description: No valid API key provided
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema: {}
        '403':
          description: The API key doesn’t have permissions to perform the request
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema: {}
        '429':
          description: >-
            Too many requests hit the API too quickly. We recommend an
            exponential backoff of your requests
          headers:
            Retry-After:
              schema:
                type: string
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema: {}
        '500':
          description: Something went wrong on Braintrust's end. (These are rare.)
          content:
            text/plain:
              schema:
                type: string
            application/json:
              schema: {}
      security:
        - bearerAuth: []
        - {}
components:
  schemas:
    CreateProject:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Name of the project
        description:
          type:
            - string
            - 'null'
          description: Textual description of the project
        org_name:
          type:
            - string
            - 'null'
          description: >-
            For nearly all users, this parameter should be unnecessary. But in
            the rare case that your API key belongs to multiple organizations,
            you may specify the name of the organization the project belongs in.
        project_group_name:
          type:
            - string
            - 'null'
          minLength: 1
          description: >-
            Create the project within the named project group in this
            organization. Requires project_group:update on the group's
            definition.
      required:
        - name
    Project:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the project
        org_id:
          type: string
          format: uuid
          description: Unique id for the organization that the project belongs under
        name:
          type: string
          description: Name of the project
        description:
          type:
            - string
            - 'null'
          description: Textual description of the project
        created:
          type:
            - string
            - 'null'
          format: date-time
          description: Date of project creation
        deleted_at:
          type:
            - string
            - 'null'
          format: date-time
          description: Date of project deletion, or null if the project is still active
        user_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Identifies the user who created the project
        settings:
          $ref: '#/components/schemas/ProjectSettings'
      required:
        - id
        - org_id
        - name
    ProjectSettings:
      type:
        - object
        - 'null'
      properties:
        comparison_key:
          type:
            - string
            - 'null'
          description: The key used to join two experiments (defaults to `input`)
        baseline_experiment_id:
          type:
            - string
            - 'null'
          format: uuid
          description: >-
            The id of the experiment to use as the default baseline for
            comparisons
        spanFieldOrder:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              object_type:
                type: string
              column_id:
                type: string
              position:
                type: string
              layout:
                anyOf:
                  - type: string
                    enum:
                      - full
                  - type: string
                    enum:
                      - two_column
                  - type: 'null'
            required:
              - object_type
              - column_id
              - position
          description: The order of the fields to display in the trace view
        remote_eval_sources:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              url:
                type: string
              name:
                type:
                  - string
                  - 'null'
              description:
                type:
                  - string
                  - 'null'
            required:
              - url
          description: The remote eval sources to use for the project
        disable_realtime_queries:
          type:
            - boolean
            - 'null'
          description: >-
            If true, disable real-time queries for this project. This can
            improve query performance for high-volume logs.
        monitor_charts_use_metrics_start:
          type:
            - boolean
            - 'null'
          description: >-
            If true, use metrics.start rather than created for monitor chart
            time bucket dimensions.
        coding_agent_insights_dashboard:
          type:
            - boolean
            - 'null'
          description: If true, enable the agent insights dashboard for this project.
        blind_reviews:
          type:
            - boolean
            - 'null'
          description: >-
            If true, hide peer review scores, comments, and aggregate results
            from reviewers without project update permissions until they submit
            their own review.
        require_all_human_review_scores:
          type:
            - boolean
            - 'null'
          description: >-
            If true, automatically complete a review after every assigned
            reviewer fills all human review scores visible to them.
        user_id_fields:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 256
            minItems: 2
            maxItems: 32
            description: >-
              Path to the application's end-user identifier in metadata or
              span_attributes, for example ["metadata", "customer_id"]. This
              identifies an end user, not a session, request, organization, or
              the Braintrust user who created the project.
        pattern_alert_mention:
          type:
            - object
            - 'null'
          properties:
            workspace_id:
              type: string
              minLength: 1
            mention_user_id:
              type: string
              pattern: ^[UW][A-Z0-9]+$
              description: >-
                Slack member ID of the user or agent to mention in a Pattern
                alert's thread to investigate the pattern.
            mention_handle:
              type: string
              maxLength: 80
              description: >-
                Username shown for the selected user or agent. Mentions use
                mention_user_id.
            mention_prompt:
              type: string
              maxLength: 2000
              pattern: \{\{pattern\}\}
              description: >-
                Message posted after the mention in a Pattern alert's thread.
                {{pattern}} is replaced with a link to the pattern. Defaults to
                "Please investigate this pattern: {{pattern}}. Review the
                evidence, identify the root cause, and suggest a fix."
          required:
            - workspace_id
            - mention_user_id
          description: >-
            Project-wide Slack user or agent and prompt for Pattern alert
            threads. Applies only to destinations in the selected workspace.
            Unset or null disables mentions.
        pattern_alert_destinations:
          type:
            - array
            - 'null'
          items:
            oneOf:
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - webhook
                    description: The type of action to take
                  url:
                    type: string
                    description: The webhook URL to send the request to
                  formatting_prompt:
                    type: string
                    minLength: 1
                    maxLength: 10000
                    description: >-
                      Instructions for Loop to format content sent to this
                      destination
                required:
                  - type
                  - url
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - slack
                    description: The type of action to take
                  workspace_id:
                    type: string
                    description: The Slack workspace ID to post to
                  channel:
                    type: string
                    description: The Slack channel ID to post to
                  message_template:
                    type: string
                    description: Custom message template for the alert
                  formatting_prompt:
                    type: string
                    minLength: 1
                    maxLength: 10000
                    description: >-
                      Instructions for Loop to format content sent to this
                      destination
                required:
                  - type
                  - workspace_id
                  - channel
              - type: object
                properties:
                  type:
                    type: string
                    enum:
                      - pagerduty
                    description: The type of action to take
                  routing_key_secret_name:
                    type: string
                    format: uuid
                    description: The data-plane secret containing the PagerDuty routing key
                  severity:
                    type: string
                    enum:
                      - critical
                      - error
                      - warning
                      - info
                  formatting_prompt:
                    type: string
                    minLength: 1
                    maxLength: 10000
                    description: >-
                      Instructions for Loop to format content sent to this
                      destination
                required:
                  - type
                  - routing_key_secret_name
                  - severity
            description: A delivery action available to an automation
          maxItems: 20
          description: >-
            Project-wide Slack, webhook, and PagerDuty destinations for new and
            reactivated Pattern alerts. An empty array disables alerts.
        session_id_fields:
          type:
            - array
            - 'null'
          items:
            type: array
            items:
              type: string
              minLength: 1
              maxLength: 256
            minItems: 2
            maxItems: 32
            description: >-
              Path to the application's session or conversation identifier in
              metadata or span_attributes, for example ["metadata",
              "conversation_id"]. This links turns of one conversation across
              traces, rather than identifying a user, request, trace,
              organization, or service account.
        default_preprocessor:
          $ref: '#/components/schemas/NullableSavedFunctionId'
    NullableSavedFunctionId:
      anyOf:
        - type: object
          properties:
            type:
              type: string
              enum:
                - function
            id:
              type: string
            version:
              type: string
              description: The version of the function
          required:
            - type
            - id
          title: function
        - type: object
          properties:
            type:
              type: string
              enum:
                - global
            name:
              type: string
            function_type:
              $ref: '#/components/schemas/FunctionTypeEnum'
          required:
            - type
            - name
          title: global
        - type: 'null'
      description: >-
        Default preprocessor for this project. When set, functions that use
        preprocessors will use this instead of their built-in default.
    FunctionTypeEnum:
      type: string
      enum:
        - llm
        - scorer
        - task
        - tool
        - custom_view
        - preprocessor
        - facet
        - classifier
        - tag
        - parameters
        - sandbox
      default: scorer
      description: The type of global function. Defaults to 'scorer'.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key or JWT
      description: >-
        Most Braintrust endpoints are authenticated by providing your API key as
        a header `Authorization: Bearer [api_key]` to your HTTP request. You can
        create an API key in the Braintrust [organization settings
        page](https://www.braintrustdata.com/app/settings?subroute=api-keys).

````

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