Watch a repo
PUT
/repos/{owner}/{repo}/subscription
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
required
string
Owner of the repo
repo
required
string
Name of the repo
Responses
Section titled “Responses”WatchInfo
WatchInfo represents an API watch status of one repository
object
created_at
string format: date-time
ignored
boolean
reason
repository_url
string
subscribed
boolean
url
string
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
created_at
string format: date-time
ignored
boolean
reason
repository_url
string
subscribed
boolean
url
string
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string
APINotFound is a not found empty response