Create collection
POST/api/v1/collections
Create a new collection with the given name. The user creating the collection will be the owner of the collection. Additionally, if file IDs are provided in the request, they will be automatically added to the collection. Only file IDs from the creator's existing uploads can be used.
Request
- application/json
Body
name stringrequired
Possible values: non-empty
Collection name
file_ids string[]nullable
Initial set of file IDs to include in the collection
Responses
- 200
- 400
- 401
Successful response
- application/json
- Schema
- Example (from schema)
Schema
result
object
required
Collection details
name stringrequired
Collection name
id stringrequired
Collection ID
created_at stringrequired
Timestamp when the collection is created
{
"result": {
"name": "string",
"id": "string",
"created_at": "string"
}
}
Invalid request
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
message stringrequired
Human readable error message
data nullable
Further details on the error
{
"error": {
"message": "string"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
error
object
required
message stringrequired
Human readable error message
data nullable
Further details on the error
{
"error": {
"message": "string"
}
}
Loading...