Skip to main content
The REST API is now versioned. For more information, see "About API versioning."

REST API endpoints for custom properties

Use the REST API to create and manage custom properties for an organization.

About custom properties

You can use the REST API to create and manage custom properties for an organization. You can use custom properties to add metadata to repositories in your organization. For more information, see Managing custom properties for repositories in your organization.

Get all custom properties for an organization

Gets all custom properties defined for an organization. Organization members can read these properties.

Fine-grained access tokens for "Get all custom properties for an organization"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Custom properties" organization permissions (read)

Parameters for "Get all custom properties for an organization"

Headers
Name, Type, Description
accept string

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

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

HTTP response status codes for "Get all custom properties for an organization"

Status codeDescription
200

OK

403

Forbidden

404

Resource not found

Code samples for "Get all custom properties for an organization"

Request example

get/orgs/{org}/properties/schema
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/orgs/ORG/properties/schema

Response

Status: 200
[ { "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" ], "values_editable_by": "org_actors", "require_explicit_values": true }, { "property_name": "service", "url": "https://api.github.com/orgs/github/properties/schema/service", "source_type": "organization", "value_type": "string" }, { "property_name": "team", "url": "https://api.github.com/orgs/github/properties/schema/team", "source_type": "organization", "value_type": "string", "description": "Team owning the repository" } ]

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.

Fine-grained access tokens for "Create or update custom properties for an organization"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Custom properties" organization permissions (admin)

Parameters for "Create or update custom properties for an organization"

Headers
Name, Type, Description
accept string

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

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.

Body parameters
Name, Type, Description
properties array of objects Required

The array of custom properties to create or update.

Name, Type, Description
property_name string Required

The name of the property

url string

The URL that can be used to fetch, update, or delete info about this property via the API.

source_type string

The source type of the property

Can be one of: organization, enterprise

value_type string Required

The type of the value for the property

Can be one of: string, single_select, multi_select, true_false, url

required boolean

Whether the property is required.

default_value null or string or array

Default value of the property

description string or null

Short description of the property

allowed_values array of strings or null

An ordered list of the allowed values of the property. The property can have up to 200 allowed values.

values_editable_by string or null

Who can edit the values of the property

Can be one of: org_actors, org_and_repo_actors, null

require_explicit_values boolean

Whether setting properties values is mandatory

HTTP response status codes for "Create or update custom properties for an organization"

Status codeDescription
200

OK

403

Forbidden

404

Resource not found

Code samples for "Create or update custom properties for an organization"

Request example

patch/orgs/{org}/properties/schema
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/orgs/ORG/properties/schema \ -d '{"properties":[{"property_name":"environment","value_type":"single_select","required":true,"default_value":"production","description":"Prod or dev environment","allowed_values":["production","development"],"values_editable_by":"org_actors"},{"property_name":"service","value_type":"string"},{"property_name":"team","value_type":"string","description":"Team owning the repository"}]}'

Response

Status: 200
[ { "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" ], "values_editable_by": "org_actors", "require_explicit_values": true }, { "property_name": "service", "url": "https://api.github.com/orgs/github/properties/schema/service", "source_type": "organization", "value_type": "string" }, { "property_name": "team", "url": "https://api.github.com/orgs/github/properties/schema/team", "source_type": "organization", "value_type": "string", "description": "Team owning the repository" } ]

Get a custom property for an organization

Gets a custom property that is defined for an organization. Organization members can read these properties.

Fine-grained access tokens for "Get a custom property for an organization"

This endpoint works with the following fine-grained token types:

The fine-grained token must have the following permission set:

  • "Custom properties" organization permissions (read)

Parameters for "Get a custom property for an organization"

Headers
Name, Type, Description
accept string

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

Path parameters
Name, Type, Description
org string Required

The organization name. The name is not case sensitive.