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

# Create a project

> Create a project in a workspace. The parent workspace is identified by the `workspace_id`
path parameter alone; the `x-hh-workspace-id` header does not participate.

The optional `project_creator` field names the user (by email) who receives the
project-creator membership on the new project. The named user must already be a member of
the workspace. When omitted, the project is created without any membership. The field is
only accepted on API-key-initiated requests. User-initiated creation always makes the
calling user the creator, so sending the field returns a 400.

The roles that membership carries come from your organization's role configuration. An
organization that grants no role on project creation is a supported case: the request
still succeeds and the named user receives no access. A 200 response is not by itself
confirmation that the named user was granted anything.

A `project_creator` who is already signed in does not see the new project immediately. A
session captures its scope tree and permission grants when it is created, so a membership
granted afterwards is not reflected in it. Creating the project marks that user's sessions
for refresh, and the refresh takes effect on their next request to the control plane, so
an idle browser tab may need a page reload.




## OpenAPI

````yaml https://raw.githubusercontent.com/honeyhiveai/honeyhive-openapi/main/control_plane_openapi.yaml post /v1/workspaces/{workspace_id}/projects
openapi: 3.1.0
info:
  title: HoneyHive Control Plane API
  description: >
    Manage HoneyHive control-plane resources: projects and alerts.


    Authentication requires a fine-grained control-plane API key (values

    start with `hh_fgcp_`), sent as `Authorization: Bearer <api-key>`.

    Project API keys used with the Data Plane API will not work here. Create

    a key in the HoneyHive app under an organization's or workspace's

    **Settings → API Keys**, or see

    [Authorization](https://docs.honeyhive.ai/v2/control-plane-sdk-reference/typescript#authorization)

    for details.
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.7.0
servers:
  - url: https://api.cp.us.honeyhive.ai
security:
  - BearerAuth: []
tags:
  - name: Alerts
    description: >
      Define and manage alerts. Alerts evaluate event metrics on a schedule and
      trigger notifications when configured thresholds are crossed.
  - name: Projects
    description: >
      Create and manage projects within a workspace. A project is the container
      for the events, datasets, evaluations, and alerts logged against it.
paths:
  /v1/workspaces/{workspace_id}/projects:
    post:
      tags:
        - Projects
      summary: Create a project
      description: >
        Create a project in a workspace. The parent workspace is identified by
        the `workspace_id`

        path parameter alone; the `x-hh-workspace-id` header does not
        participate.


        The optional `project_creator` field names the user (by email) who
        receives the

        project-creator membership on the new project. The named user must
        already be a member of

        the workspace. When omitted, the project is created without any
        membership. The field is

        only accepted on API-key-initiated requests. User-initiated creation
        always makes the

        calling user the creator, so sending the field returns a 400.


        The roles that membership carries come from your organization's role
        configuration. An

        organization that grants no role on project creation is a supported
        case: the request

        still succeeds and the named user receives no access. A 200 response is
        not by itself

        confirmation that the named user was granted anything.


        A `project_creator` who is already signed in does not see the new
        project immediately. A

        session captures its scope tree and permission grants when it is
        created, so a membership

        granted afterwards is not reflected in it. Creating the project marks
        that user's sessions

        for refresh, and the refresh takes effect on their next request to the
        control plane, so

        an idle browser tab may need a page reload.
      operationId: createProject
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            type: string
          description: The unique identifier of the workspace the project is created in
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PostProjectRequest'
      responses:
        '200':
          description: Project created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProjectResponse'
        '400':
          description: Invalid request body, or an unknown/ineligible `project_creator`
        '404':
          description: Workspace not found
components:
  schemas:
    PostProjectRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          description: Project display name
        description:
          type: string
          description: Project description
        project_creator:
          type: string
          format: email
          description: >-
            Email of the user to grant the project-creator membership to (API
            key actors only). A signed-in user does not see the new project
            until their session refreshes, which happens on their next request
            to the control plane.
      required:
        - name
      additionalProperties: false
      description: Request body for creating a project
    CreateProjectResponse:
      type: object
      properties:
        success:
          type: boolean
        data:
          $ref: '#/components/schemas/ProjectItem'
      required:
        - success
        - data
      additionalProperties: false
      description: The created project
    ProjectItem:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
          description: Project display name
        description:
          type: string
          description: Project description
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: string
            - type: 'null'
      required:
        - id
        - name
        - description
        - created_at
      additionalProperties: false
      description: Project object
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````