POST /api/v1/collections
createCollection
needs lists:write
curl https://api.acyka.cc/api/v1/collections \
-X POST \
-H "Authorization: Bearer $ACYKA_TOKEN" \
-H "Content-Type: application/json" \
-d '{ }' Asking #
The body
CollectionBody, sent as JSON. Every field it has is under the shapes below.
Answering #
201 Collection
The shapes #
Collection #
A shelf somebody named.
| field | type | what it is |
|---|---|---|
code | string | |
name | string | |
about | string | |
icon | string | |
hue may be absent | number | undefined | |
visibility | string | `public` | `unlisted` | `private` |
shared | boolean | whether anyone who can read it may also add to it |
count | number | |
saves | number | |
owner | string | |
owner_avatar may be absent | string | undefined | |
owner_verified | boolean | |
covers | string[] | |
at | string | |
edited | string |
CollectionBody #
| field | type | what it is |
|---|---|---|
name | string | |
about may be absent | string | undefined | |
icon may be absent | string | undefined | |
hue may be absent | number | undefined | |
visibility may be absent | string | undefined | |
shared may be absent | boolean | undefined |
When it says no #
A refusal is { "message": "errors.something" } — a phrase name and never a
sentence, because one screen can be read in five languages. Every library turns the name into a
type, so you catch the class you can do something about. Errors has
the list.