Delete Text Index

Deletes a text index.

The Delete Text Index API deletes a text index that you have previously created with the Create Text Index API.

Tip: You can also delete text indexes by using the Text Indexes Account page.

Quick Start

To delete an index, you send a request to the Delete Text Index API, including the name of the index that you want to delete.


Delete Text Index permanently removes an index, which might contain any number of documents, and might be difficult to rebuild. For this reason, the Delete Text Index API requires a two-step process. The first request returns a confirmation hash.

  "deleted": false,
  "confirm": "1397425069:af9164dd93574d211f89ea84089ca910"

You must then send a second request to finalize the decision to delete your index. This second call requires the confirm parameter, which must hold the value returned in the confirm response element of the first call.


After this second request, the index is deleted from Haven OnDemand, along with any data that the index contains.

  "deleted": true,
  "index": "myindex"

After the second call is complete, there is no way to retrieve any documents from the deleted index.

For general information about Haven OnDemand unstructured text indexing, see Text Indexes - Key Concepts. You might also like to look at our beginner and advanced how tos: Introduction to Haven OnDemand Unstructured Text Indexing and Advanced Haven OnDemand Unstructured Text Indexing.


This API requires an authentication token to be supplied in the following parameter:

Parameter Description
apikey The API key to use to authenticate the API request.

This API accepts the following parameters:

Name Type Description
resource The name of the index to delete.
Name Type Description
string The confirmation hash key returned after the first request.

This API returns a JSON response that is described by the model below. This single model is presented both as an easy to read abstract definition and as the formal JSON schema.

Asynchronous Use

Additional requests are required to get the result if this API is invoked asynchronously.

You can use /1/job/status/<job-id> to get the status of the job, including results if the job is finished.

You can also use /1/job/result/<job-id>, which waits until the job has finished and then returns the result.

This is an abstract definition of the response that describes each of the properties that might be returned.
Delete Text Index Response {
confirm ( string , optional) The confirmation hash required for deletion.
deleted ( boolean ) Whether or not the index was deleted.
index ( string , optional) The index name
Model Schema
This is a JSON schema that describes the syntax of the response. See for a complete reference.
    "properties": {
        "confirm": {
            "type": "string"
        "deleted": {
            "type": "boolean"
        "index": {
            "type": "string"
    "required": [
    "type": "object"

If you would like to provide us with more information then please use the box below:

We will use your submission to help improve our product.