# List organizations for a user

From **GitHub v3 REST API**.

`GET /users/{username}/orgs`

List [public organization memberships](https://docs.github.com/articles/publicizing-or-concealing-organization-membership) for the specified user.

This method only lists _public_ memberships, regardless of authentication. If you need to fetch all of the organization memberships (public and private) for the authenticated user, use the [List organizations for the authenticated user](https://docs.github.com/enterprise-server@3.0/rest/reference/orgs#list-organizations-for-the-authenticated-user) API instead.

## Parameters

### `username`

- Location: path
- Required: true
- Type: `string`

### `per_page`

- Location: query
- Required: false
- Type: `integer`
- Default: `30`

Results per page (max 100)

### `page`

- Location: query
- Required: false
- Type: `integer`
- Default: `1`

Page number of the results to fetch.

## Responses

### `200`

Response

#### Headers

##### `Link`

- Type: `string`

- Example: `<https://api.github.com/resource?page=2>; rel="next", <https://api.github.com/resource?page=5>; rel="last"`

### `application/json`

- Type: `array`

```json
[
  {
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "description": "A great organization",
    "events_url": "https://api.github.com/orgs/github/events",
    "hooks_url": "https://api.github.com/orgs/github/hooks",
    "id": 1,
    "issues_url": "https://api.github.com/orgs/github/issues",
    "login": "github",
    "members_url": "https://api.github.com/orgs/github/members{/member}",
    "node_id": "MDEyOk9yZ2FuaXphdGlvbjE=",
    "public_members_url": "https://api.github.com/orgs/github/public_members{/member}",
    "repos_url": "https://api.github.com/orgs/github/repos",
    "url": "https://api.github.com/orgs/github"
  }
]
```

```json
{"items":{"$ref":"#/components/schemas/organization-simple"},"type":"array"}
```

## Request examples

### cURL

```shell
curl --request GET \
  --url {protocol}://{hostname}/api/v3/users/{username}/orgs
```
