curl --request POST \
--url https://api.caret.so/v1/folders \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Project Alpha",
"ownerUserId": "usr_123456789",
"icon": "📁",
"color": "#4A90E2",
"isPrivate": false
}'
{
"folder": {
"id": "fld_123456789",
"name": "Project Alpha",
"icon": "📁",
"parentFolderId": null,
"createdAt": "2024-01-28T12:00:00Z"
}
}
{
"error": {
"code": "bad_request",
"message": "Name is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "internal_server_error",
"message": "Failed to create folder"
}
}
フォルダ
フォルダ作成
ワークスペースに新しいフォルダを作成します
POST
/
v1
/
folders
curl --request POST \
--url https://api.caret.so/v1/folders \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Project Alpha",
"ownerUserId": "usr_123456789",
"icon": "📁",
"color": "#4A90E2",
"isPrivate": false
}'
{
"folder": {
"id": "fld_123456789",
"name": "Project Alpha",
"icon": "📁",
"parentFolderId": null,
"createdAt": "2024-01-28T12:00:00Z"
}
}
{
"error": {
"code": "bad_request",
"message": "Name is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "internal_server_error",
"message": "Failed to create folder"
}
}
Body
string
必須
フォルダ名
string
必須
フォルダ所有者のユーザーID
string
フォルダアイコン
string
フォルダの色
boolean
フォルダがプライベートかどうか
string
親フォルダID
レスポンス
Folder
curl --request POST \
--url https://api.caret.so/v1/folders \
--header 'Authorization: Bearer <your_api_key>' \
--header 'Content-Type: application/json' \
--data '{
"name": "Project Alpha",
"ownerUserId": "usr_123456789",
"icon": "📁",
"color": "#4A90E2",
"isPrivate": false
}'
{
"folder": {
"id": "fld_123456789",
"name": "Project Alpha",
"icon": "📁",
"parentFolderId": null,
"createdAt": "2024-01-28T12:00:00Z"
}
}
{
"error": {
"code": "bad_request",
"message": "Name is required"
}
}
{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key"
}
}
{
"error": {
"code": "internal_server_error",
"message": "Failed to create folder"
}
}
⌘I