Remove a badge from a user
DELETE
/admin/users/{username}/badges
const url = 'https://gitea.com/api/v1/admin/users/example/badges';const options = { method: 'DELETE', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"badge_slugs":["badge1","badge2"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://gitea.com/api/v1/admin/users/example/badges \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "badge_slugs": [ "badge1", "badge2" ] }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”username
required
string
Username of the user whose badge is to be deleted
Request Body
Section titled “Request Body”Media typeapplication/json
UserBadgeOption options for link between users and badges
object
badge_slugs
Array<string>
Example
[ "badge1", "badge2"]Responses
Section titled “Responses”APIEmpty is an empty response
APIForbiddenError is a forbidden error response
Headers
Section titled “Headers”message
string
url
string
APIValidationError is error format response related to input validation
Headers
Section titled “Headers”message
string
url
string