Skip to content

Update a collection

patch/api/collection/:id
Update a collection for the logged-in user.

Request

Security: Bearer Auth
Provide your bearer token in the Authorization header when making requests to protected resources.Example: Authorization: Bearer <token>

Body application/json

namestring
required
Name of the collection.
iconstring
required
Icon of the collection.

Response

Schema: application/json
codestring
dataundefined
messagestring

Body application/json

json
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
// SUCCESS

{
  "code": "0",
  "message": "Ok"
}
json
// COLLECTION_NOT_FOUND

{
  "code": "301",
  "message": "Collection not found"
}
// COLLECTION_NOT_FOUND

{
  "code": "301",
  "message": "Collection not found"
}
json
// COLLECTION_ALREADY_EXISTS

{
  "code": "302",
  "message": "Collection already exists"
}
// COLLECTION_ALREADY_EXISTS

{
  "code": "302",
  "message": "Collection already exists"
}
json
// COLLECTION_UPDATE_FAILED

{
  "code": "304",
  "message": "Collection update failed"
}
// COLLECTION_UPDATE_FAILED

{
  "code": "304",
  "message": "Collection update failed"
}