> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/go-gitea/gitea/llms.txt
> Use this file to discover all available pages before exploring further.

# Organizations API

> Manage organizations through the Gitea API

The Organizations API allows you to create, manage, and interact with organizations in Gitea. Organizations provide a way to group repositories and users together with team-based permissions.

## Organization Object

The Organization object represents an organization in Gitea.

<ResponseField name="id" type="integer" required>
  The unique identifier of the organization
</ResponseField>

<ResponseField name="name" type="string" required>
  The username of the organization
</ResponseField>

<ResponseField name="full_name" type="string">
  The full display name of the organization
</ResponseField>

<ResponseField name="email" type="string">
  The email address of the organization
</ResponseField>

<ResponseField name="avatar_url" type="string">
  The URL of the organization's avatar
</ResponseField>

<ResponseField name="description" type="string">
  The description of the organization
</ResponseField>

<ResponseField name="website" type="string">
  The website URL of the organization
</ResponseField>

<ResponseField name="location" type="string">
  The location of the organization
</ResponseField>

<ResponseField name="visibility" type="string">
  The visibility level of the organization: `public`, `limited`, or `private`
</ResponseField>

<ResponseField name="repo_admin_change_team_access" type="boolean">
  Whether repository administrators can change team access
</ResponseField>

## List All Organizations

<Card title="GET /orgs" icon="list">
  Get a list of all public organizations
</Card>

### Query Parameters

<ParamField query="page" type="integer">
  Page number of results to return (1-based)
</ParamField>

<ParamField query="limit" type="integer">
  Page size of results
</ParamField>

### Example Request

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/orgs?page=1&limit=10" \
  -H "accept: application/json"
```

### Response

```json theme={null}
[
  {
    "id": 1,
    "name": "myorg",
    "full_name": "My Organization",
    "email": "contact@myorg.com",
    "avatar_url": "https://gitea.example.com/avatars/1",
    "description": "A great organization",
    "website": "https://myorg.com",
    "location": "San Francisco, CA",
    "visibility": "public",
    "repo_admin_change_team_access": false
  }
]
```

## Get an Organization

<Card title="GET /orgs/{org}" icon="building">
  Get details about a specific organization
</Card>

### Path Parameters

<ParamField path="org" type="string" required>
  The name of the organization to retrieve
</ParamField>

### Example Request

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/orgs/myorg" \
  -H "accept: application/json"
```

### Response

```json theme={null}
{
  "id": 1,
  "name": "myorg",
  "full_name": "My Organization",
  "email": "contact@myorg.com",
  "avatar_url": "https://gitea.example.com/avatars/1",
  "description": "A great organization",
  "website": "https://myorg.com",
  "location": "San Francisco, CA",
  "visibility": "public",
  "repo_admin_change_team_access": false
}
```

## Create an Organization

<Card title="POST /orgs" icon="plus">
  Create a new organization
</Card>

### Request Body

<ParamField body="username" type="string" required>
  Username of the organization (max 40 characters)
</ParamField>

<ParamField body="full_name" type="string">
  The full display name of the organization (max 100 characters)
</ParamField>

<ParamField body="email" type="string">
  The email address of the organization (max 255 characters)
</ParamField>

<ParamField body="description" type="string">
  The description of the organization (max 255 characters)
</ParamField>

<ParamField body="website" type="string">
  The website URL of the organization (max 255 characters)
</ParamField>

<ParamField body="location" type="string">
  The location of the organization (max 50 characters)
</ParamField>

<ParamField body="visibility" type="string" default="public">
  Visibility level: `public`, `limited`, or `private`
</ParamField>

<ParamField body="repo_admin_change_team_access" type="boolean" default="false">
  Whether repository administrators can change team access
</ParamField>

### Example Request

```bash theme={null}
curl -X POST "https://gitea.example.com/api/v1/orgs" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "username": "myorg",
    "full_name": "My Organization",
    "email": "contact@myorg.com",
    "description": "A great organization",
    "website": "https://myorg.com",
    "location": "San Francisco, CA",
    "visibility": "public"
  }'
```

### Response

```json theme={null}
{
  "id": 1,
  "name": "myorg",
  "full_name": "My Organization",
  "email": "contact@myorg.com",
  "avatar_url": "https://gitea.example.com/avatars/1",
  "description": "A great organization",
  "website": "https://myorg.com",
  "location": "San Francisco, CA",
  "visibility": "public",
  "repo_admin_change_team_access": false
}
```

## Update an Organization

<Card title="PATCH /orgs/{org}" icon="pen-to-square">
  Update an existing organization's information
</Card>

### Path Parameters

<ParamField path="org" type="string" required>
  The name of the organization to update
</ParamField>

### Request Body

<ParamField body="full_name" type="string">
  The full display name of the organization
</ParamField>

<ParamField body="email" type="string">
  The email address of the organization
</ParamField>

<ParamField body="description" type="string">
  The description of the organization
</ParamField>

<ParamField body="website" type="string">
  The website URL of the organization
</ParamField>

<ParamField body="location" type="string">
  The location of the organization
</ParamField>

<ParamField body="visibility" type="string">
  Visibility level: `public`, `limited`, or `private`
</ParamField>

<ParamField body="repo_admin_change_team_access" type="boolean">
  Whether repository administrators can change team access
</ParamField>

### Example Request

```bash theme={null}
curl -X PATCH "https://gitea.example.com/api/v1/orgs/myorg" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated organization description",
    "website": "https://newsite.com"
  }'
```

## Rename an Organization

<Card title="POST /orgs/{org}/rename" icon="signature">
  Rename an existing organization
</Card>

### Path Parameters

<ParamField path="org" type="string" required>
  The current name of the organization
</ParamField>

### Request Body

<ParamField body="new_name" type="string" required>
  New username for the organization. This name cannot be in use by any other user.
</ParamField>

### Example Request

```bash theme={null}
curl -X POST "https://gitea.example.com/api/v1/orgs/myorg/rename" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"new_name": "neworgname"}'
```

## Delete an Organization

<Card title="DELETE /orgs/{org}" icon="trash">
  Delete an organization
</Card>

### Path Parameters

<ParamField path="org" type="string" required>
  The name of the organization to delete
</ParamField>

### Example Request

```bash theme={null}
curl -X DELETE "https://gitea.example.com/api/v1/orgs/myorg" \
  -H "Authorization: token YOUR_TOKEN"
```

## Organization Members

<CardGroup cols={2}>
  <Card title="List Members" icon="users" href="#list-organization-members">
    Get all members of an organization
  </Card>

  <Card title="Check Membership" icon="user-check" href="#check-organization-membership">
    Check if a user is a member
  </Card>

  <Card title="Remove Member" icon="user-minus" href="#remove-organization-member">
    Remove a member from the organization
  </Card>

  <Card title="Public Members" icon="eye" href="#list-public-members">
    List public members of the organization
  </Card>
</CardGroup>

### List Organization Members

```bash theme={null}
GET /orgs/{org}/members
```

List all members of an organization. Visibility depends on the requester's membership status.

### Check Organization Membership

```bash theme={null}
GET /orgs/{org}/members/{username}
```

Check if a user is a member of the organization. Returns `204` if the user is a member, `404` otherwise.

### Remove Organization Member

```bash theme={null}
DELETE /orgs/{org}/members/{username}
```

Remove a member from the organization. Requires owner permissions.

### List Public Members

```bash theme={null}
GET /orgs/{org}/public_members
```

List all public members of an organization.

### Publicize Membership

```bash theme={null}
PUT /orgs/{org}/public_members/{username}
```

Make a member's membership public.

### Conceal Membership

```bash theme={null}
DELETE /orgs/{org}/public_members/{username}
```

Make a member's membership private.

## User's Organizations

### List Current User's Organizations

<Card title="GET /user/orgs" icon="building-user">
  List all organizations that the authenticated user is a member of
</Card>

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/user/orgs" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "accept: application/json"
```

### List User's Organizations

<Card title="GET /users/{username}/orgs" icon="building">
  List all organizations that a specific user is a member of
</Card>

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/users/john/orgs" \
  -H "accept: application/json"
```

## Organization Permissions

<Card title="GET /users/{username}/orgs/{org}/permissions" icon="key">
  Get a user's permissions in an organization
</Card>

### Response Fields

<ResponseField name="is_owner" type="boolean">
  Whether the user is an owner of the organization
</ResponseField>

<ResponseField name="is_admin" type="boolean">
  Whether the user is an admin of the organization
</ResponseField>

<ResponseField name="can_write" type="boolean">
  Whether the user can write to the organization
</ResponseField>

<ResponseField name="can_read" type="boolean">
  Whether the user can read the organization
</ResponseField>

<ResponseField name="can_create_repository" type="boolean">
  Whether the user can create repositories in the organization
</ResponseField>

### Example Request

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/users/john/orgs/myorg/permissions" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "accept: application/json"
```

### Response

```json theme={null}
{
  "is_owner": true,
  "is_admin": true,
  "can_write": true,
  "can_read": true,
  "can_create_repository": true
}
```

## Activity Feeds

<Card title="GET /orgs/{org}/activities/feeds" icon="rss">
  List an organization's activity feeds
</Card>

### Path Parameters

<ParamField path="org" type="string" required>
  The name of the organization
</ParamField>

### Query Parameters

<ParamField query="date" type="string">
  The date of the activities to be found (format: YYYY-MM-DD)
</ParamField>

<ParamField query="page" type="integer">
  Page number of results to return (1-based)
</ParamField>

<ParamField query="limit" type="integer">
  Page size of results
</ParamField>

### Example Request

```bash theme={null}
curl -X GET "https://gitea.example.com/api/v1/orgs/myorg/activities/feeds?date=2026-03-10" \
  -H "Authorization: token YOUR_TOKEN" \
  -H "accept: application/json"
```
