Create a new collection on sxcu.net.
Note:If you are creating one time / bot collections you must make them unlisted!

Resource URL

https://sxcu.net/json/api

Parameters

Parameter Type Description Optional Default
action String The action which you want to perform with the API, in this case this should be set to 'create_collection' No None
title String The title of the collection. No None
private Boolean determines wether the collection should be private or not. No None
unlisted Boolean Determines whether the collection should be unlisted or not. No None
desc String The description of the collection. Yes None

Example

POST https://sxcu.net/json/api

Request

$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 not mandatory'
 ];

 $ch = curl_init();
 curl_setopt($ch, CURLOPT_URL,"https://sxcu.net/json/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);

Response

{
  "collection_id": "00FbPIu",
  "collection_token": "dUMbenjLnJdmj9ulWxbn"
}

Response JSON Params

Parameter Type Description
collection_id string The ID of the newly created collection
collection_token string If the collection was marked as private, this wil hold the the collection's upload token.

Resource Information

Rate Limited True
Response Format JSON
Authentication None