API reference
Next.js cache
A Next.js app's cached pages and data (ISR, the data cache) and renewing them by tag or path from outside the app.
POST
/v1/projects/{project}/apps/{name}/revalidateRevalidate a Next.js app's cached pages and data#
Renew tags and page paths of a Next.js app's cache now; every edge serves the new page on its next request. type is revalidatePath's second argument and applies to every path. Errors 400 bad_revalidate, bad_tag, bad_page, too_many, no_deploy, 404 not_found, 409 no_cache.
- Credential
- An API key or a dashboard session
- Roles
- owner, admin, developer
Parameters
anynamestringpathrequiredthe app's name in the project (any case) or its id
environmentstringqueryproduction (default) or preview-<branch>
Request bodyapplication/json
tagsstring[]0–128 items
pathsstring[]0–128 items
typestringone of
page,layout
Response
200object
appstringenvironmentstringrevalidatedobjecttagsstring[]pathsstring[]
tag_countintegeratstring (date-time)
Errors
| Status | Description |
|---|---|
| 400 | bad_revalidate, bad_tag, bad_page, too_many or no_deploy |
| 401 | unauthorized: missing, invalid, expired or revoked credential |
| 403 | forbidden |
| 404 | not_found |
| 409 | no_cache |
| 500 | internal: an unexpected failure |
Example
curl -X POST "https://api.ibel.ai/v1/projects/my-api/apps/my-api/revalidate" \
-H "Authorization: Bearer $KEY" \
-d '{"tags":["…"],"paths":["…"],"type":"page"}'