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

# Create project

> Create a new project in the organization. Returns the project with its API key (sk-lw-...) for sending traces. Provide either teamId (existing team) or newTeamName (creates a new team). Requires project:create permission.



## OpenAPI

````yaml POST /api/projects
openapi: 3.1.0
info:
  title: LangWatch API
  version: 1.0.0
  description: LangWatch openapi spec
servers:
  - url: https://app.langwatch.ai
security:
  - project_api_key: []
paths:
  /api/projects:
    post:
      summary: Create a project
      description: >-
        Create a new project in the organization. Returns the project with its
        API key (sk-lw-...) for sending traces. Provide either teamId (existing
        team) or newTeamName (creates a new team). Requires project:create
        permission.
      operationId: createProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 255
                  description: Project name
                teamId:
                  type: string
                  description: ID of an existing team to assign the project to
                newTeamName:
                  type: string
                  maxLength: 255
                  description: Name for a new team to create and assign the project to
                language:
                  type: string
                  description: Programming language (e.g. python, typescript)
                framework:
                  type: string
                  description: Framework (e.g. langchain, vercel-ai, openai)
              required:
                - name
                - language
                - framework
      responses:
        '201':
          description: Project created. Returns a scoped service API key for this project.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Project'
                  - type: object
                    properties:
                      serviceApiKey:
                        type: string
                        description: >-
                          Scoped service API key with ADMIN on this project
                          (sk-lw-..._...). Store securely — shown only once.
                      serviceApiKeyId:
                        type: string
                        description: >-
                          ID of the auto-created service key, for management via
                          DELETE /api/api-keys/{id}.
        '400':
          description: Team does not belong to this organization
        '401':
          description: Invalid or missing API key token
        '403':
          description: Insufficient permissions (requires project:create)
        '409':
          description: A project with this name already exists in the team
        '422':
          description: Validation error (missing required fields)
      security:
        - admin_api_key: []
components:
  schemas:
    Project:
      type: object
      properties:
        id:
          type: string
          description: Project ID (project_...)
        name:
          type: string
        slug:
          type: string
        language:
          type: string
        framework:
          type: string
        teamId:
          type: string
        piiRedactionLevel:
          type: string
          enum:
            - STRICT
            - ESSENTIAL
            - DISABLED
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    project_api_key:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: >-
        Project API key for sending traces and accessing project-scoped
        resources. Format: sk-lw-... (no underscore). Obtain one by creating a
        project via the Admin API or the LangWatch UI.
    admin_api_key:
      type: http
      scheme: bearer
      description: >-
        Admin API key for organization-level operations (managing projects, API
        keys). Create one in Settings > API Keys or via POST /api/api-keys.
        Format: sk-lw-{id}_{secret}.

````