Show examples in:
Javascript HTTP
Endpoint info
Available examples
Content Management API > Search Index

Trigger the indexing process

Manually trigger a spidering of the website to update the search index

Examples

POST https://site-api.datocms.com/search-indexes/:search_index_id/trigger HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Terminal window
curl -g 'https://site-api.datocms.com/search-indexes/:search_index_id/trigger' \
-X POST \
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3"
await fetch(
"https://site-api.datocms.com/search-indexes/:search_index_id/trigger",
{
method: "POST",
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
},
},
);