Skip to content

Create or update custom property values for organization repositories

PATCH
/orgs/{org}/properties/values

Create new or update existing custom property values for repositories in a batch that belong to an organization. Each target repository will have its custom property values updated to match the values provided in the request.

A maximum of 30 repositories can be updated in a single request.

Using a value of null for a custom property will remove or ‘unset’ the property value from the repository.

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_values_editor in the organization.

API method documentation

org
required
string

The organization name. The name is not case sensitive.

Media type application/json
object
repository_names
required

The names of repositories that the custom property values will be applied to.

Array<string>
>= 1 items <= 30 items
properties
required

List of custom property names and associated values to apply to the repositories.

Array<object>
Custom Property Value

Custom property name and associated value

object
property_name
required

The name of the property

string
value
required
One of:
string
Examples
Example default
{
"repository_names": [
"Hello-World",
"octo-repo"
],
"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

Forbidden

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Resource not found

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}

Validation failed, or the endpoint has been spammed.

Media type application/json
Validation Error

Validation Error

object
message
required
string
documentation_url
required
string
errors
Array<object>
object
resource
string
field
string
message
string
code
required
string
index
integer
value
One of:
string
nullable
Example generated
{
"message": "example",
"documentation_url": "example",
"errors": [
{
"resource": "example",
"field": "example",
"message": "example",
"code": "example",
"index": 1,
"value": [
"example"
]
}
]
}