> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Custom Index

Use this API to trigger the creation of a custom search index for data elements. The response will include the `runId` that can be used to query the current creation status using the [Get Index Creation Status API](https://developer.onetrust.com/onetrust/reference/getindexcreationstatus).

> 🗒 Things to Know
> 
> - Each account is limited to only one custom search index.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Universal Consent & Preference Management (OAS)",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Universal Consent & Preference Management APIs are used to integrate external systems and streamline the flow of data with Universal Consent & Preference Management in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Custom Index Management",
      "x-displayName": "Custom Index Management"
    }
  ],
  "paths": {
    "/api/consentmanager/v1/custom-indexes": {
      "post": {
        "operationId": "createIndex",
        "summary": "Create Custom Index",
        "description": "Use this API to trigger the creation of a custom search index for data elements. The response will include the `runId` that can be used to query the current creation status using the [Get Index Creation Status API](https://developer.onetrust.com/onetrust/reference/getindexcreationstatus).\n\n> 🗒 Things to Know\n> \n> - Each account is limited to only one custom search index.",
        "tags": [
          "Custom Index Management"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Index creation successfully triggered",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized access",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerResponse"
                }
              }
            }
          },
          "403": {
            "description": "Insufficient permissions to create custom indexes",
            "content": {
              "*/*": {
                "schema": {
                  "$ref": "#/components/schemas/ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "ConsentPreferences-UniversalConsentPreferenceManag_OAUTH2": [
              "CONSENT"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerResponse": {
        "type": "object",
        "properties": {
          "runId": {
            "description": "Unique identifier for the pipeline run",
            "type": "string",
            "example": "123e4567-e89b-12d3-a456-426614174000"
          },
          "status": {
            "description": "Status of the pipeline trigger",
            "type": "string",
            "example": "InProgress"
          }
        }
      },
      "ConsentPreferences-UniversalConsentPreferenceManag_PipelineTriggerRequest": {
        "type": "object",
        "properties": {
          "operationName": {
            "description": "The parameter representing the operation to be performed. Supported value is CREATE_DATA_ELEMENT_SEARCH_INDEX.",
            "type": "string",
            "enum": [
              "CREATE_DATA_ELEMENT_SEARCH_INDEX"
            ]
          },
          "parameters": {
            "description": "Map of parameters required for the index creation. dataElementName parameter is mandatory for operation CREATE_DATA_ELEMENT_SEARCH_INDEX ",
            "additionalProperties": {
              "type": "object",
              "description": "Map of parameters required for the index creation. dataElementName parameter is mandatory for operation CREATE_DATA_ELEMENT_SEARCH_INDEX ",
              "example": {
                "dataElementName": "City"
              }
            },
            "example": {
              "dataElementName": "City"
            },
            "type": "object"
          }
        },
        "example": {
          "operationName": "CREATE_DATA_ELEMENT_SEARCH_INDEX",
          "parameters": {
            "dataElementName": "City"
          }
        },
        "required": [
          "operationName",
          "parameters"
        ]
      }
    },
    "securitySchemes": {
      "ConsentPreferences-UniversalConsentPreferenceManag_OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "CONSENT": "Consent Scope gives the user access to read/write operations",
              "CONSENT_READ": "Consent Read Scope gives the user read-only access"
            }
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  }
}
```