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

# Create Project

> Creates a new project in your COR instance with external ID mapping

Creates a new project in your COR instance through the integrations service. The project is mapped to an external ID from your source system (Salesforce, Jira, etc.) for bidirectional synchronization.

## Request Body Requirements

All requests require the `metadata.source` field to identify the integration source.

<ParamField body="metadata" type="object" required>
  <Expandable title="properties">
    <ParamField body="source" type="string" required>
      Integration source identifier. Must be one of: `JIRA`, `SALESFORCE`, `ADVERTMIND`, `QUICKBOOKS`, `ZAPIER`, `OKTA`, `MICROSOFT_DYNAMICS`, `GITHUB`, `MICROSOFT_TEAMS`, `VBS`, `SAP`, `GLOBANT`
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="id" type="string" required>
  External project ID from your source system. This ID will be used to reference the project in future update/delete operations.
</ParamField>

<ParamField body="name" type="string" required>
  Project name
</ParamField>

<ParamField body="client_id" type="string">
  External client ID. The client must have been previously created through the integrations API.
</ParamField>

<ParamField body="brief" type="string">
  Project description or brief
</ParamField>

<ParamField body="start" type="string">
  Project start date in `YYYY-MM-DD` format
</ParamField>

<ParamField body="end" type="string">
  Project end date in `YYYY-MM-DD` format
</ParamField>

<ParamField body="pm_id" type="string">
  External project manager user ID
</ParamField>

<ParamField body="brand_id" type="string">
  External brand ID
</ParamField>

<ParamField body="product_id" type="string">
  External product ID
</ParamField>

<ParamField body="estimated_time" type="number">
  Estimated hours for the project
</ParamField>

<ParamField body="billable" type="boolean">
  Whether the project is billable
</ParamField>

<ParamField body="status" type="string">
  Project status
</ParamField>

<ParamField body="currency_id" type="string">
  External currency ID
</ParamField>

<ParamField body="evaluation_date" type="string">
  Project evaluation date in `YYYY-MM-DD` format
</ParamField>

<ParamField body="estimated" type="number">
  Estimated monetary value for the project
</ParamField>

<ParamField body="fee_id" type="string">
  External fee ID
</ParamField>

<ParamField body="contract_id" type="string">
  External contract ID. The contract must have been previously created through the integrations API.
</ParamField>

<ParamField body="deliverables" type="string">
  Project deliverables description
</ParamField>

<ParamField body="work_order" type="string">
  Work order number or code
</ParamField>

<ParamField body="income_type" type="string">
  Income type for the project. Possible values: `fee`, `one_time`, `hourly_rate`, `contract`
</ParamField>

<ParamField body="archived" type="boolean" default="false">
  Whether the project is archived
</ParamField>

## Known Errors

* `ValidationError` — Missing required fields (`metadata.source`, `id`, or `name`)
* `ClientNotFoundError` — The specified `client_id` does not exist in the integration mappings
* `DuplicateExternalIdError` — A project with this external ID already exists for this source
* `InvalidSourceError` — The `metadata.source` value is not a valid integration source

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://integrations.projectcor.com/v2/integrations/projects' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "SALESFORCE"
    },
    "id": "SF-OPP-12345",
    "name": "Website Redesign Project",
    "client_id": "SF-ACC-67890",
    "brief": "Complete website overhaul including new branding",
    "start": "2025-01-15",
    "end": "2025-03-31",
    "pm_id": "SF-USER-111",
    "estimated_time": 200,
    "billable": true,
    "status": "active",
    "estimated": 15000,
    "contract_id": "SF-CONTRACT-001",
    "work_order": "WO-2025-001"
  }'
  ```

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

  url = "https://integrations.projectcor.com/v2/integrations/projects"

  payload = {
      "metadata": {
          "source": "SALESFORCE"
      },
      "id": "SF-OPP-12345",
      "name": "Website Redesign Project",
      "client_id": "SF-ACC-67890",
      "brief": "Complete website overhaul including new branding",
      "start": "2025-01-15",
      "end": "2025-03-31",
      "pm_id": "SF-USER-111",
      "estimated_time": 200,
      "billable": True,
      "status": "active",
      "estimated": 15000,
      "contract_id": "SF-CONTRACT-001",
      "work_order": "WO-2025-001"
  }

  headers = {
      "Authorization": "Bearer YOUR_ACCESS_TOKEN",
      "Content-Type": "application/json"
  }

  response = requests.post(url, json=payload, headers=headers)
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://integrations.projectcor.com/v2/integrations/projects',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'SALESFORCE'
        },
        id: 'SF-OPP-12345',
        name: 'Website Redesign Project',
        client_id: 'SF-ACC-67890',
        brief: 'Complete website overhaul including new branding',
        start: '2025-01-15',
        end: '2025-03-31',
        pm_id: 'SF-USER-111',
        estimated_time: 200,
        billable: true,
        status: 'active',
        estimated: 15000,
        contract_id: 'SF-CONTRACT-001',
        work_order: 'WO-2025-001'
      })
    }
  );

  const data = await response.json();
  console.log(data);
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 155693,
    "name": "Website Redesign Project",
    "client_id": 25855,
    "brief": "Complete website overhaul including new branding",
    "start": "2025-01-15 00:00:00",
    "end": "2025-03-31 00:00:00",
    "pm_id": 8546,
    "estimated_time": 200,
    "billable": true,
    "status": "active",
    "estimated": 15000,
    "contract_id": 4521,
    "work_order": "WO-2025-001",
    "company_id": 1234,
    "created_at": "2025-01-10T14:30:00Z",
    "updated_at": "2025-01-10T14:30:00Z"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "ValidationError",
    "message": "Missing required field: metadata.source",
    "code": "ZC002"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "ClientNotFoundError",
    "message": "Client with external ID 'SF-ACC-67890' not found",
    "code": "ZC004"
  }
  ```
</ResponseExample>
