| title | Organizations |
|---|
{:toc}
List organizations for the authenticated user.
This only lists organizations that your authorization allows you to operate on in some way (e.g., you can list teams with read:org scope, you can publicize your organization membership with user scope, etc.). Therefore, this API requires at least user or read:org scope. OAuth requests with insufficient scope receive a 403 Forbidden response.
GET /user/orgs
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:org) { |h| [h] } %>
{% if page.version == 'dotcom' or page.version >= 2.3 %}
Lists all organizations, in the order that they were created on {{ site.data.variables.product.product_name }}.
Note: Pagination is powered exclusively by the since parameter.
Use the Link header to get the URL for the next page of
organizations.
GET /organizations
| Name | Type | Description |
|---|---|---|
since |
string |
The integer ID of the last Organization that you've seen. |
<%= headers 200, :pagination => { :next => 'https://api.github.com/organizations?since=135' } %> <%= json(:org) {|h| [h] } %>
{% endif %}
List public organization memberships 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 your organizations API instead.
GET /users/:username/orgs
<%= headers 200, :pagination => default_pagination_rels %> <%= json(:org) { |h| [h] } %>
{% if page.version == 'dotcom' or page.version >= 2.8 %}
Note: To receive values for private_gists, disk_usage, collaborators, and
billing_email in the Organization response, the authenticated user must be an
organization owner and have authorized the admin:org scope.
{% endif %}
GET /orgs/:org
<%= headers 200 %> <%= json(:full_org) %>
PATCH /orgs/:org
| Name | Type | Description |
|---|---|---|
billing_email |
string |
Billing email address. This address is not publicized. |
company |
string |
The company name. |
email |
string |
The publicly visible email address. |
location |
string |
The location. |
name |
string |
The shorthand name of the company. |
description |
string |
The description of the company. |
<%= json
:billing_email => "[email protected]",
:blog => "https://github.com/blog",
:company => "GitHub",
:email => "[email protected]",
:location => "San Francisco",
:name => "github",
:description => "GitHub, the company."
%>
<%= headers 200 %> <%= json(:private_org) %>