Sample - GitHub REST API
PATCH/orgs/{org}/properties/schema

Create or update custom properties for an organization

Creates new or updates existing custom properties defined for an organization in a batch.

If the property already exists, the existing property will be replaced with the new values. Missing optional values will fall back to default values, previous values will be overwritten. E.g. if a property exists with values_editable_by: org_and_repo_actors and it's updated without specifying values_editable_by, it will be updated to default value org_actors.

To use this endpoint, the authenticated user must be one of:

  • An administrator for the organization.
  • A user, or a user on a team, with the fine-grained permission of custom_properties_org_definitions_manager in the organization.
  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

1 parameter · 1 body field
orgstringrequired
The organization name. The name is not case sensitive.
propertiesarray<OrganizationCustomProperty>required
The array of custom properties to create or update.

3 status codes
200Response
property_namestringrequired
The name of the property
urlstringoptional
The URL that can be used to fetch, update, or delete info about this property via the API.
source_typestringoptional
The source type of the property
Allowed:organizationenterprise
value_typestringrequired
The type of the value for the property
Allowed:stringsingle_selectmulti_selecttrue_falseurl
requiredbooleanoptional
Whether the property is required.
default_valuestringoptional
Default value of the property
descriptionstringoptional
Short description of the property
allowed_valuesarray<string>optional
An ordered list of the allowed values of the property. The property can have up to 200 allowed values.
values_editable_bystringoptional
Who can edit the values of the property
Allowed:org_actorsorg_and_repo_actors
require_explicit_valuesbooleanoptional
Whether setting properties values is mandatory
403Forbidden
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Resource not found
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 403 is returned: Forbidden. A 404 is returned: Resource not found.