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

Edit an issue. If using deadline only the date will be taken into account, and time of day ignored.

PATCH
/repos/{owner}/{repo}/issues/{index}
curl --request PATCH \
--url https://gitea.com/api/v1/repos/example/example/issues/1 \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "assignee": "example", "assignees": [ "example" ], "body": "example", "content_version": 1, "due_date": "2026-04-15T12:00:00Z", "milestone": 1, "projects": [ 1 ], "ref": "example", "state": "example", "title": "example", "unset_due_date": true }'

Pass content_version to enable optimistic locking on body edits. If the version doesn’t match the current value, the request fails with 409 Conflict.

owner
required
string

Owner of the repo

repo
required
string

Name of the repo

index
required
integer format: int64

Index of the issue to edit

Media typeapplication/json

EditIssueOption options for editing an issue

object
assignee

Deprecated

string
assignees
Array<string>
body
string
content_version

The current version of the issue content to detect conflicts during editing

integer format: int64
due_date
string format: date-time
milestone
integer format: int64
projects

List of project ids to set (replaces existing projects)

Array<integer>
ref
string
state
string
title
string
unset_due_date
boolean
Examplegenerated
{
"assignee": "example",
"assignees": [
"example"
],
"body": "example",
"content_version": 1,
"due_date": "2026-04-15T12:00:00Z",
"milestone": 1,
"projects": [
1
],
"ref": "example",
"state": "example",
"title": "example",
"unset_due_date": true
}

Issue

Media typeapplication/json

Issue represents an issue in a repository

object
assets
Array<object>

Attachment a generic attachment

object
browser_download_url

DownloadURL is the URL to download the attachment

string format: uri
created_at
string format: date-time
download_count

DownloadCount is the number of times the attachment has been downloaded

integer format: int64
id

ID is the unique identifier for the attachment

integer format: int64
name

Name is the filename of the attachment

string
size

Size is the file size in bytes

integer format: int64
uuid

UUID is the unique identifier for the attachment file

string
assignee

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
assignees
Array<object>

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
body
string
closed_at
string format: date-time
comments
integer format: int64
content_version

The version of the issue content for optimistic locking

integer format: int64
created_at
string format: date-time
due_date
string format: date-time
html_url
string format: uri
id
integer format: int64
is_locked
boolean
labels
Array<object>

Label a label to an issue or a pr

object
color
string
description

Description provides additional context about the label’s purpose

string
exclusive
boolean
id

ID is the unique identifier for the label

integer format: int64
is_archived
boolean
name

Name is the display name of the label

string
url

URL is the API endpoint for accessing this label

string format: uri
milestone

Milestone milestone is a collection of issues on one repository

object
closed_at
string format: date-time
closed_issues

ClosedIssues is the number of closed issues in this milestone

integer format: int64
created_at
string format: date-time
description

Description provides details about the milestone

string
due_on
string format: date-time
id

ID is the unique identifier for the milestone

integer format: int64
open_issues

OpenIssues is the number of open issues in this milestone

integer format: int64
state

State indicates if the milestone is open or closed open StateOpen pr is opened closed StateClosed pr is closed

string
Allowed values: open closed
title

Title is the title of the milestone

string
updated_at
string format: date-time
number
integer format: int64
original_author
string
original_author_id
integer format: int64
pin_order
integer format: int64
projects
Array<object>

Project represents a project

object
closed_at
string format: date-time
created_at
string format: date-time
creator_id

CreatorID is the user who created the project

integer format: int64
description

Description provides details about the project

string
id

ID is the unique identifier for the project

integer format: int64
is_closed

IsClosed indicates if the project is closed

boolean
owner_id

OwnerID is the owner of the project (for org-level projects)

integer format: int64
repo_id

RepoID is the repository this project belongs to (for repo-level projects)

integer format: int64
title

Title is the title of the project

string
updated_at
string format: date-time
pull_request

PullRequestMeta PR info if an issue is a PR

object
draft
boolean
html_url
string format: uri
merged
boolean
merged_at
string format: date-time
ref
string
repository

RepositoryMeta basic repository information

object
full_name
string
id
integer format: int64
name
string
owner
string
state
string
Allowed values: open closed
time_estimate
integer format: int64
title
string
updated_at
string format: date-time
url
string format: uri
user

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
Example
{
"assignee": {
"login_name": "empty",
"visibility": "public"
},
"assignees": [
{
"login_name": "empty",
"visibility": "public"
}
],
"labels": [
{
"color": "00aabb",
"exclusive": false,
"is_archived": false
}
],
"milestone": {
"state": "open"
},
"state": "open",
"user": {
"login_name": "empty",
"visibility": "public"
}
}

APIForbiddenError is a forbidden error response

message
string
url
string

APINotFound is a not found empty response

APIError is error format response

message
string
url
string