API version v1.5
Create a new collection on sxcu.net.
Note:If you are creating one time / bot collections you must make them unlisted!
POST /api/
Parameter | Description | Optional | Default |
---|---|---|---|
action | String. Must be set to create_collection |
No | None |
title | String. The title of the collection. | No | None |
private | Boolean. Wether the collection should be private or not. | No | None |
unlisted | Boolean. Wther the collection should be unlisted or not. | No | None |
desc | String. The description of the collection. | Yes | None |
POST | https://sxcu.net/api/ |
$options = [ 'action' => 'create_collection', 'title' => 'sxcu.net API test', 'private' => 'true', 'unlisted' => 'true', 'desc' => 'Test collection created using the API. Note that the description field is optional' ]; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL,"https://sxcu.net/api/"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($options)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $server_output = curl_exec($ch); curl_close ($ch);
{
"collection_id": "00FbPIu",
"collection_token": "dUMbenjLnJdmj9ulWxbn"
}
Parameter | Type | Description |
---|---|---|
collection_id | String | The ID of the new collection |
collection_token | String | If the collection is private, this will be the collection upload token, this is necessary to upload to that collection. |
Rate Limit | None |
Response Format | JSON |
Authentication | None |