---
title: "Creating a PIM product | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/dev-center/api/backoffice/creating-pim-products/"
---

# Creating a PIM product

> Learn how to create a new PIM product in your tenant programmatically by using the BackOffice API.

Sometimes you need to create a new PIM product programmatically. This article explains how to create a PIM product using the BackOffice API, including selecting a personalization workflow and processing pipeline.

## Using the API

Before you start, ensure your app has the necessary credentials to make API calls:
1. In your tenant, go to **Settings** > **External apps** and register your app.
2. Implement authentication in your app as described in the [Authorization](https://customerscanvas.com/docs/hub/dev-center/api/auth.md) article.

## C# API Client

To use the C# API client, initialize it with the required configuration:

```csharp
var httpClient = new HttpClient();
var backOfficeApiConfiguration = new Aurigma.BackOfficeApi.ApiClientConfiguration()
{
    ApiUrl = BACKOFFICE_API_URL,
    AuthorizationToken = AUTH_TOKEN
};
var productsApiClient = new ProductsManagementApiClient(backOfficeApiConfiguration, httpClient);
```

## Creating a PIM Product

To create a PIM product, you need to:
1. Retrieve the available personalization workflows and processing pipelines.
2. Create the product using the selected workflow and pipeline.

### Example

```csharp
// Load available workflows and pipelines
var workflows = await productsApiClient.GetAvailablePersonalizationWorkflowsAsync(tenantId: TENANT_ID);
var pipelines = await productsApiClient.GetAvailableProcessingPipelinesAsync(tenantId: TENANT_ID);

// Create a new product
var product = await productsApiClient.CreateProductAsync(
    tenantId: TENANT_ID,
    body: new CreateProductDto()
    {
        Name = "Test Product",
        Description = "Test Product Description",
        Tags = [],
        CustomFields = { },
        Options = new List<CreateProductOptionDto>()
        {
            new CreateProductOptionDto()
            {
                Title = "Test Product Option",
                Traits = [],
                Values = new List<CreateProductOptionValueDto>()
                {
                    new CreateProductOptionValueDto() { Value = "Value#1" },
                    new CreateProductOptionValueDto() { Value = "Value#2" }
                },
                UseForMockupBinding = true,
                UseForDesignBinding = true,
                UseForDocumentBinding = true,
            }
        },
        ProcessingPipelineId = pipelines.Items.FirstOrDefault()?.Id ?? 0,
        PersonalizationWorkflowId = workflows.Items.FirstOrDefault()?.Id ?? 0,
    });
```

:::important
Ensure that `tenantId` is correctly specified in the parameters. It must match the `tenantId` encoded in the authorization token.
:::
