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_managerin the organization.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The organization name. The name is not case sensitive.
The custom property name
Request Body required
Section titled “ Request Body required ”Custom property set payload
object
The type of the value for the property
Whether the property is required.
Short description of the property
An ordered list of the allowed values of the property. The property can have up to 200 allowed values.
Who can edit the values of the property
Whether setting properties values is mandatory
Examples
{ "value_type": "single_select", "required": true, "default_value": "production", "description": "Prod or dev environment", "allowed_values": [ "production", "development" ]}Responses
Section titled “ Responses ”Response
Custom property defined on an organization
object
The name of the property
The URL that can be used to fetch, update, or delete info about this property via the API.
The source type of the property
The type of the value for the property
Whether the property is required.
Short description of the property
An ordered list of the allowed values of the property. The property can have up to 200 allowed values.
Who can edit the values of the property
Whether setting properties values is mandatory
Examples
{ "property_name": "environment", "url": "https://api.github.com/orgs/github/properties/schema/environment", "source_type": "organization", "value_type": "single_select", "required": true, "default_value": "production", "description": "Prod or dev environment", "allowed_values": [ "production", "development" ]}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Resource not found
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}