Rebuild an index

Start a new build for an index whose last build failed. A failed build is never retried automatically, because a build that failed because of the data in the list (for example, an alias index where more than one item has the same value) would only fail again. Fix the problem, then rebuild the index.

The index is built in the background, so its buildStatus is building when this returns. See index builds for how to wait for it to be ready.

Only an index whose buildStatus is failed can be rebuilt. Rebuilding an index that is ready or already building is refused with the INDEX_BUILD_NOT_FAILED error code.

POST https://api.jsonpad.io/lists/{listId}/indexes/{indexId}/rebuild

Example

cURL
1234curl https://api.jsonpad.io/lists/db398168-6f3f-436f-96b7-04856a6662e8/indexes/fbb9d1bd-7173-4e3c-8c0d-6ba16867bb11/rebuild \
  -X POST \
  -H "Content-Type: application/json" \
  -H "x-api-token: <YOUR TOKEN>"

Parameters

  • required
    listIdstringA list id or path name.
  • required
    indexIdstringAn index id or path name.

Request headers

  • required
    x-api-tokenstringYour API token. The token needs permission to update the index.

Request body

No request body

Response body

202 Accepted
{
id: "1e546efd-4d44-425f-b9ff-869614443cd4"
createdAt: "2026-09-14T21:47:31.530Z"
updatedAt: "2026-09-14T21:47:31.530Z"
name: "Sample Index"
description: ""
tags: [
0: "my-app"
]
pathName: "sample-index"
pointer: "/name"
valueType: "string"
alias: true
sorting: false
filtering: false
searching: false
guard: false
defaultOrderDirection: "asc"
activated: true
buildStatus: "building"
}

Response headers

  • last-modified2026-09-14T21:47:31.530ZThe date this index was last modified.
2026-09-14