Gitea organization API

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

Operations 67

POST /org/{org}/repos Create a repository in an organization #
GET /orgs Get list of organizations #
POST /orgs Create an organization #
GET /orgs/{org} Get an organization #
DELETE /orgs/{org} Delete an organization #
PATCH /orgs/{org} Edit an organization #
GET /orgs/{org}/actions/jobs Get org-level workflow jobs #
GET /orgs/{org}/actions/runners Get org-level runners #
POST /orgs/{org}/actions/runners/registration-token Get an organization's actions runner registration token #
GET /orgs/{org}/actions/runners/{runner_id} Get an org-level runner #
DELETE /orgs/{org}/actions/runners/{runner_id} Delete an org-level runner #
PATCH /orgs/{org}/actions/runners/{runner_id} Update an org-level runner #
GET /orgs/{org}/actions/runs Get org-level workflow runs #
GET /orgs/{org}/actions/secrets List an organization's actions secrets #
PUT /orgs/{org}/actions/secrets/{secretname} Create or Update a secret value in an organization #
DELETE /orgs/{org}/actions/secrets/{secretname} Delete a secret in an organization #
GET /orgs/{org}/actions/variables Get an org-level variables list #
GET /orgs/{org}/actions/variables/{variablename} Get an org-level variable #
PUT /orgs/{org}/actions/variables/{variablename} Update an org-level variable #
POST /orgs/{org}/actions/variables/{variablename} Create an org-level variable #
DELETE /orgs/{org}/actions/variables/{variablename} Delete an org-level variable #
GET /orgs/{org}/activities/feeds List an organization's activity feeds #
POST /orgs/{org}/avatar Update Avatar #
DELETE /orgs/{org}/avatar Delete Avatar #
GET /orgs/{org}/blocks List users blocked by the organization #
GET /orgs/{org}/blocks/{username} Check if a user is blocked by the organization #
PUT /orgs/{org}/blocks/{username} Block a user #
DELETE /orgs/{org}/blocks/{username} Unblock a user #
GET /orgs/{org}/hooks List an organization's webhooks #
POST /orgs/{org}/hooks Create a hook #
GET /orgs/{org}/hooks/{id} Get a hook #
DELETE /orgs/{org}/hooks/{id} Delete a hook #
PATCH /orgs/{org}/hooks/{id} Update a hook #
GET /orgs/{org}/labels List an organization's labels #
POST /orgs/{org}/labels Create a label for an organization #
GET /orgs/{org}/labels/{id} Get a single label #
DELETE /orgs/{org}/labels/{id} Delete a label #
PATCH /orgs/{org}/labels/{id} Update a label #
GET /orgs/{org}/members List an organization's members #
GET /orgs/{org}/members/{username} Check if a user is a member of an organization #
DELETE /orgs/{org}/members/{username} Remove a member from an organization #
GET /orgs/{org}/public_members List an organization's public members #
GET /orgs/{org}/public_members/{username} Check if a user is a public member of an organization #
PUT /orgs/{org}/public_members/{username} Publicize a user's membership #
DELETE /orgs/{org}/public_members/{username} Conceal a user's membership #
POST /orgs/{org}/rename Rename an organization #
GET /orgs/{org}/repos List an organization's repos #
POST /orgs/{org}/repos Create a repository in an organization #
DELETE /orgs/{org}/repos Delete all repositories in an organization #
GET /orgs/{org}/teams List an organization's teams #
POST /orgs/{org}/teams Create a team #
GET /orgs/{org}/teams/search Search for teams within an organization #
GET /teams/{id} Get a team #
DELETE /teams/{id} Delete a team #
PATCH /teams/{id} Edit a team #
GET /teams/{id}/activities/feeds List a team's activity feeds #
GET /teams/{id}/members List a team's members #
GET /teams/{id}/members/{username} List a particular member of team #
PUT /teams/{id}/members/{username} Add a team member #
DELETE /teams/{id}/members/{username} Remove a team member #
GET /teams/{id}/repos List a team's repos #
GET /teams/{id}/repos/{org}/{repo} List a particular repo of team #
PUT /teams/{id}/repos/{org}/{repo} Add a repository to a team #
DELETE /teams/{id}/repos/{org}/{repo} Remove a repository from a team #
GET /user/orgs List the current user's organizations #
GET /users/{username}/orgs List a user's organizations #
GET /users/{username}/orgs/{org}/permissions Get user permissions in 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

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/gitea-organization-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

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

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