Gitea organization API

The organization API from Gitea — 37 operation(s) for organization.

Documentation

Specifications

Code Examples

💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repo-get-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repo-update-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issues-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issue-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pulls-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pull-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-branches-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-commits-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-release-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-webhook-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-org-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-org-repos-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-user-get-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-user-repo-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-admin-user-create-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-notifications-list-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-packages-list-owner-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-repository-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-issue-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-pullrequest-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-release-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-hook-example.json
💻
CodeExamples
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/examples/gitea-rest-api-package-example.json

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-repository-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-issue-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-pullrequest-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-branch-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-commit-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-release-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-hook-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-organization-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-team-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-user-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-notificationthread-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-package-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-label-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-milestone-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-tag-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-schema/gitea-rest-api-comment-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-repository-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-issue-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-pullrequest-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-branch-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-commit-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-release-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-hook-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-organization-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-team-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-user-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-notificationthread-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-package-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-label-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-milestone-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-tag-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/json-structure/gitea-rest-api-comment-structure.json

Other Resources

OpenAPI Specification

gitea-organization-api-openapi.yml Raw ↑
swagger: '2.0'
info:
  description: This documentation describes the Gitea API.
  title: Gitea admin organization API
  license:
    name: MIT
    url: http://opensource.org/licenses/MIT
  version: 1.27.0+dev-89-gf52b6f3315
basePath: /api/v1
schemes:
- https
- http
consumes:
- application/json
produces:
- application/json
security:
- BasicAuth: []
- Token: []
- AccessToken: []
- AuthorizationHeaderToken: []
- SudoParam: []
- SudoHeader: []
- TOTPHeader: []
tags:
- name: organization
paths:
  /org/{org}/repos:
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create a repository in an organization
      operationId: createOrgRepoDeprecated
      deprecated: true
      parameters:
      - type: string
        description: name of organization
        name: org
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateRepoOption'
      responses:
        '201':
          $ref: '#/responses/Repository'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /orgs:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get list of organizations
      operationId: orgGetAll
      parameters:
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/OrganizationList'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create an organization
      operationId: orgCreate
      parameters:
      - name: organization
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateOrgOption'
      responses:
        '201':
          $ref: '#/responses/Organization'
        '403':
          $ref: '#/responses/forbidden'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get an organization
      operationId: orgGet
      parameters:
      - type: string
        description: name of the organization to get
        name: org
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Organization'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete an organization
      operationId: orgDelete
      parameters:
      - type: string
        description: organization that is to be deleted
        name: org
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Edit an organization
      operationId: orgEdit
      parameters:
      - type: string
        description: name of the organization to edit
        name: org
        in: path
        required: true
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/EditOrgOption'
      responses:
        '200':
          $ref: '#/responses/Organization'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/jobs:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get org-level workflow jobs
      operationId: getOrgWorkflowJobs
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/WorkflowJobsList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/runners:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get org-level runners
      operationId: getOrgRunners
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: boolean
        description: filter by disabled status (true or false)
        name: disabled
        in: query
      responses:
        '200':
          $ref: '#/responses/RunnerList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/runners/registration-token:
    post:
      produces:
      - application/json
      tags:
      - organization
      summary: Get an organization's actions runner registration token
      operationId: orgCreateRunnerRegistrationToken
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/RegistrationToken'
  /orgs/{org}/actions/runners/{runner_id}:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get an org-level runner
      operationId: getOrgRunner
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Runner'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete an org-level runner
      operationId: deleteOrgRunner
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      responses:
        '204':
          description: runner has been deleted
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Update an org-level runner
      operationId: updateOrgRunner
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: id of the runner
        name: runner_id
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/EditActionRunnerOption'
      responses:
        '200':
          $ref: '#/responses/Runner'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}/actions/runs:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get org-level workflow runs
      operationId: getOrgWorkflowRuns
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: workflow event name
        name: event
        in: query
      - type: string
        description: workflow branch
        name: branch
        in: query
      - type: string
        description: workflow status (pending, queued, in_progress, failure, success, skipped)
        name: status
        in: query
      - type: string
        description: triggered by user
        name: actor
        in: query
      - type: string
        description: triggering sha of the workflow run
        name: head_sha
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/WorkflowRunsList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/secrets:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's actions secrets
      operationId: orgListActionsSecrets
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/SecretList'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/secrets/{secretname}:
    put:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create or Update a secret value in an organization
      operationId: updateOrgSecret
      parameters:
      - type: string
        description: name of organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the secret
        name: secretname
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateOrUpdateSecretOption'
      responses:
        '201':
          description: response when creating a secret
        '204':
          description: response when updating a secret
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    delete:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Delete a secret in an organization
      operationId: deleteOrgSecret
      parameters:
      - type: string
        description: name of organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the secret
        name: secretname
        in: path
        required: true
      responses:
        '204':
          description: delete one secret of the organization
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/variables:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get an org-level variables list
      operationId: getOrgVariablesList
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/VariableList'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/actions/variables/{variablename}:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get an org-level variable
      operationId: getOrgVariable
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/ActionVariable'
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    put:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Update an org-level variable
      operationId: updateOrgVariable
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/UpdateVariableOption'
      responses:
        '201':
          description: response when updating an org-level variable
        '204':
          description: response when updating an org-level variable
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create an org-level variable
      operationId: createOrgVariable
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateVariableOption'
      responses:
        '201':
          description: successfully created the org-level variable
        '400':
          $ref: '#/responses/error'
        '409':
          description: variable name already exists.
        '500':
          $ref: '#/responses/error'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete an org-level variable
      operationId: deleteOrgVariable
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: name of the variable
        name: variablename
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/ActionVariable'
        '201':
          description: response when deleting a variable
        '204':
          description: response when deleting a variable
        '400':
          $ref: '#/responses/error'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/activities/feeds:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's activity feeds
      operationId: orgListActivityFeeds
      parameters:
      - type: string
        description: name of the org
        name: org
        in: path
        required: true
      - type: string
        format: date
        description: the date of the activities to be found
        name: date
        in: query
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/ActivityFeedsList'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/avatar:
    post:
      produces:
      - application/json
      tags:
      - organization
      summary: Update Avatar
      operationId: orgUpdateAvatar
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/UpdateUserAvatarOption'
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete Avatar
      operationId: orgDeleteAvatar
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/blocks:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List users blocked by the organization
      operationId: organizationListBlocks
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
  /orgs/{org}/blocks/{username}:
    get:
      tags:
      - organization
      summary: Check if a user is blocked by the organization
      operationId: organizationCheckUserBlock
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to check
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    put:
      tags:
      - organization
      summary: Block a user
      operationId: organizationBlockUser
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to block
        name: username
        in: path
        required: true
      - type: string
        description: optional note for the block
        name: note
        in: query
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
    delete:
      tags:
      - organization
      summary: Unblock a user
      operationId: organizationUnblockUser
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to unblock
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}/hooks:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's webhooks
      operationId: orgListHooks
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/HookList'
        '404':
          $ref: '#/responses/notFound'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create a hook
      operationId: orgCreateHook
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/CreateHookOption'
      responses:
        '201':
          $ref: '#/responses/Hook'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/hooks/{id}:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get a hook
      operationId: orgGetHook
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the hook to get
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Hook'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete a hook
      operationId: orgDeleteHook
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the hook to delete
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Update a hook
      operationId: orgEditHook
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the hook to update
        name: id
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/EditHookOption'
      responses:
        '200':
          $ref: '#/responses/Hook'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/labels:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's labels
      operationId: orgListLabels
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/LabelList'
        '404':
          $ref: '#/responses/notFound'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create a label for an organization
      operationId: orgCreateLabel
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateLabelOption'
      responses:
        '201':
          $ref: '#/responses/Label'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}/labels/{id}:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: Get a single label
      operationId: orgGetLabel
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the label to get
        name: id
        in: path
        required: true
      responses:
        '200':
          $ref: '#/responses/Label'
        '404':
          $ref: '#/responses/notFound'
    delete:
      tags:
      - organization
      summary: Delete a label
      operationId: orgDeleteLabel
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the label to delete
        name: id
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '404':
          $ref: '#/responses/notFound'
    patch:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Update a label
      operationId: orgEditLabel
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        format: int64
        description: id of the label to edit
        name: id
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/EditLabelOption'
      responses:
        '200':
          $ref: '#/responses/Label'
        '404':
          $ref: '#/responses/notFound'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}/members:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's members
      operationId: orgListMembers
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/members/{username}:
    get:
      tags:
      - organization
      summary: Check if a user is a member of an organization
      operationId: orgIsMember
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to check for an organization membership
        name: username
        in: path
        required: true
      responses:
        '204':
          description: user is a member
        '303':
          description: redirection to /orgs/{org}/public_members/{username}
        '404':
          description: user is not a member
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Remove a member from an organization
      operationId: orgDeleteMember
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to remove from the organization
        name: username
        in: path
        required: true
      responses:
        '204':
          description: member removed
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/public_members:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's public members
      operationId: orgListPublicMembers
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/UserList'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/public_members/{username}:
    get:
      tags:
      - organization
      summary: Check if a user is a public member of an organization
      operationId: orgIsPublicMember
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user to check for a public organization membership
        name: username
        in: path
        required: true
      responses:
        '204':
          description: user is a public member
        '404':
          description: user is not a public member
    put:
      produces:
      - application/json
      tags:
      - organization
      summary: Publicize a user's membership
      operationId: orgPublicizeMember
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user whose membership is to be publicized
        name: username
        in: path
        required: true
      responses:
        '204':
          description: membership publicized
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Conceal a user's membership
      operationId: orgConcealMember
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: string
        description: username of the user whose membership is to be concealed
        name: username
        in: path
        required: true
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
  /orgs/{org}/rename:
    post:
      produces:
      - application/json
      tags:
      - organization
      summary: Rename an organization
      operationId: renameOrg
      parameters:
      - type: string
        description: existing org name
        name: org
        in: path
        required: true
      - name: body
        in: body
        required: true
        schema:
          $ref: '#/definitions/RenameOrgOption'
      responses:
        '204':
          $ref: '#/responses/empty'
        '403':
          $ref: '#/responses/forbidden'
        '422':
          $ref: '#/responses/validationError'
  /orgs/{org}/repos:
    get:
      produces:
      - application/json
      tags:
      - organization
      summary: List an organization's repos
      operationId: orgListRepos
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      - type: integer
        description: page number of results to return (1-based)
        name: page
        in: query
      - type: integer
        description: page size of results
        name: limit
        in: query
      responses:
        '200':
          $ref: '#/responses/RepositoryList'
        '404':
          $ref: '#/responses/notFound'
    post:
      consumes:
      - application/json
      produces:
      - application/json
      tags:
      - organization
      summary: Create a repository in an organization
      operationId: createOrgRepo
      parameters:
      - type: string
        description: name of organization
        name: org
        in: path
        required: true
      - name: body
        in: body
        schema:
          $ref: '#/definitions/CreateRepoOption'
      responses:
        '201':
          $ref: '#/responses/Repository'
        '400':
          $ref: '#/responses/error'
        '403':
          $ref: '#/responses/forbidden'
        '404':
          $ref: '#/responses/notFound'
    delete:
      produces:
      - application/json
      tags:
      - organization
      summary: Delete all repositories in an organization
      operationId: orgDeleteRepos
      parameters:
      - type: string
        description: name of the organization
        name: org
        in: path
        required: true
      respo

# --- truncated at 32 KB (91 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/gitea/refs/heads/main/openapi/gitea-organization-api-openapi.yml