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

# Create Project

> Creates a new project in the workspace with unique name and key

## Overview

Create a new project in your workspace. Projects help organize tasks, track progress, and manage team collaboration. Each project requires a unique name and key within the team.

## Request Body

<ParamField body="project" type="string" required>
  The name of the project. Must be unique within the team.

  **Example:** `"Mobile App Development"`
</ParamField>

<ParamField body="key" type="string" required>
  A unique project key (typically 2-5 uppercase letters). Used as a prefix for task IDs.

  **Example:** `"MAD"`
</ParamField>

<ParamField body="client_id" type="integer" required>
  The ID of the client associated with this project. If not provided, uses the internal client of the team.

  **Example:** `10`
</ParamField>

<ParamField body="description" type="string">
  Detailed description of the project.

  **Example:** `"Development of a cross-platform mobile application for iOS and Android"`
</ParamField>

<ParamField body="team_id" type="integer">
  The ID of the team this project belongs to. Defaults to the current user's team if not provided.

  **Example:** `1`
</ParamField>

<ParamField body="project_manager" type="array|string">
  User ID(s) of the project manager(s). Can be a single ID or an array of IDs.

  **Example:** `[5, 7]` or `"5"`
</ParamField>

<ParamField body="qa_lead" type="integer">
  User ID of the QA lead for this project. Defaults to the current user if not provided.

  **Example:** `8`
</ParamField>

<ParamField body="users" type="array|string">
  User ID(s) of team members assigned to this project. Can be a single ID or an array of IDs.

  **Example:** `[1, 2, 3, 4]` or `"1,2,3"`
</ParamField>

<ParamField body="groups" type="array|string">
  Group ID(s) associated with this project. Can be a single ID or an array of IDs.

  **Example:** `[1, 2]` or `"1,2"`
</ParamField>

<ParamField body="start_date" type="string">
  The start date of the project (ISO 8601 format).

  **Example:** `"2025-12-01T00:00:00Z"`
</ParamField>

<ParamField body="due_date" type="string">
  The due date for project completion (ISO 8601 format).

  **Example:** `"2026-06-30T23:59:59Z"`
</ParamField>

<ParamField body="billable" type="string" default="yes">
  Whether the project is billable to the client.

  **Allowed values:** `"yes"`, `"no"`

  **Default:** `"yes"`
</ParamField>

<ParamField body="visible" type="integer">
  Visibility setting for the project. When provided, sets visiblity to 1.

  **Example:** `1`
</ParamField>

## Response

<ResponseField name="id" type="integer">
  The unique identifier of the newly created project.
</ResponseField>

<ResponseField name="project" type="string">
  The name of the project.
</ResponseField>

<ResponseField name="key" type="string">
  The unique project key.
</ResponseField>

<ResponseField name="project_description" type="string">
  Detailed description of the project.
</ResponseField>

<ResponseField name="team_id" type="integer">
  The ID of the team this project belongs to.
</ResponseField>

<ResponseField name="client" type="object">
  Client information associated with this project.

  <Expandable title="properties">
    <ResponseField name="id" type="integer">
      Client ID.
    </ResponseField>

    <ResponseField name="name" type="string">
      Client name.
    </ResponseField>

    <ResponseField name="profile" type="string">
      URL to the client's profile picture.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="project_manager" type="array">
  Array of user IDs who are project managers.
</ResponseField>

<ResponseField name="qa_lead" type="integer">
  User ID of the QA lead.
</ResponseField>

<ResponseField name="users" type="array">
  Array of user IDs assigned to this project.
</ResponseField>

<ResponseField name="groups" type="array">
  Array of group IDs associated with this project.
</ResponseField>

<ResponseField name="watcher" type="array">
  Array of user IDs watching this project.
</ResponseField>

<ResponseField name="starting_date" type="string">
  The start date of the project.
</ResponseField>

<ResponseField name="due_date" type="string">
  The due date of the project.
</ResponseField>

<ResponseField name="isBillable" type="boolean">
  Whether the project is billable.
</ResponseField>

<ResponseField name="billable" type="string">
  Billable status as string ("yes" or "no").
</ResponseField>

<ResponseField name="visible" type="integer">
  Visibility setting for the project.
</ResponseField>

<ResponseField name="visiblity" type="integer">
  Visibility flag (1 if visibility is set, 0 otherwise).
</ResponseField>

<ResponseField name="task" type="array">
  Array of tasks in the project (empty for new projects).
</ResponseField>

<ResponseField name="completed" type="integer">
  Number of completed tasks (0 for new projects).
</ResponseField>

<ResponseField name="user_id" type="integer">
  User ID of the project creator.
</ResponseField>

<ResponseField name="created_at" type="string">
  The timestamp when the project was created.
</ResponseField>

<ResponseField name="updated_at" type="string">
  The timestamp when the project was last updated.
</ResponseField>

## Example Request

```bash theme={null}
curl --request POST \
  --url https://app.thareja.ai/api/v3/mobile/project/create \
  --header 'Authorization: Bearer YOUR_API_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "project": "Mobile App Development",
    "key": "MAD",
    "description": "Development of a cross-platform mobile application for iOS and Android",
    "team_id": 1,
    "client_id": 10,
    "project_manager": [5, 7],
    "qa_lead": 8,
    "users": [1, 2, 3, 4],
    "groups": [1, 2],
    "start_date": "2025-12-01T00:00:00Z",
    "due_date": "2026-06-30T23:59:59Z",
    "billable": "yes",
    "visible": 1
  }'
```

## Example Request (JavaScript)

```javascript theme={null}
fetch('https://app.thareja.ai/api/v3/mobile/project/create', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_TOKEN',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    project: "Mobile App Development",
    key: "MAD",
    description: "Development of a cross-platform mobile application for iOS and Android",
    team_id: 1,
    client_id: 10,
    project_manager: [5, 7],
    qa_lead: 8,
    users: [1, 2, 3, 4],
    groups: [1, 2],
    start_date: "2025-12-01T00:00:00Z",
    due_date: "2026-06-30T23:59:59Z",
    billable: "yes",
    visible: 1
  })
})
.then(response => response.json())
.then(data => console.log(data));
```

## Example Response

```json theme={null}
{
  "id": 123,
  "project": "Mobile App Development",
  "key": "MAD",
  "project_description": "Development of a cross-platform mobile application for iOS and Android",
  "team_id": 1,
  "client": {
    "id": 10,
    "name": "Acme Corporation",
    "profile": "https://app.thareja.ai/profiles/acme.jpg"
  },
  "project_manager": [5, 7],
  "qa_lead": 8,
  "users": ["1", "2", "3", "4"],
  "groups": [1, 2],
  "watcher": [],
  "starting_date": "2025-12-01T00:00:00Z",
  "due_date": "2026-06-30T23:59:59Z",
  "isBillable": true,
  "billable": "yes",
  "visible": 1,
  "visiblity": 1,
  "task": [],
  "completed": 0,
  "user_id": 1,
  "created_at": "2025-11-28T10:30:00Z",
  "updated_at": "2025-11-28T10:30:00Z"
}
```

## Error Responses

<ResponseExample>
  ```json 409 Conflict - Duplicate Project Name theme={null}
  {
    "error": "This project name is already exist in your organization"
  }
  ```

  ```json 409 Conflict - Duplicate Key theme={null}
  {
    "error": "This key is already exist in your organization"
  }
  ```

  ```json 409 Conflict - Empty Key theme={null}
  {
    "error": "project key can't be empty!"
  }
  ```

  ```json 409 Conflict - Empty Project Name theme={null}
  {
    "error": "Project name can't be empty!"
  }
  ```

  ```json 401 Unauthorized theme={null}
  {
    "error": 401,
    "message": "Invalid or missing authentication token"
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": 400,
    "message": "Invalid request parameters"
  }
  ```
</ResponseExample>

## Notes

* **Unique constraints:** Both project name and key must be unique within the team
* **Key format:** Project keys are automatically converted to uppercase and special characters are removed
* **Default team:** If `team_id` is not provided, the current user's team is used
* **Default client:** If no `client_id` is provided, the internal client of the team is used (or created if it doesn't exist)
* **Default QA lead:** If not provided, defaults to the current user
* **Array or string:** Fields like `project_manager`, `users`, and `groups` accept both array format and comma-separated string format
* **Billable default:** Projects are billable by default unless explicitly set to "no"
* **Groups:** When groups are provided, the project is automatically added to those groups
* **Case sensitivity:** Project names are automatically capitalized

## Related Endpoints

* [Get Projects](/api-reference/project/list) - List all projects
* [Get Project](/api-reference/project/get) - Retrieve project details
* [Update Project](/api-reference/project/update) - Update project information
* [Delete Project](/api-reference/project/delete) - Delete a project


## OpenAPI

````yaml POST /api/v3/project/create
openapi: 3.1.0
info:
  title: Thareja API Documentation
  description: A comprehensive API for team and task management
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://app.thareja.ai
security:
  - bearerAuth: []
tags:
  - name: Teams
    description: Team management endpoints
  - name: Tasks
    description: Task management endpoints
  - name: Projects
    description: Project management endpoints
  - name: Comments
    description: Comment management endpoints
paths:
  /api/v3/project/create:
    post:
      tags:
        - Projects
      summary: Create a new project
      description: Creates a new project in the workspace with unique name and key
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewProject'
        required: true
      responses:
        '200':
          description: Project created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectResponse'
        '400':
          description: Bad request - Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict - Duplicate project name or key
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: This project name is already exist in your organization
components:
  schemas:
    NewProject:
      required:
        - project
        - key
        - client_id
      type: object
      properties:
        project:
          description: The name of the project (must be unique within team)
          type: string
          example: Mobile App Development
        key:
          description: Unique project key (2-5 uppercase letters)
          type: string
          example: MAD
        client_id:
          description: The ID of the client associated with this project
          type: integer
          format: int64
          example: 10
        description:
          description: Detailed description of the project
          type: string
          example: >-
            Development of a cross-platform mobile application for iOS and
            Android
        team_id:
          description: The ID of the team this project belongs to
          type: integer
          format: int64
          example: 1
        project_manager:
          description: User ID(s) of project manager(s)
          oneOf:
            - type: array
              items:
                type: integer
                format: int64
            - type: string
          example:
            - 5
            - 7
        qa_lead:
          description: User ID of the QA lead
          type: integer
          format: int64
          example: 8
        users:
          description: User ID(s) of team members
          oneOf:
            - type: array
              items:
                type: integer
                format: int64
            - type: string
          example:
            - 1
            - 2
            - 3
            - 4
        groups:
          description: Group ID(s) associated with this project
          oneOf:
            - type: array
              items:
                type: integer
                format: int64
            - type: string
          example:
            - 1
            - 2
        start_date:
          description: The start date of the project
          type: string
          format: date-time
          example: '2025-12-01T00:00:00Z'
        due_date:
          description: The due date for project completion
          type: string
          format: date-time
          example: '2026-06-30T23:59:59Z'
        billable:
          description: Whether the project is billable
          type: string
          enum:
            - 'yes'
            - 'no'
          default: 'yes'
          example: 'yes'
        visible:
          description: Visibility setting for the project
          type: integer
          example: 1
    ProjectResponse:
      type: object
      properties:
        id:
          type: integer
          format: int64
          example: 123
        project:
          type: string
          example: Mobile App Development
        key:
          type: string
          example: MAD
        project_description:
          type: string
          example: Development of a cross-platform mobile application
        team_id:
          type: integer
          format: int64
          example: 1
        client:
          type: object
          properties:
            id:
              type: integer
              example: 10
            name:
              type: string
              example: Acme Corporation
            profile:
              type: string
              example: https://app.thareja.ai/profiles/acme.jpg
        project_manager:
          type: array
          items:
            type: integer
          example:
            - 5
            - 7
        qa_lead:
          type: integer
          example: 8
        users:
          type: array
          items:
            type: string
          example:
            - '1'
            - '2'
            - '3'
            - '4'
        groups:
          type: array
          items:
            type: integer
          example:
            - 1
            - 2
        watcher:
          type: array
          items:
            type: integer
        starting_date:
          type: string
          format: date-time
        due_date:
          type: string
          format: date-time
        isBillable:
          type: boolean
          example: true
        billable:
          type: string
          example: 'yes'
        visible:
          type: integer
          example: 1
        visiblity:
          type: integer
          example: 1
        task:
          type: array
          items:
            type: object
        completed:
          type: integer
          example: 0
        user_id:
          type: integer
          example: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
          example: 400
        message:
          type: string
          example: Invalid request parameters
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````