Using the COLLECTIONS CREATE API, you can CREATE Collections to group the records which later, can be fetched usin the Query Builder.

Request Type
Request Headers
Header Value Required
Content-Type application/json Yes
secret-key <YOUR_SECRET_KEY> Yes

Content-Type needs to be set to application/json. The request will result in an error in-case of a missing Content-Type header.


secret-key is required to Create a Collection. You can find your secret-key on the API Keys page after signing-in.

Basic Code Samples
curl --header "Content-Type: application/json" \
       --request POST \
       --data '{"name": "Sample Collection"}' \
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
};"POST", "", true);
req.setRequestHeader("Content-Type", "application/json");
req.send('{"name": "Sample Collection"}');
import requests
url = ''
headers = {'Content-Type': 'application/json'}
data = {"name": "Sample Collection"}

req =, json=data, headers=headers)
require 'net/http'
require 'json'

uri = URI("")
res = Net::HTTP.start(, uri.port, use_ssl: true) do |http|
  req =
  req['Content-Type'] = 'application/json'

  req.body = {"name": "Sample Collection"}.to_json

puts res.body
Request Response
  "success": true,
  "data": {
    "name": "Sample Collection"
401 / 422
  "message": "<ERROR_MESSAGE>",
  "success": false
Status Code Error Message
422 Unprocessible Entity
Expected content type - application/json

Fix: You need to pass Content-Type: application/json in the headers.

422 Unprocessible Entity
Name key cannot be blank.

Fix: Ensure that you provide some name to the collection.

422 Unprocessible Entity
Collection Name length should be more than 2 characters and less than 33 characters

Fix: Error message says it all :)

422 Unprocessible Entity
You need to provide a name.

Fix: You need to pass name key in the JSON Body of the Request with a Valid Name.

401 Unauthorized
Invalid secret key provided.

Fix: If you are trying to Create a Collection, ensure that the secret-key you are passing in the header is correct.

401 Unauthorized
Need to provide a secret-key to CREATE a Collection.

Fix: While Creating a Collection, you need to pass secret-key header to Create the Collection.