Create a new collection to store texts in.

Request Parameters

nameString (required)

The name for the collection being created. Maximum 100 chars.

languageString (required)

Specify what language the texts that will be stored in the collection are written in. English and Swedish are supported and specified according to ISO 639-1. Swedish = "sv", English = "en".


Provide a description for your new collection. Maximum 250 chars. Tip: Use something that describes what the collection will contain (e.g. Blog posts from my personal blog)

Response Parameters

The id for your created collection.
The name of the collection.

The language allowed for texts stored in the collection. Specified according to ISO 639-1

Description of the collection.

Code Examples


  "method": "collection.create", 
  "params": {
    "name": "My Text Collection", 
    "description": "Collection for english blog posts", 
    "language": "en"
  "id": 0

  "collection_id": 606,
  "description": "Collection for english blog posts",
  "name": "My Text Collection", 
  "language": "en",
  "next_id": 213


// You need to have a ready-to-use client to use the other methods
SaploClient client = new SaploClient("YOUR_API_KEY", "YOUR_SECRET_KEY");

// Create a SaploCollectionManager to work with collections
SaploCollectionManager collectionMgr = new SaploCollectionManager(client);

// Create a Collection object
SaploCollection collection = new SaploCollection("COLLECTION_NAME", Language.en);

// Save/create your collection on the Saplo-API

// Your collection gets a generated ID number from the API
System.out.println("This is the ID of my collection: " + collection.getId());


$client = new SaploAPI("YOUR API KEY", "YOUR SECRET KEY");

//Set parameters
$params = array(
    "name" => "My Collection",
    "description" => "This is my first collection for english texts.",
    "language" => "en"

//Run method
try {
    $result = $client->collection->create($params);
} catch(SaploException $e) {
    echo '(' . $e->getCode() . ') ' . $e->getMessage();

//Print result


client = SaploJSONClient("YOUR API KEY", "YOUR SECRET KEY")

collection_id = client.collection.create(
    name = "My Collection",
    description = "This is my first collection for english texts.",
    language = "en"

print "New collection created with Id:", collection_id


curl -d '{"method":"collection.create", "params":{"name":"Example Collection", "language":"en"}, "id":0}' ''

Matlab = 'My First Collection';
params.language = 'en';

response = saploRequest('collection.create', params);

sprintf('Collection id %s \n', response.collection_id);


A collection is a container to store texts in. A collection can only contain texts with the same language (e.g. only english texts in the collection).