Skip to content
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!

Mark notification threads as read, pinned or unread on a specific repo

PUT
/repos/{owner}/{repo}/notifications
curl --request PUT \
--url https://gitea.com/api/v1/repos/example/example/notifications \
--header 'Authorization: Basic <credentials>'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

all
string

If true, mark all notifications on this repo. Default value is false

status-types
Array<string>

Mark notifications with the provided status types. Options are: unread, read and/or pinned. Defaults to unread.

to-status
string

Status to mark notifications as. Defaults to read.

last_read_at
string format: date-time

Describes the last point that notifications were checked. Anything updated since this time will not be updated.

NotificationThreadList

Media typeapplication/json
Array<object>

NotificationThread expose Notification on API

object
id

ID is the unique identifier for the notification thread

integer format: int64
pinned

Pinned indicates if the notification is pinned

boolean
repository

Repository represents a repository

object
allow_fast_forward_only_merge
boolean
allow_manual_merge
boolean
allow_merge_commits
boolean
allow_merge_update
boolean
allow_rebase
boolean
allow_rebase_explicit
boolean
allow_rebase_update
boolean
allow_squash_merge
boolean
archived
boolean
archived_at
string format: date-time
autodetect_manual_merge
boolean
avatar_url
string format: uri
branch_count
integer format: int64
clone_url
string format: uri
created_at
string format: date-time
default_allow_maintainer_edit
boolean
default_branch
string
default_delete_branch_after_merge
boolean
default_merge_style
string
default_target_branch
string
default_update_style
string
description
string
empty
boolean
external_tracker

ExternalTracker represents settings for external tracker

object
external_tracker_format

External Issue Tracker URL Format. Use the placeholders {user}, {repo} and {index} for the username, repository name and issue index.

string
external_tracker_regexp_pattern

External Issue Tracker issue regular expression

string
external_tracker_style

External Issue Tracker Number Format, either numeric, alphanumeric, or regexp

string
external_tracker_url

URL of external issue tracker.

string format: uri
external_wiki

ExternalWiki represents setting for external wiki

object
external_wiki_url

URL of external wiki.

string format: uri
fork
boolean
forks_count
integer format: int64
full_name
string
has_actions
boolean
has_code
boolean
has_issues
boolean
has_packages
boolean
has_projects
boolean
has_pull_requests
boolean
has_releases
boolean
has_wiki
boolean
html_url
string format: uri
id
integer format: int64
ignore_whitespace_conflicts
boolean
internal
boolean
internal_tracker

InternalTracker represents settings for internal tracker

object
allow_only_contributors_to_track_time

Let only contributors track time (Built-in issue tracker)

boolean
enable_issue_dependencies

Enable dependencies for issues and pull requests (Built-in issue tracker)

boolean
enable_time_tracker

Enable time tracking (Built-in issue tracker)

boolean
language
string
languages_url
string format: uri
licenses
Array<string>
link
string
mirror
boolean
mirror_interval
string
mirror_last_sync_at
string format: date-time
mirror_updated
string format: date-time
name
string
object_format_name

ObjectFormatName of the underlying git repository sha1 ObjectFormatSHA1 sha256 ObjectFormatSHA256

string
Allowed values: sha1 sha256
open_issues_count
integer format: int64
open_pr_counter
integer format: int64
original_url
string format: uri
owner

User represents a user

object
active

Is user active

boolean
avatar_url

URL to the user’s avatar

string format: uri
created
string format: date-time
description

The user’s description

string
email
string format: email
followers_count

User counts

integer format: int64
following_count
integer format: int64
full_name

The user’s full name

string
html_url

URL to the user’s gitea page

string format: uri
id

The user’s id

integer format: int64
is_admin

Is the user an administrator

boolean
language

User locale

string
last_login
string format: date-time
location

The user’s location

string
login

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
parent
object recursive
permissions

Permission represents a set of permissions

object
admin
boolean
pull
boolean
push
boolean
private
boolean
projects_mode
string
release_counter
integer format: int64
repo_transfer

RepoTransfer represents a pending repo transfer

object
doer

User represents a user

object
active

Is user active

boolean
avatar_url

URL to the user’s avatar

string format: uri
created
string format: date-time
description

The user’s description

string
email
string format: email
followers_count

User counts

integer format: int64
following_count
integer format: int64
full_name

The user’s full name

string
html_url

URL to the user’s gitea page

string format: uri
id

The user’s id

integer format: int64
is_admin

Is the user an administrator

boolean
language

User locale

string
last_login
string format: date-time
location

The user’s location

string
login

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
recipient

User represents a user

object
active

Is user active

boolean
avatar_url

URL to the user’s avatar

string format: uri
created
string format: date-time
description

The user’s description

string
email
string format: email
followers_count

User counts

integer format: int64
following_count
integer format: int64
full_name

The user’s full name

string
html_url

URL to the user’s gitea page

string format: uri
id

The user’s id

integer format: int64
is_admin

Is the user an administrator

boolean
language

User locale

string
last_login
string format: date-time
location

The user’s location

string
login

Login of the user, same as username

string
login_name

Identifier of the user, provided by the external authenticator (if configured)

string
default: empty
prohibit_login

Is user login prohibited

boolean
restricted

Is user restricted

boolean
source_id

The ID of the user’s Authentication Source

integer format: int64
starred_repos_count
integer format: int64
visibility

User visibility level option: public, limited, private public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The user’s website

string
teams
Array<object>

Team represents a team in an organization

object
can_create_org_repo

Whether the team can create repositories in the organization

boolean
description

The description of the team

string
id

The unique identifier of the team

integer format: int64
includes_all_repositories

Whether the team has access to all repositories in the organization

boolean
name

The name of the team

string
organization

Organization represents an organization

object
avatar_url

The URL of the organization’s avatar

string format: uri
description

The description of the organization

string
email

The email address of the organization

string
full_name

The full display name of the organization

string
id

The unique identifier of the organization

integer format: int64
location

The location of the organization

string
name

The name of the organization

string
repo_admin_change_team_access

Whether repository administrators can change team access

boolean
username

Username of the organization deprecated

string
visibility

The visibility level of the organization (public, limited, private) public UserVisibilityPublic limited UserVisibilityLimited private UserVisibilityPrivate

string
Allowed values: public limited private
website

The website URL of the organization

string
permission
string
Allowed values: none read write admin owner
units
Array<string>
units_map
object
key
additional properties
string
visibility

Team visibility within the organization. “private” teams are only listable by members and org owners; “limited” teams are listable by any organization member; “public” teams are listable by any signed-in user. public TeamVisibilityPublic limited TeamVisibilityLimited private TeamVisibilityPrivate

string
Allowed values: public limited private
size
integer format: int64
ssh_url
string format: uri
stars_count
integer format: int64
template
boolean
topics
Array<string>
updated_at
string format: date-time
url
string format: uri
watchers_count
integer format: int64
website
string
subject

NotificationSubject contains the notification subject (Issue/Pull/Commit)

object
html_url

HTMLURL is the web URL for the notification subject

string format: uri
latest_comment_html_url

LatestCommentHTMLURL is the web URL for the latest comment

string format: uri
latest_comment_url

LatestCommentURL is the API URL for the latest comment

string format: uri
state

State indicates the current state of the notification subject open NotifySubjectStateOpen is an open subject closed NotifySubjectStateClosed is a closed subject merged NotifySubjectStateMerged is a merged pull request

string
Allowed values: open closed merged
title

Title is the title of the notification subject

string
type

Type indicates the type of the notification subject Issue NotifySubjectIssue a issue is subject of an notification Pull NotifySubjectPull a pull is subject of an notification Commit NotifySubjectCommit a commit is subject of an notification Repository NotifySubjectRepository a repository is subject of an notification

string
Allowed values: Issue Pull Commit Repository
url

URL is the API URL for the notification subject

string format: uri
unread

Unread indicates if the notification has been read

boolean
updated_at

UpdatedAt is the time when the notification was last updated

string format: date-time
url

URL is the API URL for this notification thread

string format: uri
Example
[
{
"repository": {
"object_format_name": "sha1",
"owner": {
"login_name": "empty",
"visibility": "public"
},
"repo_transfer": {
"doer": {
"login_name": "empty",
"visibility": "public"
},
"recipient": {
"login_name": "empty",
"visibility": "public"
},
"teams": [
{
"organization": {
"visibility": "public"
},
"permission": "none",
"units": [
"repo.code",
"repo.issues",
"repo.ext_issues",
"repo.wiki",
"repo.pulls",
"repo.releases",
"repo.projects",
"repo.ext_wiki"
],
"units_map": {
"repo.code": "read",
"repo.ext_issues": "none",
"repo.ext_wiki": "none",
"repo.issues": "write",
"repo.projects": "none",
"repo.pulls": "owner",
"repo.releases": "none",
"repo.wiki": "admin"
},
"visibility": "public"
}
]
}
},
"subject": {
"state": "open",
"type": "Issue"
}
}
]