Edit a release attachment
const url = 'https://gitea.com/api/v1/repos/example/example/releases/1/assets/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gitea.com/api/v1/repos/example/example/releases/1/assets/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Id of the release
Id of the attachment to edit
Request Body
Section titled “Request Body”Options for editing attachments
object
Name is the new filename for the attachment
Example generated
{ "name": "example"}Responses
Section titled “Responses”Attachment
A generic attachment
object
DownloadURL is the URL to download the attachment
Created is the time when the attachment was uploaded
Digest is the SHA-256 of the content as “sha256:{hex}”, omitted when not recorded at upload
DownloadCount is the number of times the attachment has been downloaded
ID is the unique identifier for the attachment
Name is the filename of the attachment
Size is the file size in bytes
UUID is the unique identifier for the attachment file
Example generated
{ "browser_download_url": "https://example.com", "created_at": "2026-04-15T12:00:00Z", "digest": "example", "download_count": 1, "id": 1, "name": "example", "size": 1, "uuid": "example"}default
Section titled “default”APIError is error format response
Is an api error with a message
object
Message contains the error description
URL contains the documentation URL for this error
Example generated
{ "message": "example", "url": "https://example.com"}