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

Create or update a custom property for an organization

Creates a new or updates an existing custom property that is defined for an organization.

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.

2 parameters · 7 body fields
orgstringrequired
The organization name. The name is not case sensitive.
custom_property_namestringrequired
The custom property name
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

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.