Interact with organizations.
108 endpoints tagged orgs, each listing its
parameters and possible responses. Search or scroll the index below to
jump to a specific endpoint.
No endpoints match your search.
GET /organizations
Lists all organizations, in the order that they were created.
| Name | In | Required | Description |
|---|---|---|---|
since | query | no | An organization ID. Only return organizations with an ID greater than this ID. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
GET /orgs/{org}
Gets information about an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PATCH /orgs/{org}
Updates the organization's profile and member privileges.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed | yes |
| 409 | Conflict | yes |
DELETE /orgs/{org}
Deletes an organization and all its repositories.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Accepted | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
POST /orgs/{org}/artifacts/metadata/deployment-record
Create or update deployment records for an artifact associated
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Artifact deployment record stored successfully. | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/artifacts/metadata/deployment-record/cluster/{cluster}
Set deployment records for a given cluster.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
cluster | path | yes | The cluster name. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Deployment records created or updated successfully. | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/artifacts/metadata/storage-record
Create metadata storage records for artifacts associated with an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Artifact metadata storage record stored successfully. | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/artifacts/{subject_digest}/metadata/deployment-records
List deployment records for an artifact metadata associated with an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
subject_digest | path | yes | The SHA256 digest of the artifact, in the form sha256:HEX_DIGEST. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Successful response | yes |
GET /orgs/{org}/artifacts/{subject_digest}/metadata/storage-records
List artifact storage records with a given subject digest for repositories owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
subject_digest | path | yes | The parameter should be set to the attestation's subject's SHA256 digest, in the form sha256:HEX_DIGEST. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/attestations/bulk-list
List a collection of artifact attestations associated with any entry in a list of subject digests owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
POST /orgs/{org}/attestations/delete-request
Delete artifact attestations in bulk by either subject digests or unique ID.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | no |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/attestations/digest/{subject_digest}
Delete an artifact attestation by subject digest.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
subject_digest | path | yes | Subject Digest |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | no |
| 204 | Response | no |
| 404 | Resource not found | yes |
GET /orgs/{org}/attestations/repositories
List repositories owned by the provided organization that have created at least one attested artifact
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
org | path | yes | The organization name. The name is not case sensitive. |
predicate_type | query | no | Optional filter for fetching attestations with a given predicate type. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
DELETE /orgs/{org}/attestations/{attestation_id}
Delete an artifact attestation by unique ID that is associated with a repository owned by an org.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
attestation_id | path | yes | Attestation ID |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | no |
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/attestations/{subject_digest}
List a collection of artifact attestations with a given subject digest that are associated with repositories owned by an organization.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
before | query | no | A cursor, as given in the Link header. If specified, the query only searches for results before this cursor. For more information, see "Using pagination in the REST API." |
after | query | no | A cursor, as given in the Link header. If specified, the query only searches for results after this cursor. For more information, see "Using pagination in the REST API." |
org | path | yes | The organization name. The name is not case sensitive. |
subject_digest | path | yes | The parameter should be set to the attestation's subject's SHA256 digest, in the form sha256:HEX_DIGEST. |
predicate_type | query | no | Optional filter for fetching attestations with a given predicate type. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/blocks
List the users blocked by an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/blocks/{username}
Returns a 204 if the given user is blocked by the given organization. Returns a 404 if the organization is not blocking the user, or if the user account has been identified as spam by GitHub.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | If the user is blocked | no |
| 404 | If the user is not blocked | yes |
PUT /orgs/{org}/blocks/{username}
Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/blocks/{username}
Unblocks the given user on behalf of the specified organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/failed_invitations
The return hash contains failed_at and failed_reason fields which represent the time at which the invitation failed and the reason for the failure.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/hooks
List webhooks for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/hooks
Create a hook that posts payloads in JSON format.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/hooks/{hook_id}
Returns a webhook configured in an organization. To get only the webhook
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
PATCH /orgs/{org}/hooks/{hook_id}
Updates a webhook configured in an organization. When you update a webhook,
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/hooks/{hook_id}
Delete a webhook for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
GET /orgs/{org}/hooks/{hook_id}/config
Returns the webhook configuration for an organization. To get more information about the webhook, including the active state and events, use "Get an organization webhook ."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PATCH /orgs/{org}/hooks/{hook_id}/config
Updates the webhook configuration for an organization. To update more information about the webhook, including the active state and events, use "Update an organization webhook ."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/hooks/{hook_id}/deliveries
Returns a list of webhook deliveries for a webhook configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
cursor | query | no | Used for pagination: the starting delivery from which the page of deliveries is fetched. Refer to the link header for the next and previous page cursors. |
status | query | no | Returns webhook deliveries filtered by delivery outcome classification based on status_code range. A status of success returns deliveries with a status_code in the 200-399 range (inclusive). A status of failure returns deliveries with a status_code in the 400-599 range (inclusive). |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 400 | Bad Request | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}
Returns a delivery for a webhook configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
delivery_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 400 | Bad Request | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts
Redeliver a delivery for a webhook configured in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
delivery_id | path | yes |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | Accepted | yes |
| 400 | Bad Request | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
POST /orgs/{org}/hooks/{hook_id}/pings
This will trigger a ping event
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
hook_id | path | yes | The unique identifier of the hook. You can find this value in the X-GitHub-Hook-ID header of a webhook delivery. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Resource not found | yes |
GET /orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}
Get API request count statistics for an actor broken down by route within a specified time frame.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
actor_type | path | yes | The type of the actor |
actor_id | path | yes | The ID of the actor |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
direction | query | no | The direction to sort the results by. |
sort | query | no | The property to sort the results by. |
api_route_substring | query | no | Providing a substring will filter results where the API route contains the substring. This is a case-insensitive search. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/subject-stats
Get API request statistics for all subjects within an organization within a specified time frame. Subjects can be users or GitHub Apps.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
direction | query | no | The direction to sort the results by. |
sort | query | no | The property to sort the results by. |
subject_name_substring | query | no | Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/summary-stats
Get overall statistics of API requests made within an organization by all users and apps within a specified time frame.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/summary-stats/users/{user_id}
Get overall statistics of API requests within the organization for a user.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
user_id | path | yes | The ID of the user to query for stats |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}
Get overall statistics of API requests within the organization made by a specific actor. Actors can be GitHub App installations, OAuth apps or other tokens on behalf of a user.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
actor_type | path | yes | The type of the actor |
actor_id | path | yes | The ID of the actor |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/time-stats
Get the number of API requests and rate-limited requests made within an organization over a specified time period.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
timestamp_increment | query | yes | The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/time-stats/users/{user_id}
Get the number of API requests and rate-limited requests made within an organization by a specific user over a specified time period.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
user_id | path | yes | The ID of the user to query for stats |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
timestamp_increment | query | yes | The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}
Get the number of API requests and rate-limited requests made within an organization by a specific actor within a specified time period.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
actor_type | path | yes | The type of the actor |
actor_id | path | yes | The ID of the actor |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
timestamp_increment | query | yes | The increment of time used to breakdown the query results (5m, 10m, 1h, etc.) |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/insights/api/user-stats/{user_id}
Get API usage statistics within an organization for a user broken down by the type of access.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
user_id | path | yes | The ID of the user to query for stats |
min_timestamp | query | yes | The minimum timestamp to query for stats. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
max_timestamp | query | no | The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
direction | query | no | The direction to sort the results by. |
sort | query | no | The property to sort the results by. |
actor_name_substring | query | no | Providing a substring will filter results where the actor name contains the substring. This is a case-insensitive search. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/installations
Lists all GitHub Apps in an organization. The installation count includes
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/invitations
The return hash contains a role field which refers to the Organization
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
role | query | no | Filter invitations by their member role. |
invitation_source | query | no | Filter invitations by their invitation source. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/invitations
Invite people to an organization by using their GitHub user ID or their email address. In order to create invitations in an organization, the authenticated user must be an organization owner.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 201 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/invitations/{invitation_id}
Cancel an organization invitation. In order to cancel an organization invitation, the authenticated user must be an organization owner.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
invitation_id | path | yes | The unique identifier of the invitation. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/invitations/{invitation_id}/teams
List all teams associated with an invitation. In order to see invitations in an organization, the authenticated user must be an organization owner.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
invitation_id | path | yes | The unique identifier of the invitation. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/issue-fields
Lists all issue fields for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/issue-fields
Creates a new issue field for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PATCH /orgs/{org}/issue-fields/{issue_field_id}
Updates an issue field for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
issue_field_id | path | yes | The unique identifier of the issue field. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/issue-fields/{issue_field_id}
Deletes an issue field for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
issue_field_id | path | yes | The unique identifier of the issue field. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | A header with no content is returned. | no |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/issue-types
Lists all issue types for an organization. OAuth app tokens and personal access tokens (classic) need the read:org scope to use this endpoint.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
POST /orgs/{org}/issue-types
Create a new issue type for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
PUT /orgs/{org}/issue-types/{issue_type_id}
Updates an issue type for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
issue_type_id | path | yes | The unique identifier of the issue type. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/issue-types/{issue_type_id}
Deletes an issue type for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
issue_type_id | path | yes | The unique identifier of the issue type. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/members
List all users who are members of an organization. If the authenticated user is also a member of this organization then both concealed and public members will be returned.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
filter | query | no | Filter members returned in the list. 2fa_disabled means that only members without two-factor authentication enabled will be returned. 2fa_insecure means that only members with insecure 2FA methods will be returned. These options are only available for organization owners. |
role | query | no | Filter members returned by their role. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/members/{username}
Check if a user is, publicly or privately, a member of the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response if requester is an organization member and user is a member | no |
| 302 | Response if requester is not an organization member | no |
| 404 | Not Found if requester is an organization member and user is not a member | no |
DELETE /orgs/{org}/members/{username}
Removing a user from this list will remove them from all teams and they will no longer have any access to the organization's repositories.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
GET /orgs/{org}/memberships/{username}
In order to get a user's membership with an organization, the authenticated user must be an organization member. The state parameter in the response can be used to identify the user's membership status.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
PUT /orgs/{org}/memberships/{username}
Only authenticated organization owners can add a member to the organization or update the member's role.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 403 | Forbidden | yes |
DELETE /orgs/{org}/memberships/{username}
In order to remove a user's membership with an organization, the authenticated user must be an organization owner.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/organization-roles
Lists the organization roles available in this organization. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response - list of organization roles | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
DELETE /orgs/{org}/organization-roles/teams/{team_slug}
Removes all assigned organization roles from a team. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
team_slug | path | yes | The slug of the team name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}
Assigns an organization role to a team in an organization. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
team_slug | path | yes | The slug of the team name. |
role_id | path | yes | The unique identifier of the role. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Response if the organization, team or role does not exist. | no |
| 422 | Response if the organization roles feature is not enabled for the organization, or validation failed. | no |
DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}
Removes an organization role from a team. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
team_slug | path | yes | The slug of the team name. |
role_id | path | yes | The unique identifier of the role. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/organization-roles/users/{username}
Revokes all assigned organization roles from a user. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/organization-roles/users/{username}/{role_id}
Assigns an organization role to a member of an organization. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
role_id | path | yes | The unique identifier of the role. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 404 | Response if the organization, user or role does not exist. | no |
| 422 | Response if the organization roles feature is not enabled enabled for the organization, the validation failed, or the user is not an organization member. | no |
DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}
Remove an organization role from a user. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
role_id | path | yes | The unique identifier of the role. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/organization-roles/{role_id}
Gets an organization role that is available to this organization. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
role_id | path | yes | The unique identifier of the role. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/organization-roles/{role_id}/teams
Lists the teams that are assigned to an organization role. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
role_id | path | yes | The unique identifier of the role. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response - List of assigned teams | yes |
| 404 | Response if the organization or role does not exist. | no |
| 422 | Response if the organization roles feature is not enabled or validation failed. | no |
GET /orgs/{org}/organization-roles/{role_id}/users
Lists organization members that are assigned to an organization role. For more information on organization roles, see "Using organization roles."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
role_id | path | yes | The unique identifier of the role. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response - List of assigned users | yes |
| 404 | Response if the organization or role does not exist. | no |
| 422 | Response if the organization roles feature is not enabled or validation failed. | no |
GET /orgs/{org}/outside_collaborators
List all users who are outside collaborators of an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
filter | query | no | Filter the list of outside collaborators. 2fa_disabled means that only outside collaborators without two-factor authentication enabled will be returned. 2fa_insecure means that only outside collaborators with insecure 2FA methods will be returned. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/outside_collaborators/{username}
When an organization member is converted to an outside collaborator, they'll only have access to the repositories that their current team membership allows. The user will no longer be a member of the organization. For more information, see "Converting an organization member to an outside collaborator". Converting an organization member to an outside collaborator may be restricted by enterprise administrators. For more information, see "Enforcing repository management policies in your enterprise."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 202 | User is getting converted asynchronously | yes |
| 204 | User was converted | no |
| 403 | Forbidden if user is the last owner of the organization, not a member of the organization, or if the enterprise enforces a policy for inviting outside collaborators. For more information, see "Enforcing repository management policies in your enterprise." | no |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/outside_collaborators/{username}
Removing a user from this list will remove them from all the organization's repositories.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 422 | Unprocessable Entity if user is a member of the organization | yes |
GET /orgs/{org}/personal-access-token-requests
Lists requests from organization members to access organization resources with a fine-grained personal access token.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
sort | query | no | The property by which to sort the results. |
direction | query | no | The direction to sort the results by. |
owner | query | no | A list of owner usernames to use to filter the results. |
repository | query | no | The name of the repository to use to filter the results. |
permission | query | no | The permission to use to filter the results. |
last_used_before | query | no | Only show fine-grained personal access tokens used before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
last_used_after | query | no | Only show fine-grained personal access tokens used after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
token_id | query | no | The ID of the token |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 200 | Response | yes |
POST /orgs/{org}/personal-access-token-requests
Approves or denies multiple pending requests to access organization resources via a fine-grained personal access token.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 202 | Accepted | yes |
POST /orgs/{org}/personal-access-token-requests/{pat_request_id}
Approves or denies a pending request to access organization resources via a fine-grained personal access token.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
pat_request_id | path | yes | Unique identifier of the request for access via fine-grained personal access token. |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 204 | A header with no content is returned. | no |
GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories
Lists the repositories a fine-grained personal access token request is requesting access to.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
pat_request_id | path | yes | Unique identifier of the request for access via fine-grained personal access token. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 200 | Response | yes |
GET /orgs/{org}/personal-access-tokens
Lists approved fine-grained personal access tokens owned by organization members that can access organization resources.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
sort | query | no | The property by which to sort the results. |
direction | query | no | The direction to sort the results by. |
owner | query | no | A list of owner usernames to use to filter the results. |
repository | query | no | The name of the repository to use to filter the results. |
permission | query | no | The permission to use to filter the results. |
last_used_before | query | no | Only show fine-grained personal access tokens used before the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
last_used_after | query | no | Only show fine-grained personal access tokens used after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ. |
token_id | query | no | The ID of the token |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 200 | Response | yes |
POST /orgs/{org}/personal-access-tokens
Updates the access organization members have to organization resources via fine-grained personal access tokens. Limited to revoking a token's existing access.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 404 | Resource not found | yes |
| 202 | Accepted | yes |
| 403 | Forbidden | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
POST /orgs/{org}/personal-access-tokens/{pat_id}
Updates the access an organization member has to organization resources via a fine-grained personal access token. Limited to revoking the token's existing access. Limited to revoking a token's existing access.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
pat_id | path | yes | The unique identifier of the fine-grained personal access token. |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 404 | Resource not found | yes |
| 204 | A header with no content is returned. | no |
| 403 | Forbidden | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories
Lists the repositories a fine-grained personal access token has access to.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
pat_id | path | yes | Unique identifier of the fine-grained personal access token. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 500 | Internal Error | yes |
| 404 | Resource not found | yes |
| 403 | Forbidden | yes |
| 200 | Response | yes |
GET /orgs/{org}/properties/schema
Gets all custom properties defined for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PATCH /orgs/{org}/properties/schema
Creates new or updates existing custom properties defined for an organization in a batch.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/properties/schema/{custom_property_name}
Gets a custom property that is defined for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
custom_property_name | path | yes | The custom property name |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PUT /orgs/{org}/properties/schema/{custom_property_name}
Creates a new or updates an existing custom property that is defined for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
custom_property_name | path | yes | The custom property name |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
DELETE /orgs/{org}/properties/schema/{custom_property_name}
Removes a custom property that is defined for an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
custom_property_name | path | yes | The custom property name |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | A header with no content is returned. | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
GET /orgs/{org}/properties/values
Lists organization repositories with all of their custom property values.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
repository_query | query | no | Finds repositories in the organization with a query containing one or more search keywords and qualifiers. Qualifiers allow you to limit your search to specific areas of GitHub. The REST API supports the same qualifiers as the web interface for GitHub. To learn more about the format of the query, see Constructing a search query. See "Searching for repositories" for a detailed list of qualifiers. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PATCH /orgs/{org}/properties/values
Create new or update existing custom property values for repositories in a batch that belong to an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | No Content when custom property values are successfully created or updated | no |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /orgs/{org}/public_members
Members of an organization can choose to have their membership publicized or not.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
GET /orgs/{org}/public_members/{username}
Check if the provided user is a public member of the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response if user is a public member | no |
| 404 | Not Found if user is not a public member | no |
PUT /orgs/{org}/public_members/{username}
The user can publicize their own membership. (A user cannot publicize the membership for another user.)
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
| 403 | Forbidden | yes |
DELETE /orgs/{org}/public_members/{username}
Removes the public membership for the authenticated user from the specified organization, unless public visibility is enforced by default.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
username | path | yes | The handle for the GitHub user account. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/rulesets/{ruleset_id}/history
Get the history of an organization ruleset.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
ruleset_id | path | yes | The ID of the ruleset. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
GET /orgs/{org}/rulesets/{ruleset_id}/history/{version_id}
Get a version of an organization ruleset.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
ruleset_id | path | yes | The ID of the ruleset. |
version_id | path | yes | The ID of the version |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 404 | Resource not found | yes |
| 500 | Internal Error | yes |
GET /orgs/{org}/security-managers
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/security-managers/teams/{team_slug}
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
team_slug | path | yes | The slug of the team name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/security-managers/teams/{team_slug}
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
team_slug | path | yes | The slug of the team name. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/settings/immutable-releases
Gets the immutable releases policy for repositories in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Immutable releases settings response | yes |
PUT /orgs/{org}/settings/immutable-releases
Sets the immutable releases policy for repositories in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
GET /orgs/{org}/settings/immutable-releases/repositories
List all of the repositories that have been selected for immutable releases enforcement in an organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
PUT /orgs/{org}/settings/immutable-releases/repositories
Replaces all repositories that have been selected for immutable releases enforcement in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
PUT /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
Adds a repository to the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
DELETE /orgs/{org}/settings/immutable-releases/repositories/{repository_id}
Removes a repository from the list of selected repositories that are enforced for immutable releases in an organization. To use this endpoint, the organization immutable releases policy for enforced_repositories must be configured to selected.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
repository_id | path | yes | The unique identifier of the repository. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Response | no |
POST /orgs/{org}/{security_product}/{enablement}
Enables or disables the specified security feature for all eligible repositories in an organization. For more information, see "Managing security managers in your organization."
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
security_product | path | yes | The security feature to enable or disable. |
enablement | path | yes | The action to take. |
| Status | Description | Has JSON body |
|---|---|---|
| 204 | Action started | no |
| 422 | The action could not be taken due to an in progress enablement, or a policy is preventing enablement | no |
GET /user/memberships/orgs
Lists all of the authenticated user's organization memberships.
| Name | In | Required | Description |
|---|---|---|---|
state | query | no | Indicates the state of the memberships to return. If not specified, the API returns both active and pending memberships. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /user/memberships/orgs/{org}
If the authenticated user is an active or pending member of the organization, this endpoint will return the user's membership. If the authenticated user is not affiliated with the organization, a 404 is returned. This endpoint will return a 403 if the request is made by a GitHub App that is blocked by the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
PATCH /user/memberships/orgs/{org}
Converts the authenticated user to an active member of the organization, if that user has a pending invitation from the organization.
| Name | In | Required | Description |
|---|---|---|---|
org | path | yes | The organization name. The name is not case sensitive. |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | The user's organization invitation was accepted synchronously. | yes |
| 202 | The acceptance of the user's organization invitation is being processed asynchronously. | yes |
| 403 | Forbidden | yes |
| 404 | Resource not found | yes |
| 422 | Validation failed, or the endpoint has been spammed. | yes |
GET /user/orgs
List organizations for the authenticated user.
| Name | In | Required | Description |
|---|---|---|---|
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |
| 304 | Not modified | no |
| 403 | Forbidden | yes |
| 401 | Requires authentication | yes |
GET /users/{username}/orgs
List public organization memberships for the specified user.
| Name | In | Required | Description |
|---|---|---|---|
username | path | yes | The handle for the GitHub user account. |
per_page | query | no | The number of results per page (max 100). For more information, see "Using pagination in the REST API." |
page | query | no | The page number of the results to fetch. For more information, see "Using pagination in the REST API." |
| Status | Description | Has JSON body |
|---|---|---|
| 200 | Response | yes |