Create an index

Create a new index for a list.

The index is created straight away, with a buildStatus of building, and its values are built for every item in the list in the background. Sorting, filtering, alias lookups and search that use the index are refused until it's ready. See index builds.

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

Example

cURL
12345678910111213141516curl https://api.jsonpad.io/lists/c472aa10-75b5-4228-a4c3-2e237b8c5c7f/indexes \ -H "Content-Type: application/json" \ -H "x-api-token: <YOUR TOKEN>" \ -d '{ "name": "My New Index", "description": "This is a new index", "pathName": "my-new-index", "pointer": "/name", "valueType": "string", "alias": true, "sorting": true, "filtering": true, "searching": true, "defaultOrderDirection": "asc", "activated": true }'

Parameters

  • required
    listIdstringA list id or path name.

Request headers

  • required
    x-api-tokenstringYour API token.

Request body

{
name: "Sample Index"
description: ""
tags: [
0: "my-app"
]
pathName: "sample-index"
pointer: "/name"
valueType: "string"
alias: false
sorting: false
filtering: false
searching: false
guard: false
defaultOrderDirection: "asc"
activated: true
}
  • optional
    namestringThe name of the index.
  • optional
    descriptionstringA description of the index.
  • optional
    tagsstring[]

    Tags for grouping related resources together, e.g. ["recipe-app", "production"].

    Tags are stored lowercase and can only contain letters, numbers, hyphens and underscores. There can be up to 20 tags, each up to 50 characters long.

    Setting tags replaces all of the existing tags, and an empty array removes them.

  • required
    pathNamestringThe path name of the index. This is used in URL query parameters to sort and filter items.
  • required
    pointerstringA JSON pointer to the field in the item data that the index points to.
  • optional
    valueType'string' | 'number' | 'date'

    The type of value that the index points to.

  • optional
    aliasbooleanWhether the index is an alias index. Each list can only have one alias index.
  • optional
    sortingbooleanWhether the index can be used for sorting items.
  • optional
    filteringbooleanWhether the index can be used for filtering items.
  • optional
    searchingbooleanWhether the index can be used for searching for items.
  • optional
    guardboolean

    Whether the value at the index pointer is hidden from item data in token auth mode. The value can still be written.

    A guard index can't also be an alias index, or be used for sorting, filtering or searching, because each of those would expose the value it hides.

  • optional
    defaultOrderDirection'asc' | 'desc'When sorting items using this index, this is the default order direction.
  • optional
    activatedbooleanWhether the index is activated. Inactive indexes are not accessible or usable via the API.

Response body

201 Created
{
id: "2efaa8f9-44c7-4855-abe6-41c90198bc3d"
createdAt: "2026-09-23T21:08:33.164Z"
updatedAt: "2026-09-23T21:08:33.164Z"
name: "Sample Index"
description: ""
tags: [
0: "my-app"
]
pathName: "sample-index"
pointer: "/name"
valueType: "string"
alias: false
sorting: false
filtering: false
searching: false
guard: false
defaultOrderDirection: "asc"
activated: true
buildStatus: "building"
}

Response headers

  • locationhttps://api.jsonpad.io/lists/abbf6af9-079a-4fce-839f-88344f26b4b4/indexes/138b3d48-3ad1-451a-b41b-b994aa1be664The URL of the newly created index.
  • last-modified2026-09-23T21:08:33.164ZThe date this index was last modified.
2026-09-13