API ReferenceCollections
POST /collections/
Criar coleção
POST
/collections/Auth: accessTokenCria nova coleção. Tipo é imutável após criação. fieldDefinitionIds opcional para popular schema dinâmico inicial.
Request
| Campo | Tipo | Requerido | Descrição |
|---|---|---|---|
| name | string | sim | |
| description | string | não | |
| type | "games" | "books" | "cardgames" | "boardgames" | "custom" | sim | |
| visibility | "public" | "private" | "friends_only" | não | |
| autoShareToFeed | boolean | não | |
| fieldDefinitionIds | Array of string (uuid) | não |
Response
200
Sem corpo na resposta.
Erros
Sem respostas de erro documentadas.
Exemplos
curl -X POST 'http://localhost:3003/collections/' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer SEU_ACCESS_TOKEN' \
-d '{}'await fetch('http://localhost:3003/collections/', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer ' + accessToken,
},
body: JSON.stringify({}),
})