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

# Update Category

> Updates an existing position category in your COR instance using its external ID

Updates an existing position category in your COR instance using its external ID.

## Path Parameters

<ParamField path="id" type="string" required>
  External category ID that was used when creating the category
</ParamField>

## 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="name" type="string">
  Updated category name
</ParamField>

## Known Errors

* `CategoryNotFoundError` — No category found with the specified external ID for this source
* `ValidationError` — Missing required `metadata.source` field

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

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

  url = "https://integrations.projectcor.com/v2/integrations/categories/external-category-id-1"

  payload = {
      "metadata": {
          "source": "GLOBANT"
      },
      "name": "Updated Category Name"
  }

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

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

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://integrations.projectcor.com/v2/integrations/categories/external-category-id-1',
    {
      method: 'PUT',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'GLOBANT'
        },
        name: 'Updated Category Name'
      })
    }
  );

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "statusCode": 200,
    "status": "success",
    "data": {
      "name": "Updated Category Name",
      "company_id": 2336,
      "created_at": "2025-11-19 18:33:26",
      "updated_at": "2025-11-19 18:42:01",
      "deleted_at": null,
      "__meta__": {
        "oldRate": 0
      }
    }
  }
  ```

  ```json 404 theme={null}
  {
    "error": "CategoryNotFoundError",
    "message": "Category with external ID 'external-category-id-1' not found",
    "code": "ZC004"
  }
  ```
</ResponseExample>
