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

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

Creates a new brand in your COR instance through the integrations service. The brand must be associated with an existing client that was previously created through the integrations API.

## 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 brand ID from your source system
</ParamField>

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

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

## Known Errors

* `ValidationError` — Missing required fields
* `ClientNotFoundError` — The specified client does not exist in the integration mappings
* `DuplicateExternalIdError` — A brand with this external ID already exists for this source

<RequestExample>
  ```bash cURL theme={null}
  curl --location 'https://integrations.projectcor.com/v2/integrations/brands' \
  --header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "metadata": {
      "source": "SALESFORCE"
    },
    "id": "SF-BRAND-12345",
    "name": "Acme Premium",
    "client_id": "SF-ACC-67890"
  }'
  ```

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

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

  payload = {
      "metadata": {
          "source": "SALESFORCE"
      },
      "id": "SF-BRAND-12345",
      "name": "Acme Premium",
      "client_id": "SF-ACC-67890"
  }

  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/brands',
    {
      method: 'POST',
      headers: {
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'Content-Type': 'application/json'
      },
      body: JSON.stringify({
        metadata: {
          source: 'SALESFORCE'
        },
        id: 'SF-BRAND-12345',
        name: 'Acme Premium',
        client_id: 'SF-ACC-67890'
      })
    }
  );

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

<ResponseExample>
  ```json 200 theme={null}
  {
    "id": 3001,
    "name": "Acme Premium",
    "client_id": 25855,
    "company_id": 1234,
    "user_id": 8546,
    "created_at": "2025-01-10T14:30:00Z",
    "updated_at": "2025-01-10T14:30:00Z"
  }
  ```

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