Skip to navigation

Update a badge

View as Markdown

Update a directory badge. A new image is given either as base64 in image or as the URL returned by the files upload endpoint in imageUrl. In imageUrl, any other URL is refused, except the badge’s current image URL, which is not a change; a URL in image is ignored. A badge always keeps an image, so neither field can clear it.

Authentication

AuthorizationToken

Your API key, sent as Authorization: Token <your API key>

Path parameters

badgeIdstringRequiredformat: "uuid"
directoryIdstringRequiredformat: "uuid"

Request

This endpoint expects an object.
titlestringOptional1-100 characters
imagestringOptionalformat: "binary"
imageUrlstringOptionalformat: "uri">=1 character

Response

Successful operation
hrefstringRead-only
titlestring<=100 characters
imagestring or null
idstringformat: "uuid"
imageUrlstring or nullOptionalformat: "uri"

Errors

400
Bad Request Error
404
Not Found Error
500
Internal Server Error