Create Collection
POST
/v1/collections
const url = 'https://api.cloud.agentums.ru/v1/collections';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"icon":"","is_hidden":false,"name":"example","parent_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","theme_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.cloud.agentums.ru/v1/collections \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "icon": "", "is_hidden": false, "name": "example", "parent_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "theme_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" }'Создать папку. parent_id вкладывает её в другую, theme_id относит к теме.
is_hidden=true заводит папку сразу в зоне «Скрытые»: её содержимое не попадёт ни в
списки, ни в поиск, ни в ответы, пока зона не разблокирована по PIN.
Authorizations
Заголовок раздела «Authorizations»Request Bodyrequired
Заголовок раздела «Request Bodyrequired»Responses
Заголовок раздела «Responses»Successful Response
Media typeapplication/json
CollectionOut
object
created_at
required
Created At
string format: date-time
has_note
Has Note
boolean
icon
Icon
string
id
required
Id
string format: uuid
is_hidden
Is Hidden
boolean
name
required
Name
string
object_count
Object Count
integer
Example
{ "has_note": false, "icon": "", "is_hidden": false, "object_count": 0}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{ "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ]}