album.create
bearer
Create a folder
Creates a private, non-default folder. is_default and visibility are server-set.
Parameters
Passed by name in the params object.
| Name | Type | Required | Description |
|---|---|---|---|
name |
string | yes | Folder name (1-200 chars) |
description |
string | no | Optional description |
Result
Returns albumDTO:
| Field | Type | Description |
|---|---|---|
created_at * |
string | |
description * |
string | |
id * |
string | |
image_count * |
integer | |
is_default * |
boolean | |
name * |
string | |
visibility * |
string |
Example
Request:
{
"jsonrpc": "2.0",
"id": 1,
"method": "album.create",
"params": {
"name": "Iceland 2024",
"description": "Ring road, March."
}
}
Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"id": "018f3a80-1c2d-7e00-9a00-0b1c2d3e4f50",
"name": "Iceland 2024",
"description": "Ring road, March.",
"is_default": false,
"visibility": "private",
"image_count": 42,
"created_at": "2026-02-11T07:03:00Z"
}
}
curl
curl -s https://peinture.gumeniuk.com/rpc \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"album.create","params":{"name":"Iceland 2024","description":"Ring road, March."}}'
JavaScript
const res = await fetch("https://peinture.gumeniuk.com/rpc", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": `Bearer ${token}`,
},
body: JSON.stringify({
jsonrpc: "2.0", id: 1, method: "album.create", params: {"name":"Iceland 2024","description":"Ring road, March."},
}),
});
const { result, error } = await res.json();
Go
body := []byte(`{"jsonrpc":"2.0","id":1,"method":"album.create","params":{"name":"Iceland 2024","description":"Ring road, March."}}`)
req, _ := http.NewRequest("POST", "https://peinture.gumeniuk.com/rpc", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("Authorization", "Bearer "+token)
resp, err := http.DefaultClient.Do(req)