Create a new file with given URI and props. If ancestor folders does not existed for given uri
, they will be created automatically.
Request
Add the parameter Authorization
to Headers,whose value is to concatenate the Token after the Bearer. Example:Authorization: Bearer ********************
Body Params application/json
{
"type": "file",
"uri": "cloudreve://my/Inspirations/new.txt",
"err_on_conflict": true
}
Request Code Samples
curl --location --request POST '/file/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "file",
"uri": "cloudreve://my/Inspirations/new.txt",
"err_on_conflict": true
}'
Responses
application/json {
"code": 0,
"data": {
"type": 1,
"id": "d08Wy1Hx",
"name": "Q3",
"permission": null,
"created_at": "2025-05-24T14:24:27+08:00",
"updated_at": "2025-05-24T14:24:27+08:00",
"size": 0,
"metadata": null,
"path": "cloudreve://my/Inspirations/Q3",
"capability": "39/9",
"owned": true,
"primary_entity": "zOie"
},
"msg": ""
}
Modified at 2025-08-12 07:15:19