Skip to content

Create a new collection

post/api/collection
Create 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_ALREADY_EXISTS

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

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

{
  "code": "303",
  "message": "Collection create failed"
}
// COLLECTION_CREATE_FAILED

{
  "code": "303",
  "message": "Collection create failed"
}