---
title: Add Multiple Custom Consent Categories and data-points.
slug: api-documentation/add-multiple-custom-consent-categories-and-data-points
docTags: 
createdAt: 2026-08-27T17:02:39.001Z
---

{
  "id": "8IxqB592USUc8KfCPizLt",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.upstartcommerce.com/v1/customer/consent/categories/batch",
    "servers": [
      {
        "url": "https://api.upstartcommerce.com/v1/customer/consent/categories/batch"
      }
    ],
    "name": "Add Multiple Custom Consent Categories and data-points.",
    "description": "Allows tenants to create multiple custom consent categories along with their selectable data points in a single request.\n",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        },
        {
          "kind": "required",
          "name": "x-upstart-tenant",
          "type": "string",
          "description": "Tenant identifier associated with the site."
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "array",
          "description": "",
          "customType": "CreateCustomConsentCategoryRequest[]",
          "schema": [
            {
              "name": "id",
              "kind": "optional",
              "type": "string",
              "description": "Optional UUID to specify an existing custom consent category."
            },
            {
              "name": "tenant",
              "kind": "required",
              "type": "string",
              "description": "The tenant that is to be associated with the custom consent category."
            },
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "Name of the custom consent category."
            },
            {
              "name": "description",
              "kind": "required",
              "type": "string",
              "description": ""
            },
            {
              "name": "dataPoint",
              "kind": "required",
              "type": "array",
              "description": "List of data points within the category.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            },
            {
              "name": "siteIds",
              "kind": "required",
              "type": "array",
              "description": "List of site IDs where the custom consent categories apply.",
              "example": "",
              "itemType": "string",
              "customType": "string[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "modelRef": "#/components/schemas/CreateCustomConsentCategoryRequest",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "ApiKeyAccess",
          "name": "X-Upstart-Api-Key",
          "kind": "optional",
          "type": "apiKey",
          "description": "Api key based authorization.",
          "in": "header"
        },
        {
          "id": "SessionIdAccess",
          "name": "X-Upstart-Session-Id",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Session based authorization. This authentication is required for clients to interact with any of the management APIs. Similar to 'LoggedIn', it indicates that the user has actually logged into the system, but in this case with a management role.</p>",
          "in": "header"
        }
      ],
      "cookieParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Custom Consent Categories Created Successfully",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "",
            "customType": "CustomConsentCategoryResponse[]",
            "schema": [
              {
                "name": "id",
                "kind": "required",
                "type": "string",
                "description": "Optional UUID to specify an existing custom consent category."
              },
              {
                "name": "tenant",
                "kind": "required",
                "type": "string",
                "description": "The tenant that is to be associated with the custom consent category."
              },
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": "Name of the custom consent category."
              },
              {
                "name": "description",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "dataPoint",
                "kind": "required",
                "type": "array",
                "description": "List of data points within the category.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "siteIds",
                "kind": "required",
                "type": "array",
                "description": "List of site IDs where the custom consent categories apply.",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              }
            ],
            "modelRef": "#/components/schemas/CustomConsentCategoryResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "207",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Response returned in case of partial success",
            "customType": "MultiStatusResponse",
            "schema": [
              {
                "name": "successIds",
                "kind": "required",
                "type": "array",
                "description": "",
                "example": "",
                "itemType": "string",
                "customType": "string[]",
                "itemExample": "",
                "itemDefault": ""
              },
              {
                "name": "errors",
                "kind": "required",
                "type": "array",
                "description": "Error response for validation errors",
                "modelRef": "#/components/schemas/ValidationErrorResponse",
                "customType": "ValidationErrorResponse[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "detail",
                    "kind": "required",
                    "type": "string",
                    "description": ""
                  },
                  {
                    "name": "reason",
                    "kind": "optional",
                    "type": "string",
                    "description": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/MultiStatusResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "The request contained information that the server was unable to process. Appropriate errors are provided in the response body.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Error response for validation errors",
            "customType": "ValidationErrorResponse[]",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "The provided credentials were not valid for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "UnauthorizedErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/UnauthorizedErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "User's roles are insufficient for this endpoint.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "The requested resource was not found in the NoChannel system.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "405",
        "description": "This is to indicate that the server has received a request with an HTTP method that is not supported for the requested resource.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "409",
        "description": "This response indicates that the server cannot process the request due to a conflict with the current state of the resource.  This typically occurs when a request attempts to create or modify a resource that already exists or conflicts with another resource.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ConflictErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              },
              {
                "name": "conflicts",
                "kind": "required",
                "type": "array",
                "description": "List of conflicting data points and their details",
                "modelRef": "#/components/schemas/ConflictDetail",
                "customType": "ConflictDetail[]",
                "schema": [
                  {
                    "name": "index",
                    "kind": "required",
                    "type": "integer",
                    "description": "Index of the conflicting data point in the request array"
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string",
                    "description": "ID of the conflicting data point"
                  },
                  {
                    "name": "existingResource",
                    "kind": "required",
                    "type": "string",
                    "description": "Reference to the existing resource that caused the conflict"
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/ConflictErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "423",
        "description": "<p>Consent Management is disabled or locked for the tenant, so consent operations are not allowed.</p>",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "array",
            "description": "Error response for validation errors",
            "customType": "ValidationErrorResponse[]",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ValidationErrorResponse",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "There was an internal server error.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "ErrorResponse",
            "schema": [
              {
                "name": "name",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "code",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "detail",
                "kind": "required",
                "type": "string",
                "description": ""
              },
              {
                "name": "reason",
                "kind": "optional",
                "type": "string",
                "description": ""
              }
            ],
            "modelRef": "#/components/schemas/ErrorResponse",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "-5s0tblT8EsVemxBF8P8U",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.upstartcommerce.com/v1/customer/consent/categories/batch \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'x-upstart-tenant: string' \\\n     --data '[\n     {\n     \"tenant\": \"\",\n     \"name\": \"\",\n     \"description\": \"\",\n     \"dataPoint\": [],\n     \"siteIds\": []\n     }\n     ]'"
        },
        {
          "id": "WNw2b-mxmuKmJq8AsOuGg",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"x-upstart-tenant\", \"string\");\n\nvar raw = JSON.stringify([\n   {\n      \"tenant\": \"\",\n      \"name\": \"\",\n      \"description\": \"\",\n      \"dataPoint\": [],\n      \"siteIds\": []\n   }\n]);\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.upstartcommerce.com/v1/customer/consent/categories/batch\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "wWKwbJgVd2p3rcajAom6z",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.upstartcommerce.com/v1/customer/consent/categories/batch\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"x-upstart-tenant\"] = \"string\"\nrequest.body = JSON.dump([\n   {\n      \"tenant\": \"\",\n      \"name\": \"\",\n      \"description\": \"\",\n      \"dataPoint\": [],\n      \"siteIds\": []\n   }\n])\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "EsGASFNN1pTrSundjs6MD",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.upstartcommerce.com/v1/customer/consent/categories/batch\"\n\npayload = json.dumps([\n   {\n      \"tenant\": \"\",\n      \"name\": \"\",\n      \"description\": \"\",\n      \"dataPoint\": [],\n      \"siteIds\": []\n   }\n])\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'x-upstart-tenant': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "-5s0tblT8EsVemxBF8P8U"
    },
    "results": {
      "languages": [
        {
          "id": "0nc98uqLVAdbKu2MVRSkA",
          "language": "201",
          "code": "// Custom Consent Categories Created Successfully\n[\n  {\n    \"id\": \"\",\n    \"tenant\": \"\",\n    \"name\": \"\",\n    \"description\": \"\",\n    \"dataPoint\": [\n      \"\"\n    ],\n    \"siteIds\": [\n      \"\"\n    ]\n  }\n]"
        },
        {
          "id": "x-45SrYiP5TLfZr0CS2ZT",
          "language": "207",
          "code": "{\n  \"successIds\": [\n    \"\"\n  ],\n  \"errors\": [\n    {\n      \"name\": \"\",\n      \"code\": \"\",\n      \"detail\": \"\",\n      \"reason\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "BE4fAEjpUZS23N0N-TfrV",
          "language": "400",
          "code": "// The request contained information that the server was unable to process. Appropriate errors are provided in the response body.\n[\n  {\n    \"name\": \"\",\n    \"code\": \"\",\n    \"detail\": \"\",\n    \"reason\": \"\"\n  }\n]"
        },
        {
          "id": "QVaeRUW0NFVNT5E0kUiou",
          "language": "401",
          "code": "// The provided credentials were not valid for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "Qxblx_I2HinBgquJxd2U2",
          "language": "403",
          "code": "// User's roles are insufficient for this endpoint.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "XWYHeizkFiaoFXg0Ru_3S",
          "language": "404",
          "code": "// The requested resource was not found in the NoChannel system.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "x8QGom47NMGO4LKjqFfMo",
          "language": "405",
          "code": "// This is to indicate that the server has received a request with an HTTP method that is not supported for the requested resource.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        },
        {
          "id": "4C0n-LRIr7nwZV8TP0izw",
          "language": "409",
          "code": "// This response indicates that the server cannot process the request due to a conflict with the current state of the resource.  This typically occurs when a request attempts to create or modify a resource that already exists or conflicts with another resource.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\",\n  \"conflicts\": [\n    {\n      \"index\": 0,\n      \"id\": \"\",\n      \"existingResource\": \"\"\n    }\n  ]\n}"
        },
        {
          "id": "M6o71ewSQhUNaPIJFDBOP",
          "language": "423",
          "code": "// Consent Management is disabled or locked for the tenant, so consent operations are not allowed.\n[\n  {\n    \"name\": \"\",\n    \"code\": \"\",\n    \"detail\": \"\",\n    \"reason\": \"\"\n  }\n]"
        },
        {
          "id": "MAJZgWGvwJeAad2dbt8ho",
          "language": "500",
          "code": "// There was an internal server error.\n{\n  \"name\": \"\",\n  \"code\": \"\",\n  \"detail\": \"\",\n  \"reason\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "0nc98uqLVAdbKu2MVRSkA"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}