Add tracked time to a issue
const url = 'https://gitea.com/api/v1/repos/example/example/issues/1/times';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"created":"2026-04-15T12:00:00Z","time":1,"user_name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://gitea.com/api/v1/repos/example/example/issues/1/times \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "created": "2026-04-15T12:00:00Z", "time": 1, "user_name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Index of the issue
Request Body
Section titled “Request Body”AddTimeOption options for adding time to an issue
object
Time in seconds
Username of the user who spent the time working on the issue (optional)
Examplegenerated
{ "created": "2026-04-15T12:00:00Z", "time": 1, "user_name": "example"}Responses
Section titled “Responses”TrackedTime
TrackedTime worked time for an issue / pr
object
ID is the unique identifier for the tracked time entry
Issue represents an issue in a repository
object
Attachment a generic attachment
object
DownloadURL is the URL to download the attachment
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
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private
The user’s website
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private
The user’s website
Label a label to an issue or a pr
object
Description provides additional context about the label’s purpose
ID is the unique identifier for the label
Name is the display name of the label
URL is the API endpoint for accessing this label
Milestone milestone is a collection of issues on one repository
object
ClosedIssues is the number of closed issues in this milestone
Description provides details about the milestone
ID is the unique identifier for the milestone
OpenIssues is the number of open issues in this milestone
StateType issue state type
Title is the title of the milestone
PullRequestMeta PR info if an issue is a PR
object
RepositoryMeta basic repository information
object
StateType issue state type
User represents a user
object
Is user active
URL to the user’s avatar
The user’s description
User counts
The user’s full name
URL to the user’s gitea page
The user’s id
Is the user an administrator
User locale
The user’s location
Login of the user, same as username
Identifier of the user, provided by the external authenticator (if configured)
Is user login prohibited
Is user restricted
The ID of the user’s Authentication Source
User visibility level option: public, limited, private
The user’s website
Deprecated (only for backwards compatibility)
Time in seconds
Deprecated (only for backwards compatibility)
Username of the user
Example
{ "issue": { "assignee": { "login_name": "empty" }, "assignees": [ { "login_name": "empty" } ], "labels": [ { "color": "00aabb", "exclusive": false, "is_archived": false } ], "user": { "login_name": "empty" } }}APIError is error format response
Headers
Section titled “Headers”APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”APINotFound is a not found empty response