---
title: "Refresh a library"
method: POST
path: "/v1/refresh"
tags: ["Refresh"]
---

# Refresh a library

`POST /v1/refresh`

Trigger a refresh of an existing library to fetch the latest documentation. Library owners have dedicated refresh limits.

## Request body

- object
  - `libraryName` string, required — 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](/api-guide#library-id-format).
  - `branch` string — Optional branch name to refresh
  - `gitToken` string — Optional Git access token for refreshing private repositories. If not provided, the stored OAuth token will be used.

## Response `200`

Refresh started successfully

- object
  - `message` string, required

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - Insufficient permissions or plan restrictions
- `404` — Not Found - Resource doesn't exist
- `429` — Too Many Requests - Rate limit exceeded
- `500` — Internal Server Error

---

[API](https://skmtc.dev/context7/apis/context7-public-api.md) · [All operations](https://skmtc.dev/context7/apis/context7-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/context7/context7-public-api/revisions/5e85fc74bff0/schema)
