Sample - GitHub REST API
PUT/orgs/{org}/blocks/{username}

Block a user from an organization

Blocks the given user on behalf of the specified organization and returns a 204. If the organization cannot block the given user a 422 is returned.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters
orgstringrequired
The organization name. The name is not case sensitive.
usernamestringrequired
The handle for the GitHub user account.

2 status codes
204Response
422Validation failed, or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 422 is returned: Validation failed, or the endpoint has been spammed.