---
title: "Create a decision model variant"
slug: "create-a-decision-model-variant"
abstract: "Describes how to create a decision model variant using the Sitecore Personalize Decision model variant REST API."
---
# Create a decision model variant

`POST /v2/decisionModelDefinitions/<decisionModelRef>/variants`

Creates a variant of a decision model.

| Attribute | Type | Description | Example |
| --- | --- | --- | --- |
| `decisionModelRef` | string | The reference of the decision model.<br><br>If you do not know the decision model reference, first [retrieve decision models](https://doc.sitecore.com/personalize/en/developers/api/rest-apis/decision-model-variant-rest-api/retrieve-decision-models.html). | `865ce079-6012-4f97-bc46-07215691a178` |

At a minimum, you must provide the following required attributes in the request body:

| Attribute | Type | Description | Example |
| --- | --- | --- | --- |
| `name` | string | The name of the decision model. | `"Determine Ancillary Upsell Variant 2"` |
| `definition` | string | The definition of the decision model variant that belongs to the decision canvas. | `"mys3cr3tstr1ingforauth1!x"` |

```curl
curl -X POST '<baseURL>/v2/decisionModelDefinitions/865ce079-6012-4f97-bc46-07215691a178/variants' \
-H 'Authorization: Bearer <accessToken>' \
-H 'Accept: application/json' \
--data-raw '
{
   "name":"Determine Ancillary Upsell Variant 2",
   "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />"
}'

```

```json
{
   "clientKey":"pqsPERS3lw12v5a9rrHPW1c4hET73GxQ",
   "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4",
   "ref":"4ee0797d-e229-492d-883e-1344787002b4",
   "name":"Determine Ancillary Upsell Variant 2",
   "modifiedByUserRef":"25f46901-bc51-45e8-b587-148aecf1e48f",
   "modifiedAt":"2020-10-05T07:`37:49`.650Z",
   "revision":1,
   "archived":false,
   "decisionModelDefinitionRef":"865ce079-6012-4f97-bc46-07215691a178",
   "definition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />",
   "transpiledDefinition":"<definitions xmlns=\"http://www.omg.org/spec/DMN/20151101/dmn.xsd\" id=\"definitions\" name=\"definitions\" namespace=\"http://camunda.org/schema/1.0/dmn\" />",
   "revisions":{
      "href":"<baseURL>/v2/decisionModelVariants/4ee0797d-e229-492d-883e-1344787002b4/revisions"
   },
   "offers":[]
}

```