> ## 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 Category

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

Creates a new position category in your COR instance through the integrations service.

## Request Body Requirements

<ParamField body="metadata" type="object" required>
  <Expandable title="properties">
    <ParamField body="source" type="string" required>
      Integration source identifier
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="id" type="string" required>
  External category ID from your source system
</ParamField>

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

## Known Errors

* `ValidationError` — Missing required fields
* `DuplicateExternalIdError` — A category with this external ID already exists for this source

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://integrations.projectcor.com/v2/integrations/categories' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "GLOBANT"
    },
    "id": "external-category-id-1",
    "name": "Category name"
  }'
  ```

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

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

  payload = {
      "metadata": {
          "source": "GLOBANT"
      },
      "id": "external-category-id-1",
      "name": "Category name"
  }

  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/categories',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'GLOBANT'
        },
        id: 'external-category-id-1',
        name: 'Category name'
      })
    }
  );

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "statusCode": 200,
    "status": "success",
    "data": {
      "name": "Category name",
      "company_id": 2336,
      "created_at": "2025-11-19 18:33:26",
      "updated_at": "2025-11-19 18:33:26",
      "id": "external-category-id-1"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "status": 400,
    "name": "COR_CUSTOM_ERROR",
    "code": "ZC002",
    "message": "Source is required in metadata"
  }
  ```
</ResponseExample>
