curl --request POST \
--url https://context7.com/api/v1/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"libraryName": "/vercel/next.js"
}
'{
"message": "Refresh started successfully"
}Refresh a library
Trigger a refresh of an existing library to fetch the latest documentation. Library owners have dedicated refresh limits.
curl --request POST \
--url https://context7.com/api/v1/refresh \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"libraryName": "/vercel/next.js"
}
'{
"message": "Refresh started successfully"
}Authorizations
Get your API key at context7.com/dashboard. Treat your API key like a password and store it securely. Every key can read the management API (/v2/teamspaces/*), except personal data: member and invitation emails, library requesters, visitor questions, Docs7 reader searches, conversations, feedback and feature requests, and the GitHub account behind a build. To read those or make changes there, the key must be created with Write access ticked; other keys get 403 write_access_required.
Body
Library identifier — the URL path of the library on context7.com. Use /owner/repo for GitHub repositories (e.g., /vercel/next.js), or /<source>/<id> for other sources (e.g., /websites/uploadcare_com, /llmstxt/<source>). See Library ID format.
Optional branch name to refresh
Optional Git access token for refreshing private repositories. If not provided, the stored OAuth token will be used.
Response
Refresh started successfully
Was this page helpful?