Skip to main content
A API REST agora é versionada. Para obter mais informações, confira "Sobre o controle de versão da API".

Pontos de extremidade de API REST para os valores de propriedade personalizados de uma organização

Usar a API REST para gerenciar valores de propriedade personalizados para uma organização

Get all custom property values for an organization

Gets all custom property values that are set for an organization.

The organization must belong to an enterprise.

Access requirements:

  • Organization admins
  • OAuth tokens and personal access tokens (classic) with the read:org scope
  • Actors with the organization-level "read custom properties for an organization" fine-grained permission or above

fine_grained_access

works_with_fine_grained_tokens:

permission_set:

  • "Custom properties for organizations" organization permissions (read)

Parâmetros para "Get all custom property values for an organization"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
org string Obrigatório

The organization name. The name is not case sensitive.

http_status_code

status_codeDescrição
200

OK

403

Forbidden

404

Resource not found

code_samples

data_residency_notice

request_example

get/organizations/{org}/org-properties/values
curl -L \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/organizations/ORG/org-properties/values

Response

Status: 200
[ { "property_name": "environment", "value": "production" }, { "property_name": "service", "value": "web" }, { "property_name": "team", "value": "octocat" } ]

Create or update custom property values for an organization

Create new or update existing custom property values for an organization. To remove a custom property value from an organization, set the property value to null.

The organization must belong to an enterprise.

Access requirements:

  • Organization admins
  • OAuth tokens and personal access tokens (classic) with the admin:org scope
  • Actors with the organization-level "edit custom properties for an organization" fine-grained permission

fine_grained_access

works_with_fine_grained_tokens:

permission_set:

  • "Custom properties for organizations" organization permissions (write)

Parâmetros para "Create or update custom property values for an organization"

Cabeçalhos
Nome, Tipo, Descrição
accept string

Setting to application/vnd.github+json is recommended.

Parâmetros de caminho
Nome, Tipo, Descrição
org string Obrigatório

The organization name. The name is not case sensitive.

Parâmetros do corpo
Nome, Tipo, Descrição
properties array of objects Obrigatório

A list of custom property names and associated values to apply to the organization.

Nome, Tipo, Descrição
property_name string Obrigatório

The name of the property

value null or string or array Obrigatório

The value assigned to the property

http_status_code

status_codeDescrição
204

No Content when custom property values are successfully created or updated

403

Forbidden

404

Resource not found

422

Validation failed, or the endpoint has been spammed.

code_samples

data_residency_notice

request_example

patch/organizations/{org}/org-properties/values
curl -L \ -X PATCH \ -H "Accept: application/vnd.github+json" \ -H "Authorization: Bearer <YOUR-TOKEN>" \ -H "X-GitHub-Api-Version: 2026-03-10" \ https://api.github.com/organizations/ORG/org-properties/values \ -d '{"properties":[{"property_name":"environment","value":"production"},{"property_name":"service","value":"web"},{"property_name":"team","value":"octocat"}]}'

No Content when custom property values are successfully created or updated

Status: 204