Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository
What part(s) of the article would you like to see updated?
Create new or update existing custom property values for a repository. Using a value of null for a custom property will remove or 'unset' the property value from the repository.
Repository admins and other users with the repository-level "edit custom property values" fine-grained permission can use this endpoint.
Additional information
I created a new repository in an organization and tried to use the sample code -- it failed.
In order to use the sample code, I had to know to go to the organization and define properties to allow values for those properties to be set at the repository level. This is not remotely obvious.
% GH_DEBUG=api gh api \
--method PATCH \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2026-03-10" \
/repos/check-spelling-sandbox/urban-train-refactored-chainsaw/properties/values \
--input props1.json || echo oops;
* Request at 2026-04-10 14:00:58.73417 -0400 EDT m=+0.114175793
* Request to https://api.github.com/repos/check-spelling-sandbox/urban-train-refactored-chainsaw/properties/values
> PATCH /repos/check-spelling-sandbox/urban-train-refactored-chainsaw/properties/values HTTP/1.1
> Host: api.github.com
> Accept: application/vnd.github+json
> Authorization: token ████████████████████
> Content-Length: 95
> Content-Type: application/json; charset=utf-8
> Time-Zone: America/Toronto
> User-Agent: GitHub CLI 2.89.0
> X-Github-Api-Version: 2026-03-10
{
"properties": [
{
"property_name": "est",
"value": "something"
}
]
}
< HTTP/2.0 422 Unprocessable Entity
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
< Content-Length: 186
< Content-Security-Policy: default-src 'none'
< Content-Type: application/json; charset=utf-8
< Date: Fri, 10 Apr 2026 18:00:58 GMT
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Server: github.com
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< Vary: Accept-Encoding, Accept, X-Requested-With
< X-Accepted-Oauth-Scopes: repo
< X-Content-Type-Options: nosniff
< X-Frame-Options: deny
< X-Github-Api-Version-Selected: 2026-03-10
< X-Github-Media-Type: github.v3; format=json
< X-Github-Request-Id: F547:1DB246:FFA05B:4209FD9:69D93ADA
< X-Oauth-Client-Id: 178c6fc778ccc68e1d6a
< X-Oauth-Scopes: gist, read:org, repo, workflow, write:packages
< X-Ratelimit-Limit: 5000
< X-Ratelimit-Remaining: 4994
< X-Ratelimit-Reset: 1775847622
< X-Ratelimit-Resource: core
< X-Ratelimit-Used: 6
< X-Xss-Protection: 0
{
"message": "Unexpected property 'est'",
"documentation_url": "https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository",
"status": "422"
}
* Request took 241.450208ms
{
"message": "Unexpected property 'est'",
"documentation_url": "https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository",
"status": "422"
}
gh: Unexpected property 'est' (HTTP 422)
oops
Note that the error message points to https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository if it had pointed to https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization, I might have figured it out. But, probably not. Nothing in that page explains that the two items are remotely related.
Ideally both documents would be updated with prose to explain how the two things are related and including cross links.
Managing custom properties for repositories in your organization does a better job of trying to explain that you need to first define things at the organization level and then set at the repository level. -- I have quibbles with it about terminology, but that's outside the scope of this issue. -- It'd probably be worth linking to the document from both API references.
Code of Conduct
What article on docs.github.com is affected?
https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository
What part(s) of the article would you like to see updated?
Additional information
I created a new repository in an organization and tried to use the sample code -- it failed.
In order to use the sample code, I had to know to go to the organization and define properties to allow values for those properties to be set at the repository level. This is not remotely obvious.
gh: Unexpected property 'est' (HTTP 422) oopsNote that the error message points to https://docs.github.com/rest/repos/custom-properties#create-or-update-custom-property-values-for-a-repository if it had pointed to https://docs.github.com/en/rest/orgs/custom-properties#create-or-update-custom-properties-for-an-organization, I might have figured it out. But, probably not. Nothing in that page explains that the two items are remotely related.
Ideally both documents would be updated with prose to explain how the two things are related and including cross links.
Managing custom properties for repositories in your organization does a better job of trying to explain that you need to first define things at the organization level and then set at the repository level. -- I have quibbles with it about terminology, but that's outside the scope of this issue. -- It'd probably be worth linking to the document from both API references.