Watch a repo
const url = 'https://gitea.example.com/api/v1/repos/example/example/subscription';const options = {method: 'PUT', headers: {Authorization: 'Basic <credentials>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://gitea.example.com/api/v1/repos/example/example/subscription \ --header 'Authorization: Basic <credentials>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Responses
Section titled “Responses”WatchInfo
WatchInfo represents an API watch status of one repository
object
The timestamp when the watch status was created
Whether notifications for the repository are ignored
The reason for the current watch status
The URL of the repository being watched
Whether the repository is being watched for notifications
The URL for managing the watch status
Examplegenerated
{ "created_at": "2026-04-15T12:00:00Z", "ignored": true, "reason": "example", "repository_url": "example", "subscribed": true, "url": "example"}WatchInfo represents an API watch status of one repository
object
The timestamp when the watch status was created
Whether notifications for the repository are ignored
The reason for the current watch status
The URL of the repository being watched
Whether the repository is being watched for notifications
The URL for managing the watch status
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APINotFound is a not found empty response