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

# Create Project

> Create a new project in your workspace through the Zapier integration API.

## Overview

Create a new project in your workspace using the Zapier integration API. This endpoint allows you to add projects with comprehensive configuration including client associations, billing settings, and project metadata.

<Note>
  This endpoint is designed for Zapier integrations but can be used with any application that needs to create projects programmatically.
</Note>

## Authentication

All requests require a valid API key in the Authorization header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Create Project

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST 'https://app.timetracker.in/api/integrations/zapier/triggers/projects' \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Bearer YOUR_API_KEY' \
    -d '{
      "name": "New Website Project",
      "description": "Complete redesign of company website",
      "status": "active",
      "isPrivate": false,
      "defaultBillableRate": 75.0,
      "defaultBillable": true,
      "estimatedHours": 120.0,
      "estimatedBudget": 9000.0,
      "workspace_id": "w1b2c3d4-e5f6-7890-abcd-ef0987654321",
      "client_id": "c1a2b3c4-d5e6-7890-abcd-ef1234567890"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://app.timetracker.in/api/integrations/zapier/triggers/projects', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': 'Bearer YOUR_API_KEY'
    },
    body: JSON.stringify({
      name: 'New Website Project',
      description: 'Complete redesign of company website',
      status: 'active',
      isPrivate: false,
      defaultBillableRate: 75.0,
      defaultBillable: true,
      estimatedHours: 120.0,
      estimatedBudget: 9000.0,
      workspace_id: 'w1b2c3d4-e5f6-7890-abcd-ef0987654321',
      client_id: 'c1a2b3c4-d5e6-7890-abcd-ef1234567890'
    })
  });

  const project = await response.json();
  ```

  ```python Python theme={null}
  import requests

  url = "https://app.timetracker.in/api/integrations/zapier/triggers/projects"
  headers = {
      "Content-Type": "application/json",
      "Authorization": "Bearer YOUR_API_KEY"
  }
  data = {
      "name": "New Website Project",
      "description": "Complete redesign of company website",
      "status": "active",
      "isPrivate": False,
      "defaultBillableRate": 75.0,
      "defaultBillable": True,
      "estimatedHours": 120.0,
      "estimatedBudget": 9000.0,
      "workspace_id": "w1b2c3d4-e5f6-7890-abcd-ef0987654321",
      "client_id": "c1a2b3c4-d5e6-7890-abcd-ef1234567890"
  }

  response = requests.post(url, headers=headers, json=data)
  project = response.json()
  ```
</CodeGroup>

### Request Body

<ParamField body="name" type="string" required>
  The name of the project. Must be between 1-255 characters.

  **Example:** `"New Website Project"`
</ParamField>

<ParamField body="workspace_id" type="string" required>
  The UUID of the workspace where the project will be created.

  **Example:** `"w1b2c3d4-e5f6-7890-abcd-ef0987654321"`
</ParamField>

<ParamField body="description" type="string">
  Optional description of the project. Can be used for project documentation and context.

  **Example:** `"Complete redesign of company website"`
</ParamField>

<ParamField body="status" type="string" default="active">
  The current status of the project. Valid values:

  * `active` - Project is currently in progress
  * `completed` - Project has been finished

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

<ParamField body="isPrivate" type="boolean" default="false">
  Whether the project is private or public within the workspace.

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

<ParamField body="defaultBillableRate" type="number">
  Default hourly rate for this project (overrides workspace default). Must be a positive number.

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

<ParamField body="defaultBillable" type="boolean" default="true">
  Whether time entries are billable by default for this project.

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

<ParamField body="estimatedHours" type="number">
  Estimated time to complete the project in hours. Must be a positive number.

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

<ParamField body="estimatedBudget" type="number">
  Estimated budget for the project. Must be a positive number.

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

<ParamField body="client_id" type="string">
  Optional UUID of the client to associate with this project. Must be a valid client ID in the workspace.

  **Example:** `"c1a2b3c4-d5e6-7890-abcd-ef1234567890"`
</ParamField>

## Response

### Success Response

Returns the created project object with all associated data:

```json theme={null}
{
  "id": "p1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "name": "New Website Project",
  "description": "Complete redesign of company website",
  "status": "active",
  "isPrivate": false,
  "defaultBillableRate": 75.0,
  "defaultBillable": true,
  "estimatedHours": 120.0,
  "estimatedBudget": 9000.0,
  "workspaceId": "w1b2c3d4-e5f6-7890-abcd-ef0987654321",
  "workspaceName": "Main Workspace",
  "clientId": "c1a2b3c4-d5e6-7890-abcd-ef1234567890",
  "clientName": "Acme Corp",
  "createdAt": "2024-01-15T10:30:00.000Z",
  "updatedAt": "2024-01-15T10:30:00.000Z"
}
```

### Response Fields

<ResponseField name="id" type="string">
  Unique project identifier (UUID format)
</ResponseField>

<ResponseField name="name" type="string">
  Project name
</ResponseField>

<ResponseField name="description" type="string">
  Project description
</ResponseField>

<ResponseField name="status" type="string">
  Current project status (`active`, `completed`, or `on-hold`)
</ResponseField>

<ResponseField name="isPrivate" type="boolean">
  Whether the project is private within the workspace
</ResponseField>

<ResponseField name="defaultBillableRate" type="number">
  Default hourly rate for the project
</ResponseField>

<ResponseField name="defaultBillable" type="boolean">
  Whether time entries are billable by default
</ResponseField>

<ResponseField name="estimatedHours" type="number">
  Estimated time to complete the project in hours
</ResponseField>

<ResponseField name="estimatedBudget" type="number">
  Estimated budget for the project
</ResponseField>

<ResponseField name="workspaceId" type="string">
  Associated workspace identifier
</ResponseField>

<ResponseField name="workspaceName" type="string">
  Associated workspace name
</ResponseField>

<ResponseField name="clientId" type="string">
  Associated client identifier (if assigned)
</ResponseField>

<ResponseField name="clientName" type="string">
  Associated client name (if assigned)
</ResponseField>

<ResponseField name="createdAt" type="string">
  ISO 8601 timestamp when project was created
</ResponseField>

<ResponseField name="updatedAt" type="string">
  ISO 8601 timestamp when project was last modified
</ResponseField>

### Error Responses

<AccordionGroup>
  <Accordion title="400 Bad Request - Validation Error">
    ```json theme={null}
    {
      "error": "Invalid request body",
      "details": [
        {
          "field": "name",
          "message": "String must contain at least 1 character(s)"
        }
      ]
    }
    ```

    **Cause**: Required fields are missing or invalid\
    **Solution**: Check the request body and ensure all required fields are provided with valid values
  </Accordion>

  <Accordion title="400 Bad Request - Invalid Client">
    ```json theme={null}
    {
      "error": "Client not found in workspace"
    }
    ```

    **Cause**: The specified client\_id doesn't exist in the workspace\
    **Solution**: Verify the client ID and ensure it belongs to the specified workspace
  </Accordion>

  <Accordion title="400 Bad Request - Invalid Rate">
    ```json theme={null}
    {
      "error": "Invalid request body",
      "details": [
        {
          "field": "defaultBillableRate",
          "message": "Number must be greater than 0"
        }
      ]
    }
    ```

    **Cause**: Billable rate must be a positive number\
    **Solution**: Provide a valid positive number for the billable rate
  </Accordion>

  <Accordion title="401 Unauthorized">
    ```json theme={null}
    {
      "error": "Unauthorized"
    }
    ```

    **Cause**: Invalid or missing API key\
    **Solution**: Verify your API key is correct and properly formatted
  </Accordion>

  <Accordion title="404 Not Found - Workspace">
    ```json theme={null}
    {
      "error": "Workspace not found"
    }
    ```

    **Cause**: The specified workspace\_id doesn't exist or you don't have access to it\
    **Solution**: Verify the workspace ID and ensure you have proper permissions
  </Accordion>

  <Accordion title="500 Internal Server Error">
    ```json theme={null}
    {
      "error": "Internal server error"
    }
    ```

    **Cause**: Server-side error during project creation\
    **Solution**: Retry the request or contact support if the issue persists
  </Accordion>
</AccordionGroup>

## Zapier Integration

### Zapier Action Configuration

When using this endpoint in Zapier:

1. **Workspace Selection**: Use the dynamic dropdown to select the target workspace
2. **Required Fields**: Only `name` and `workspace_id` are required
3. **Client Association**: Optionally select a client from the dynamic dropdown
4. **Billing Configuration**: Set up project-specific billing rates and settings
5. **Project Planning**: Add estimated hours and budget for project planning

### Sample Zapier Usage

<Steps>
  <Step title="Trigger Setup">
    Set up a trigger (e.g., new client creation, form submission) that provides project information
  </Step>

  <Step title="Action Configuration">
    Configure the "Create Project" action with:

    * **Workspace**: Select your target workspace
    * **Project Name**: Map from trigger data
    * **Description**: Map from trigger data (if available)
    * **Client**: Select from available clients (if applicable)
  </Step>

  <Step title="Billing Setup">
    Configure billing settings:

    * **Default Billable Rate**: Set hourly rate for the project
    * **Default Billable**: Enable/disable billable time entries
    * **Estimated Hours**: Set project time estimate
    * **Estimated Budget**: Set project budget
  </Step>

  <Step title="Test & Activate">
    Test the Zap with sample data, then activate for live use
  </Step>
</Steps>

## Use Cases

<AccordionGroup>
  <Accordion title="Client Onboarding">
    **Automated Project Creation**: Automatically create projects when new clients are onboarded, ensuring consistent project setup and billing configuration.
  </Accordion>

  <Accordion title="Proposal Management">
    **CRM Integration**: Create projects automatically when proposals are accepted in your CRM system, maintaining seamless workflow between sales and project management.
  </Accordion>

  <Accordion title="Task Management">
    **Project Templates**: Use project creation as a starting point for task management workflows, automatically setting up project structure and team assignments.
  </Accordion>

  <Accordion title="Budget Tracking">
    **Financial Planning**: Create projects with estimated budgets and hours for better financial planning and resource allocation.
  </Accordion>
</AccordionGroup>

## Important Notes

<Warning>
  **Client Association**: If you specify a client\_id, ensure the client exists in the target workspace. Invalid client IDs will result in a 400 error.
</Warning>

<Info>
  **Billing Configuration**: Project-specific billing rates override workspace defaults. Set these carefully to ensure accurate time tracking and invoicing.
</Info>

<Check>
  **Best Practices**:

  * Use descriptive project names that clearly identify the work
  * Set realistic estimated hours and budgets for better planning
  * Associate projects with clients when applicable for better organization
  * Use the description field to provide context and project requirements
  * Test with sample data before implementing in production
  * Handle error responses gracefully in your application
</Check>

## Rate Limits

* **Rate Limit**: 100 requests per minute per API key
* **Burst Limit**: 10 requests per second
* **Daily Limit**: 10,000 requests per day

<Note>
  Rate limits are applied per API key and workspace combination. Contact support if you need higher limits for your use case.
</Note>
