# Gitea API. API documentation version 1.1.1

http://example.com/api/v1

### Gitea API.

This documentation describes the Gitea API.

### /markdown

#### /markdown post

post

Render a markdown document as HTML

#### post /markdown

Render a markdown document as HTML

Secured by basicauth
Secured by token

### Body

Media type: text/plain

Type: object

Properties

- Context: (string)

  Context to render

  in: body

- Mode: (string)

  Mode to render

  in: body

- Text: (string)

  Text markdown to render

  in: body

- Wiki: (boolean)

  Is it a wiki page ?

  in: body

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /markdown/raw post

post

Render raw markdown as HTML

#### post /markdown/raw

Render raw markdown as HTML

Secured by basicauth
Secured by token

### Body

Media type: text/plain

Type: string

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /org

#### /org/{org}/repos post

post

Create a repository in an organization

#### post /org/{org}/repos

Create a repository in an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of organization

### Body

Media type: application/json

Type: object

Properties

- name: required (string)

  Name of the repository to create

- auto_init: (boolean)

  Whether the repository should be auto-intialized?

- description: (string)

  Description of the repository to create

- gitignores: (string)

  Gitignores to use

- license: (string)

  License to use

- private: (boolean)

  Whether the repository is private

- readme: (string)

  Readme of the repository to create

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /repositories

#### /repositories/{id} get

get

Get a repository by id

#### get /repositories/{id}

Get a repository by id

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the repo to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /user

#### /user get

get

Get the authenticated user

#### get /user

Get the authenticated user

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/emails get post delete

get

List the authenticated user's email addresses

post

Add email addresses

delete

Delete email addresses

#### get /user/emails

List the authenticated user's email addresses

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Email

Items: Email

- email: (string)
- primary: (boolean)
- verified: (boolean)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /user/emails

Add email addresses

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- emails: (array of items)

  email addresses to add

## HTTP status code 201

Success

### Body

Media type: application/json

Type: array of Email

Items: Email

- email: (string)
- primary: (boolean)
- verified: (boolean)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /user/emails

Delete email addresses

Secured by basicauth
Secured by token

### Body

Media type: text/plain

Type: object

Properties

- emails: (array of items)

  email addresses to delete

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/followers get

get

List the authenticated user's followers

#### get /user/followers

List the authenticated user's followers

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/following get

get

List the users that the authenticated user is following

#### get /user/following

List the users that the authenticated user is following

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/following/{followee} get

get

Check whether a user is followed by the authenticated user

#### get /user/following/{followee}

Check whether a user is followed by the authenticated user

Secured by basicauth
Secured by token

### URI Parameters

- followee: required (string)

  username of followed user

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/following/{username} put delete

put

Follow a user

delete

Unfollow a user

#### put /user/following/{username}

Follow a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to follow

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /user/following/{username}

Unfollow a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to follow

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/gpg_keys get post

get

List the authenticated user's GPG keys

post

Create a GPG key

#### get /user/gpg_keys

List the authenticated user's GPG keys

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of GPGKey

Items: GPGKey

- can_certify: (boolean)
- can_encrypt_comms: (boolean)
- can_encrypt_storage: (boolean)
- can_sign: (boolean)
- created_at: (datetime)
- emails: (array of GPGKeyEmail)

  Items: GPGKeyEmail

  - email: (string)
  - verified: (boolean)
- expires_at: (datetime)
- id: (integer)
- key_id: (string)
- primary_key_id: (string)
- public_key: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /user/gpg_keys

Create a GPG key

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- armored_public_key: required (string)

  An armored GPG key to add

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- can_certify: (boolean)
- can_encrypt_comms: (boolean)
- can_encrypt_storage: (boolean)
- can_sign: (boolean)
- created_at: (datetime)
- emails: (array of GPGKeyEmail)

  Items: GPGKeyEmail

  - email: (string)
  - verified: (boolean)
- expires_at: (datetime)
- id: (integer)
- key_id: (string)
- primary_key_id: (string)
- public_key: (string)

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/gpg_keys/{id} get delete

get

Get a GPG key

delete

Remove a GPG key

#### get /user/gpg_keys/{id}

Get a GPG key

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of key to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- can_certify: (boolean)
- can_encrypt_comms: (boolean)
- can_encrypt_storage: (boolean)
- can_sign: (boolean)
- created_at: (datetime)
- emails: (array of GPGKeyEmail)

  Items: GPGKeyEmail

  - email: (string)
  - verified: (boolean)
- expires_at: (datetime)
- id: (integer)
- key_id: (string)
- primary_key_id: (string)
- public_key: (string)

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /user/gpg_keys/{id}

Remove a GPG key

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of key to get

## HTTP status code 403

APIForbiddenError is a forbidden error response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/keys get post

get

List the authenticated user's public keys

post

Create a public key

#### get /user/keys

List the authenticated user's public keys

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of PublicKey

Items: PublicKey

- created_at: (datetime)
- fingerprint: (string)
- id: (integer)
- key: (string)
- title: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /user/keys

Create a public key

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- key: required (string)

  An armored SSH key to add

- title: required (string)

  Title of the key to add

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- fingerprint: (string)
- id: (integer)
- key: (string)
- title: (string)
- url: (string)

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/keys/{id} get delete

get

Get a public key

delete

Delete a public key

#### get /user/keys/{id}

Get a public key

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of key to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- fingerprint: (string)
- id: (integer)
- key: (string)
- title: (string)
- url: (string)

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /user/keys/{id}

Delete a public key

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of key to get

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/orgs get

get

List the current user's organizations

#### get /user/orgs

List the current user's organizations

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Organization

Items: Organization

- avatar_url: (string)
- description: (string)
- full_name: (string)
- id: (integer)
- location: (string)
- username: (string)
- website: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/repos get post

get

List the repos that the authenticated user owns or has access to

post

Create a repository

#### get /user/repos

List the repos that the authenticated user owns or has access to

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /user/repos

Create a repository

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- name: required (string)

  Name of the repository to create

- auto_init: (boolean)

  Whether the repository should be auto-intialized?

- description: (string)

  Description of the repository to create

- gitignores: (string)

  Gitignores to use

- license: (string)

  License to use

- private: (boolean)

  Whether the repository is private

- readme: (string)

  Readme of the repository to create

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/starred get

get

The repos that the authenticated user has starred

#### get /user/starred

The repos that the authenticated user has starred

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/starred/{owner}/{repo} get put delete

get

Whether the authenticated is starring the repo

put

Star the given repo

delete

Unstar the given repo

#### get /user/starred/{owner}/{repo}

Whether the authenticated is starring the repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### put /user/starred/{owner}/{repo}

Star the given repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /user/starred/{owner}/{repo}

Unstar the given repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/subscriptions get

get

List repositories watched by the authenticated user

#### get /user/subscriptions

List repositories watched by the authenticated user

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/times get

get

List the current user's tracked times

#### get /user/times

List the current user's tracked times

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of TrackedTime

Items: TrackedTime

- created: (datetime)
- id: (integer)
- issue_id: (integer)
- time: (integer)

  Time in seconds

- user_id: (integer)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /user/{username}/orgs get

get

List a user's organizations

#### get /user/{username}/orgs

List a user's organizations

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Organization

Items: Organization

- avatar_url: (string)
- description: (string)
- full_name: (string)
- id: (integer)
- location: (string)
- username: (string)
- website: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /version

#### /version get

get

Returns the version of the Gitea application

#### get /version

Returns the version of the Gitea application

Secured by basicauth
Secured by token

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- version: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /admin

#### /admin/users post

post

Create a user

#### post /admin/users

Create a user

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- email: required (string)
- password: required (string)
- username: required (string)
- full_name: (string)
- login_name: (string)
- send_notify: (boolean)
- source_id: (integer)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /admin/users/{username} patch delete

patch

Edit an existing user

delete

Delete a user

#### patch /admin/users/{username}

Edit an existing user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

### Body

Media type: application/json

Type: object

Properties

- email: required (string)
- admin: (boolean)
- password: (string)
- login_name: (string)
- max_repo_creation: (integer)
- allow_git_hook: (boolean)
- active: (boolean)
- website: (string)
- full_name: (string)
- source_id: (integer)
- location: (string)
- allow_import_local: (boolean)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /admin/users/{username}

Delete a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /admin/users/{username}/keys post

post

Add a public key on behalf of a user

#### post /admin/users/{username}/keys

Add a public key on behalf of a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- fingerprint: (string)
- id: (integer)
- key: (string)
- title: (string)
- url: (string)

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /admin/users/{username}/keys/{id} delete

delete

Delete a user's public key

#### delete /admin/users/{username}/keys/{id}

Delete a user's public key

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

- id: required (integer)

  id of the key to delete

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /admin/users/{username}/orgs post

post

Create an organization

#### post /admin/users/{username}/orgs

Create an organization

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)
- description: (string)
- full_name: (string)
- id: (integer)
- location: (string)
- username: (string)
- website: (string)

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /admin/users/{username}/repos post

post

Create a repository on behalf a user

#### post /admin/users/{username}/repos

Create a repository on behalf a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to delete

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

## HTTP status code 403

APIForbiddenError is a forbidden error response

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /orgs

#### /orgs/{org} get patch

get

Get an organization

patch

Edit an organization

#### get /orgs/{org}

Get an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)
- description: (string)
- full_name: (string)
- id: (integer)
- location: (string)
- username: (string)
- website: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /orgs/{org}

Edit an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- full_name: (string)
- location: (string)
- website: (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)
- description: (string)
- full_name: (string)
- id: (integer)
- location: (string)
- username: (string)
- website: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/hooks get

get

List an organization's webhooks

#### get /orgs/{org}/hooks

List an organization's webhooks

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/hooks/ post

post

Create a hook

#### post /orgs/{org}/hooks/

Create a hook

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 201

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/hooks/{id} get patch delete

get

Get a hook

patch

Update a hook

delete

Delete a hook

#### get /orgs/{org}/hooks/{id}

Get a hook

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- id: required (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /orgs/{org}/hooks/{id}

Update a hook

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- id: required (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /orgs/{org}/hooks/{id}

Delete a hook

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- id: required (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/members get

get

List an organization's members

#### get /orgs/{org}/members

List an organization's members

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/members/{username} get delete

get

Check if a user is a member of an organization

delete

Remove a member from an organization

#### get /orgs/{org}/members/{username}

Check if a user is a member of an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- username: required (string)

  username of the user

## HTTP status code 204

user is a member

### Body

Media type: text/plain

Type: any

## HTTP status code 404

user is not a member

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /orgs/{org}/members/{username}

Remove a member from an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- username: required (string)

  username of the user

## HTTP status code 204

member removed

### Body

Media type: text/plain

Type: any

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/public_members get

get

List an organization's public members

#### get /orgs/{org}/public_members

List an organization's public members

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/public_members/{username} get put delete

get

Check if a user is a public member of an organization

put

Publicize a user's membership

delete

Conceal a user's membership

#### get /orgs/{org}/public_members/{username}

Check if a user is a public member of an organization

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- username: required (string)

  username of the user

## HTTP status code 204

user is a public member

### Body

Media type: text/plain

Type: any

## HTTP status code 404

user is not a public member

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### put /orgs/{org}/public_members/{username}

Publicize a user's membership

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- username: required (string)

  username of the user

## HTTP status code 204

membership publicized

### Body

Media type: text/plain

Type: any

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /orgs/{org}/public_members/{username}

Conceal a user's membership

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

- username: required (string)

  username of the user

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/repos get

get

List an organization's repos

#### get /orgs/{org}/repos

List an organization's repos

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /orgs/{org}/teams get post

get

List an organization's teams

post

Create a team

#### get /orgs/{org}/teams

List an organization's teams

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Team

Items: Team

- description: (string)
- id: (integer)
- name: (string)
- permission: (one of none, read, write, admin, owner)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /orgs/{org}/teams

Create a team

Secured by basicauth
Secured by token

### URI Parameters

- org: required (string)

  name of the organization to get

### Body

Media type: application/json

Type: object

Properties

- name: required (string)
- description: (string)
- permission: (one of read, write, admin)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- id: (integer)
- name: (string)
- permission: (one of none, read, write, admin, owner)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /repos

#### /repos/migrate post

post

Migrate a remote git repository

#### post /repos/migrate

Migrate a remote git repository

Secured by basicauth
Secured by token

### Body

Media type: application/json

Type: object

Properties

- clone_addr: required (string)
- repo_name: required (string)
- uid: required (integer)
- auth_password: (string)
- auth_username: (string)
- description: (string)
- mirror: (boolean)
- private: (boolean)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/search get

get

Search for repositories

#### get /repos/search

Search for repositories

Secured by basicauth
Secured by token

### Query Parameters

- q: (string)

  keyword

- uid: (integer)

  search only for repos that the user with the given id owns or contributes to

- page: (integer)

  page number of results to return (1-based)

- limit: (integer)

  page size of results, maximum page size is 50

- mode: (string)

  type of repository to search for. Supported values are "fork", "source", "mirror" and "collaborative"

- exclusive: (boolean)

  if `uid` is given, search only for repos that the user owns

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- data: (array of Repository)

  Items: Repository

  - html_url: (string)
  - description: (string)
  - open_issues_count: (integer)
  - forks_count: (integer)
  - clone_url: (string)
  - name: (string)
  - empty: (boolean)
  - default_branch: (string)
  - id: (integer)
  - full_name: (string)
  - mirror: (boolean)
  - fork: (boolean)
  - owner: (object)

    User represents a user

    - avatar_url: (string)

      URL to the user's avatar

    - email: (string)
    - full_name: (string)

      the user's full name

    - id: (integer)

      the user's id

    - login: (string)

      the user's username

  - created_at: (datetime)
- ok: (boolean)

## HTTP status code 422

APIValidationError is error format response related to input validation

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{user}/{repo}/hooks/{id} delete

delete

Delete a hook in a repository

#### delete /repos/{user}/{repo}/hooks/{id}

Delete a hook in a repository

Secured by basicauth
Secured by token

### URI Parameters

- user: required (string)
- repo: required (string)

  name of the repo

- id: required (integer)

  id of the hook to delete

### Query Parameters

- owner: required (string)

  owner of the repo

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo} get delete

get

Get a repository

delete

Delete a repository

#### get /repos/{owner}/{repo}

Get a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}

Delete a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 403

APIForbiddenError is a forbidden error response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/archive/{filepath} get

get

Get an archive of a repository

#### get /repos/{owner}/{repo}/archive/{filepath}

Get an archive of a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- filepath: required (string)

### Query Parameters

- archive: required (string)

  archive to download, consisting of a git reference and archive

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/branches get

get

List a repository's branches

#### get /repos/{owner}/{repo}/branches

List a repository's branches

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/branches/{branch} get

get

List a repository's branches

#### get /repos/{owner}/{repo}/branches/{branch}

List a repository's branches

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- branch: required (string)

  branch to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/collaborators get

get

List a repository's collaborators

#### get /repos/{owner}/{repo}/collaborators

List a repository's collaborators

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/collaborators/{collaborator} get put delete

get

Check if a user is a collaborator of a repository

put

Add a collaborator to a repository

delete

Delete a collaborator from a repository

#### get /repos/{owner}/{repo}/collaborators/{collaborator}

Check if a user is a collaborator of a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- collaborator: required (string)

  username of the collaborator

## HTTP status code 404

APIEmpty is an empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### put /repos/{owner}/{repo}/collaborators/{collaborator}

Add a collaborator to a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- collaborator: required (string)

  username of the collaborator

### Body

Media type: text/plain

Type: object

Properties

- permission: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/collaborators/{collaborator}

Delete a collaborator from a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- collaborator: required (string)

  username of the collaborator

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/commits/{ref}/statuses get

get

Get a commit's combined status, by branch/tag/commit reference

#### get /repos/{owner}/{repo}/commits/{ref}/statuses

Get a commit's combined status, by branch/tag/commit reference

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- ref: required (string)

  name of branch/tag/commit

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- creator: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- target_url: (string)
- updated_at: (datetime)
- status: (string)

  StatusState holds the state of a Status

  It can be "pending", "success", "error", "failure", and "warning"

- id: (integer)
- url: (string)
- context: (string)
- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/editorconfig/{filepath} get

get

Get the EditorConfig definitions of a file in a repository

#### get /repos/{owner}/{repo}/editorconfig/{filepath}

Get the EditorConfig definitions of a file in a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- filepath: required (string)

  filepath of file to get

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/forks get post

get

List a repository's forks

post

Fork a repository

#### get /repos/{owner}/{repo}/forks

List a repository's forks

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/forks

Fork a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- organization: (string)

  organization name, if forking into an organization

## HTTP status code 202

Success

### Body

Media type: application/json

Type: object

Properties

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/hooks get post

get

List the hooks in a repository

post

Create a hook

#### get /repos/{owner}/{repo}/hooks

List the hooks in a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/hooks

Create a hook

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- config: required (object)
- type: required (one of gitea, gogs, slack, discord)
- active: (boolean - default: false)
- events: (array of items)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/hooks/{id} get patch

get

Get a hook

patch

Edit a hook in a repository

#### get /repos/{owner}/{repo}/hooks/{id}

Get a hook

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the hook to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /repos/{owner}/{repo}/hooks/{id}

Edit a hook in a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the hook to get

### Body

Media type: application/json

Type: object

Properties

- active: (boolean)
- config: (object)
- events: (array of items)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Branch

Items: Branch

- commit: (object)

  PayloadCommit represents a commit

  - author: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - committer: (object)

    PayloadUser represents the author or committer of a commit

    - email: (string)
    - name: (string)

      Full name of the commit author

    - username: (string)
  - id: (string)

    sha1 hash of the commit

  - message: (string)
  - timestamp: (datetime)
  - url: (string)
  - verification: (object)

    PayloadCommitVerification represents the GPG verification of a commit

    - payload: (string)
    - reason: (string)
    - signature: (string)
    - verified: (boolean)
- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues get post

get

List a repository's issues

post

Create an issue

#### get /repos/{owner}/{repo}/issues

List a repository's issues

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Query Parameters

- state: (string)

  whether issue is open or closed

- page: (integer)

  page number of requested issues

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Issue

Items: Issue

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- body: (string)
- comments: (integer)
- created_at: (datetime)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- pull_request: (object)

  PullRequestMeta PR info if an issue is a PR

  - merged: (boolean)
  - merged_at: (datetime)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/issues

Create an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- title: required (string)
- assignee: (string)

  username of assignee

- body: (string)
- closed: (boolean)
- labels: (array of items)

  list of label ids

- milestone: (integer)

  milestone id

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- body: ()
- comments: (integer)
- created_at: (datetime)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- pull_request: (object)

  PullRequestMeta PR info if an issue is a PR

  - merged: (boolean)
  - merged_at: (datetime)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/comments get

get

List all comments in a repository

#### get /repos/{owner}/{repo}/issues/comments

List all comments in a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Query Parameters

- string: (string)

  if provided, only comments updated since the provided time are returned.

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Comment

Items: Comment

- body: (string)
- created_at: (datetime)
- html_url: (string)
- id: (integer)
- issue_url: (string)
- pull_request_url: (string)
- updated_at: (datetime)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/comments/{id} patch delete

patch

Edit a comment

delete

Delete a comment

#### patch /repos/{owner}/{repo}/issues/comments/{id}

Edit a comment

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of comment to delete

### Body

Media type: application/json

Type: object

Properties

- body: required (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- body: ()
- created_at: (datetime)
- html_url: (string)
- id: (integer)
- issue_url: (string)
- pull_request_url: (string)
- updated_at: (datetime)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/issues/comments/{id}

Delete a comment

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of comment to delete

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{id} get patch

get

Get an issue by id

patch

Edit an issue

#### get /repos/{owner}/{repo}/issues/{id}

Get an issue by id

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the issue to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- body: ()
- comments: (integer)
- created_at: (datetime)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- pull_request: (object)

  PullRequestMeta PR info if an issue is a PR

  - merged: (boolean)
  - merged_at: (datetime)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /repos/{owner}/{repo}/issues/{id}

Edit an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the issue to get

### Body

Media type: application/json

Type: object

Properties

- assignee: (string)
- body: (string)
- milestone: (integer)
- state: (string)
- title: (string)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- body: ()
- comments: (integer)
- created_at: (datetime)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- pull_request: (object)

  PullRequestMeta PR info if an issue is a PR

  - merged: (boolean)
  - merged_at: (datetime)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{index}/comments get post

get

List all comments on an issue

post

Add a comment to an issue

#### get /repos/{owner}/{repo}/issues/{index}/comments

List all comments on an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

### Query Parameters

- id: required (integer)

  index of the issue

- string: (string)

  if provided, only comments updated since the specified time are returned.

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Comment

Items: Comment

- body: ()
- created_at: (datetime)
- html_url: (string)
- id: (integer)
- issue_url: (string)
- pull_request_url: (string)
- updated_at: (datetime)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/issues/{index}/comments

Add a comment to an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

### Query Parameters

- id: required (integer)

  index of the issue

### Body

Media type: application/json

Type: object

Properties

- title: required (string)
- assignee: (string)

  username of assignee

- body: ()
- closed: (boolean)
- labels: (array of items)

  list of label ids

- milestone: (integer)

  milestone id

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- body: ()
- created_at: (datetime)
- html_url: (string)
- id: (integer)
- issue_url: (string)
- pull_request_url: (string)
- updated_at: (datetime)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{index}/comments/{id} patch delete

patch

Edit a comment

delete

Delete a comment

#### patch /repos/{owner}/{repo}/issues/{index}/comments/{id}

Edit a comment

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

- id: required (integer)

  id of comment to delete

### Body

Media type: application/json

Type: object

Properties

- body: ()

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- body: ()
- created_at: (datetime)
- html_url: (string)
- id: (integer)
- issue_url: (string)
- pull_request_url: (string)
- updated_at: (datetime)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/issues/{index}/comments/{id}

Delete a comment

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

- id: required (integer)

  id of comment to delete

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{index}/labels get put post delete

get

Get an issue's labels

put

Replace an issue's labels

post

Add a label to an issue

delete

Remove all labels from an issue

#### get /repos/{owner}/{repo}/issues/{index}/labels

Get an issue's labels

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Label

Items: Label

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### put /repos/{owner}/{repo}/issues/{index}/labels

Replace an issue's labels

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

### Body

Media type: application/json

Type: object

Properties

- labels: (array of items)

  list of label IDs

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Label

Items: Label

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/issues/{index}/labels

Add a label to an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

### Body

Media type: application/json

Type: object

Properties

- labels: (array of items)

  list of label IDs

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Label

Items: Label

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/issues/{index}/labels

Remove all labels from an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{index}/labels/{id} delete

delete

Remove a label from an issue

#### delete /repos/{owner}/{repo}/issues/{index}/labels/{id}

Remove a label from an issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

- id: required (integer)

  id of the label to remove

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/issues/{index}/times get post

get

List an issue's tracked times

post

Add a tracked time to a issue

#### get /repos/{owner}/{repo}/issues/{index}/times

List an issue's tracked times

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of TrackedTime

Items: TrackedTime

- created: (datetime)
- id: (integer)
- issue_id: (integer)
- time: (integer)

  Time in seconds

- user_id: (integer)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/issues/{index}/times

Add a tracked time to a issue

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  this parameter is ignored

### Query Parameters

- id: required (integer)

  index of the issue to add tracked time to

### Body

Media type: application/json

Type: object

Properties

- time: required (integer)

  time in seconds

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- created: (datetime)
- id: (integer)
- issue_id: (integer)
- time: (integer)

  Time in seconds

- user_id: (integer)

## HTTP status code 400

APIError is error format response

## HTTP status code 403

APIError is error format response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/keys get post

get

List a repository's keys

post

Add a key to a repository

#### get /repos/{owner}/{repo}/keys

List a repository's keys

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of DeployKey

Items: DeployKey

- created_at: (datetime)
- id: (integer)
- key: (string)
- read_only: (boolean)
- title: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/keys

Add a key to a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- key: required (string)

  An armored SSH key to add

- title: required (string)

  Title of the key to add

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- id: (integer)
- key: (string)
- read_only: (boolean)
- title: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/keys/{id} get delete

get

Get a repository's key by id

delete

Delete a key from a repository

#### get /repos/{owner}/{repo}/keys/{id}

Get a repository's key by id

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the key to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- id: (integer)
- key: (string)
- read_only: (boolean)
- title: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/keys/{id}

Delete a key from a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the key to get

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/labels get post

get

Get all of a repository's labels

post

Create a label

#### get /repos/{owner}/{repo}/labels

Get all of a repository's labels

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Label

Items: Label

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/labels

Create a label

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- color: required (string)
- name: required (string)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/labels/{id} get patch delete

get

Get a single label

patch

Update a label

delete

Delete a label

#### get /repos/{owner}/{repo}/labels/{id}

Get a single label

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the label to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /repos/{owner}/{repo}/labels/{id}

Update a label

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the label to get

### Body

Media type: application/json

Type: object

Properties

- color: (string)
- name: (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- color: (string)
- id: (integer)
- name: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/labels/{id}

Delete a label

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the label to get

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/milestones get post

get

Get all of a repository's milestones

post

Create a milestone

#### get /repos/{owner}/{repo}/milestones

Get all of a repository's milestones

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Query Parameters

- id: required (integer)

  id of the milestone to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Milestone

Items: Milestone

- closed_at: (datetime)
- closed_issues: (integer)
- description: (string)
- due_on: (datetime)
- id: (integer)
- open_issues: (integer)
- state: (string)

  StateType issue state type

- title: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/milestones

Create a milestone

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- due_on: (datetime)
- title: (string)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- closed_at: (datetime)
- closed_issues: (integer)
- description: (string)
- due_on: (datetime)
- id: (integer)
- open_issues: (integer)
- state: (string)

  StateType issue state type

- title: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/milestones/{id} get patch delete

get

Get a milestone

patch

Update a milestone

delete

Delete a milestone

#### get /repos/{owner}/{repo}/milestones/{id}

Get a milestone

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- closed_at: (datetime)
- closed_issues: (integer)
- description: (string)
- due_on: (datetime)
- id: (integer)
- open_issues: (integer)
- state: (string)

  StateType issue state type

- title: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /repos/{owner}/{repo}/milestones/{id}

Update a milestone

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (string)

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- due_on: (datetime)
- state: (string)
- title: (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- closed_at: (datetime)
- closed_issues: (integer)
- description: (string)
- due_on: (datetime)
- id: (integer)
- open_issues: (integer)
- state: (string)

  StateType issue state type

- title: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/milestones/{id}

Delete a milestone

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (string)

### Query Parameters

- body: required (integer)

  id of the milestone to delete

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/mirror-sync post

post

Sync a mirrored repository

#### post /repos/{owner}/{repo}/mirror-sync

Sync a mirrored repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/pulls get post

get

List a repo's pull requests

post

Create a pull request

#### get /repos/{owner}/{repo}/pulls

List a repo's pull requests

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of PullRequest

Items: PullRequest

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- base: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- body: (string)
- comments: (integer)
- created_at: (datetime)
- diff_url: (string)
- head: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- html_url: (string)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- merge_base: (string)
- merge_commit_sha: (string)
- mergeable: (boolean)
- merged: (boolean)
- merged_at: (datetime)
- merged_by: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- patch_url: (string)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/pulls

Create a pull request

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

### Body

Media type: application/json

Type: object

Properties

- assignee: (string)
- base: (string)
- body: (string)
- head: (string)
- labels: (array of items)
- milestone: (integer)
- title: (string)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- base: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- body: ()
- comments: (integer)
- created_at: (datetime)
- diff_url: (string)
- head: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- html_url: (string)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- merge_base: (string)
- merge_commit_sha: (string)
- mergeable: (boolean)
- merged: (boolean)
- merged_at: (datetime)
- merged_by: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- patch_url: (string)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/pulls/{index} get patch

get

Get a pull request

patch

Update a pull request

#### get /repos/{owner}/{repo}/pulls/{index}

Get a pull request

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  index of the pull request to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- base: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- body: ()
- comments: (integer)
- created_at: (datetime)
- diff_url: (string)
- head: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- html_url: (string)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- merge_base: (string)
- merge_commit_sha: (string)
- mergeable: (boolean)
- merged: (boolean)
- merged_at: (datetime)
- merged_by: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- patch_url: (string)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /repos/{owner}/{repo}/pulls/{index}

Update a pull request

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  index of the pull request to get

### Body

Media type: application/json

Type: object

Properties

- assignee: (string)
- body: (string)
- labels: (array of items)
- milestone: (integer)
- state: (string)
- title: (string)

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- assignee: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- base: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- body: ()
- comments: (integer)
- created_at: (datetime)
- diff_url: (string)
- head: (object)

  PRBranchInfo information about a branch

  - label: (string)
  - ref: (string)
  - repo: (object)

    Repository represents a repository

    - html_url: (string)
    - description: (string)
    - open_issues_count: (integer)
    - forks_count: (integer)
    - clone_url: (string)
    - name: (string)
    - empty: (boolean)
    - default_branch: (string)
    - id: (integer)
    - full_name: (string)
    - mirror: (boolean)
    - fork: (boolean)
    - owner: (object)

      User represents a user

      - avatar_url: (string)

        URL to the user's avatar

      - email: (string)
      - full_name: (string)

        the user's full name

      - id: (integer)

        the user's id

      - login: (string)

        the user's username

    - created_at: (datetime)
  - repo_id: (integer)
  - sha: (string)
- html_url: (string)
- id: (integer)
- labels: (array of Label)

  Items: Label

  - color: (string)
  - id: (integer)
  - name: (string)
  - url: (string)
- merge_base: (string)
- merge_commit_sha: (string)
- mergeable: (boolean)
- merged: (boolean)
- merged_at: (datetime)
- merged_by: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- milestone: (object)

  Milestone milestone is a collection of issues on one repository

  - closed_at: (datetime)
  - closed_issues: (integer)
  - description: (string)
  - due_on: (datetime)
  - id: (integer)
  - open_issues: (integer)
  - state: (string)

    StateType issue state type

  - title: (string)
- number: (integer)
- patch_url: (string)
- state: (string)

  StateType issue state type

- title: (string)
- updated_at: (datetime)
- url: (string)
- user: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/pulls/{index}/merge get post

get

Check if a pull request has been merged

post

Merge a pull request

#### get /repos/{owner}/{repo}/pulls/{index}/merge

Check if a pull request has been merged

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  index of the pull request to get

## HTTP status code 204

pull request has been merged

### Body

Media type: text/plain

Type: any

## HTTP status code 404

pull request has not been merged

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/pulls/{index}/merge

Merge a pull request

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- index: required (integer)

  index of the pull request to get

## HTTP status code 405

APIEmpty is an empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/raw/{filepath} get

get

Get a file from a repository

#### get /repos/{owner}/{repo}/raw/{filepath}

Get a file from a repository

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- filepath: required (string)

  filepath of the file to get

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/releases get

get

Create a release

#### get /repos/{owner}/{repo}/releases

Create a release

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 201

Success

### Body

Media type: application/json

Type: object

Properties

- name: (string)
- published_at: (datetime)
- author: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- tag_name: (string)
- draft: (boolean)
- id: (integer)
- prerelease: (boolean)
- url: (string)
- target_commitish: (string)
- zipball_url: (string)
- body: (string)
- tarball_url: (string)
- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/releases/{id} patch delete

patch

Update a release

delete

Delete a release

#### patch /repos/{owner}/{repo}/releases/{id}

Update a release

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the release to delete

### Body

Media type: application/json

Type: object

Properties

- body: (string)
- draft: (boolean)
- name: (string)
- prerelease: (boolean)
- tag_name: (string)
- target_commitish: (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- name: (string)
- published_at: (datetime)
- author: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- tag_name: (string)
- draft: (boolean)
- id: (integer)
- prerelease: (boolean)
- url: (string)
- target_commitish: (string)
- zipball_url: (string)
- body: ()
- tarball_url: (string)
- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/releases/{id}

Delete a release

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- id: required (integer)

  id of the release to delete

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/stargazers get

get

List a repo's stargazers

#### get /repos/{owner}/{repo}/stargazers

List a repo's stargazers

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/statuses/{sha} get post

get

Get a commit's statuses

post

Create a commit status

#### get /repos/{owner}/{repo}/statuses/{sha}

Get a commit's statuses

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- sha: required (string)

  sha of the commit

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Status

Items: Status

- description: (string)
- creator: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- target_url: (string)
- updated_at: (datetime)
- status: (string)

  StatusState holds the state of a Status

  It can be "pending", "success", "error", "failure", and "warning"

- id: (integer)
- url: (string)
- context: (string)
- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /repos/{owner}/{repo}/statuses/{sha}

Create a commit status

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- sha: required (string)

  sha of the commit

### Body

Media type: application/json

Type: object

Properties

- context: (string)
- description: (string)
- state: (string)

  StatusState holds the state of a Status

  It can be "pending", "success", "error", "failure", and "warning"

- target_url: (string)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Status

Items: Status

- description: (string)
- creator: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- target_url: (string)
- updated_at: (datetime)
- status: (string)

  StatusState holds the state of a Status

  It can be "pending", "success", "error", "failure", and "warning"

- id: (integer)
- url: (string)
- context: (string)
- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/subscribers get

get

List a repo's watchers

#### get /repos/{owner}/{repo}/subscribers

List a repo's watchers

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/subscription get put delete

get

Check if the current user is watching a repo

put

Watch a repo

delete

Unwatch a repo

#### get /repos/{owner}/{repo}/subscription

Check if the current user is watching a repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- ignored: (boolean)
- reason: (object)
- repository_url: (string)
- subscribed: (boolean)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### put /repos/{owner}/{repo}/subscription

Watch a repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- created_at: (datetime)
- ignored: (boolean)
- reason: (object)
- repository_url: (string)
- subscribed: (boolean)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /repos/{owner}/{repo}/subscription

Unwatch a repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/times get

get

List a repo's tracked times

#### get /repos/{owner}/{repo}/times

List a repo's tracked times

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of TrackedTime

Items: TrackedTime

- created: (datetime)
- id: (integer)
- issue_id: (integer)
- time: (integer)

  Time in seconds

- user_id: (integer)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /repos/{owner}/{repo}/times/{tracker} get

get

List a user's tracked times in a repo

#### get /repos/{owner}/{repo}/times/{tracker}

List a user's tracked times in a repo

Secured by basicauth
Secured by token

### URI Parameters

- owner: required (string)

  owner of the repo

- repo: required (string)

  name of the repo

- tracker: required (string)

### Query Parameters

- user: required (string)

  username of user

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of TrackedTime

Items: TrackedTime

- created: (datetime)
- id: (integer)
- issue_id: (integer)
- time: (integer)

  Time in seconds

- user_id: (integer)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /teams

#### /teams/{id} get patch delete

get

Get a team

patch

Edit a team

delete

Delete a team

#### get /teams/{id}

Get a team

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- id: (integer)
- name: (string)
- permission: (one of none, read, write, admin, owner)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### patch /teams/{id}

Edit a team

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

### Body

Media type: application/json

Type: object

Properties

- name: required (string)
- description: (string)
- permission: (one of read, write, admin)

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- description: (string)
- id: (integer)
- name: (string)
- permission: (one of none, read, write, admin, owner)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /teams/{id}

Delete a team

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

## HTTP status code 204

team deleted

### Body

Media type: text/plain

Type: any

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /teams/{id}/members get

get

List a team's members

#### get /teams/{id}/members

List a team's members

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /teams/{id}/members/{username} put delete

put

Add a team member

delete

Remove a team member

#### put /teams/{id}/members/{username}

Add a team member

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

- username: required (string)

  username of the user to add

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /teams/{id}/members/{username}

Remove a team member

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

- username: required (string)

  username of the user to add

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /teams/{id}/repos get

get

List a team's repos

#### get /teams/{id}/repos

List a team's repos

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /teams/{id}/repos/{org}/{repo} put delete

put

Add a repository to a team

delete

This does not delete the repository, it only removes the repository from the team.

#### put /teams/{id}/repos/{org}/{repo}

Add a repository to a team

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

- org: required (string)

  organization that owns the repo to add

- repo: required (string)

  name of the repo to add

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### delete /teams/{id}/repos/{org}/{repo}

This does not delete the repository, it only removes the repository from the team.

Secured by basicauth
Secured by token

### URI Parameters

- id: required (integer)

  id of the team to get

- org: required (string)

  organization that owns the repo to add

- repo: required (string)

  name of the repo to add

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

### /users

#### /users/search get

get

Search for users

#### get /users/search

Search for users

Secured by basicauth
Secured by token

### Query Parameters

- q: (string)

  keyword

- limit: (integer)

  maximum number of users to return

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{follower}/following/{followee} get

get

Check if one user is following another user

#### get /users/{follower}/following/{followee}

Check if one user is following another user

Secured by basicauth
Secured by token

### URI Parameters

- follower: required (string)

  username of following user

- followee: required (string)

  username of followed user

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username} get

get

Get a user

#### get /users/{username}

Get a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: object

Properties

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

## HTTP status code 404

APINotFound is a not found empty response

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/followers get

get

List the given user's followers

#### get /users/{username}/followers

List the given user's followers

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/following get

get

List the users that the given user is following

#### get /users/{username}/following

List the users that the given user is following

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of User

Items: User

- avatar_url: (string)

  URL to the user's avatar

- email: (string)
- full_name: (string)

  the user's full name

- id: (integer)

  the user's id

- login: (string)

  the user's username

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/gpg_keys get

get

List the given user's GPG keys

#### get /users/{username}/gpg_keys

List the given user's GPG keys

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of GPGKey

Items: GPGKey

- can_certify: (boolean)
- can_encrypt_comms: (boolean)
- can_encrypt_storage: (boolean)
- can_sign: (boolean)
- created_at: (datetime)
- emails: (array of GPGKeyEmail)

  Items: GPGKeyEmail

  - email: (string)
  - verified: (boolean)
- expires_at: (datetime)
- id: (integer)
- key_id: (string)
- primary_key_id: (string)
- public_key: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/keys get

get

List the given user's public keys

#### get /users/{username}/keys

List the given user's public keys

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of PublicKey

Items: PublicKey

- created_at: (datetime)
- fingerprint: (string)
- id: (integer)
- key: (string)
- title: (string)
- url: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/repos get

get

List the repos owned by the given user

#### get /users/{username}/repos

List the repos owned by the given user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/starred get

get

The repos that the given user has starred

#### get /users/{username}/starred

The repos that the given user has starred

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/subscriptions get

get

List the repositories watched by a user

#### get /users/{username}/subscriptions

List the repositories watched by a user

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

## HTTP status code 200

Success

### Body

Media type: application/json

Type: array of Repository

Items: Repository

- html_url: (string)
- description: (string)
- open_issues_count: (integer)
- forks_count: (integer)
- clone_url: (string)
- name: (string)
- empty: (boolean)
- default_branch: (string)
- id: (integer)
- full_name: (string)
- mirror: (boolean)
- fork: (boolean)
- owner: (object)

  User represents a user

  - avatar_url: (string)

    URL to the user's avatar

  - email: (string)
  - full_name: (string)

    the user's full name

  - id: (integer)

    the user's id

  - login: (string)

    the user's username

- created_at: (datetime)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### /users/{username}/tokens get post

get

List the authenticated user's access tokens

post

Create an access token

#### get /users/{username}/tokens

List the authenticated user's access tokens

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token

#### post /users/{username}/tokens

Create an access token

Secured by basicauth
Secured by token

### URI Parameters

- username: required (string)

  username of user to get

### Query Parameters

- name: (string)

# Secured by basicauth

# Secured by token

### Headers

- Authorization: required (string)

  your access token from gitea preceeded by the word token i.e "token ACCESS_TOKEN"

### Query Parameters

- access_token: required (string)

  your access token

- token: required (string)

  your access token