Reset Password
Check your e-mail for further instructions.
Reset
Name
collection_create
Auth
yes
Description
Create a new collection for the current user.
Optionally, files could be given for the collection to fill it.
URL
https://api.pcloud.com/collection_create
Required
Parameter | Description |
name | int the name of the new collection. |
Optional
Parameter | Description |
type | int type of the collection. |
fileids | string comma-separated list of files to fill the collection. |
Output
On success returns the new collection and the metadata of the items in the field contents, if such were given.
Also field linkresult will be added, if there were files to fill the collection. For its structure look at collection_linkfiles. If the linking was unsuccessful, then this field will be false.
Example
{ "result": 0, "collection": [ { "name": "my music", "id": 40, "ismine": true, "items": 8, "system": false, "type": "audio", "created": "Thu, 13 Feb 2014 12:34:22 +0000", "modified": "Mon, 17 Feb 2014 11:25:55 +0000", "contents": [ ] } ] }
Code | Description |
1000 | Log in required. |
1039 | Please provide 'name'. |
1058 | Please provide valid collection 'type'. |
2000 | Log in failed. |
2073 | The name for the collection is already used. |
4000 | Too many login tries from this IP address. |
5000 | Internal error. Try again later. |