Using the CREATE API, you can Create Public and Private bins.

Request Type
Request Headers
Header Value Required
Content-Type application/json Yes
secret-key <YOUR_SECRET_KEY> Optional
collection-id <YOUR_COLLECTION_ID> Optional
private false Optional
name YOUR_BIN_NAME Optional

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 an optional header. It is required when you need to Create a Public or a Private record. You can find your secret-key on the API Keys page after signing-in.

In-order to Create a Public record via API and listing it on your Dashboard, you need to pass secret-key along with private: false This will list the Public bin you created on your user Dashboard.


In-order to add a bin to a specific collection instead of the unsorted category which is the default, you need to pass the collection-id in the header. You can Create a Collection on the Collections page after signing-in. For more info on Creating Collections, please refer to our Create Collections API for more info.


By default, if you pass the secret-key in the header, it will Create a Public record. In-order to Create a Public record but also list the record you created on your dashboard, you need to pass
private: false header along with the secret-key header.


In-order to set a name for the Bin, you can pass this header with a name for the bin. There are no restrictions to set the name except for the length which is limited to 128 characters.


A bin created without passing a secret-key in the header will be a public bin.


You cannot set a Bin name for Public bins created without secret-key header. Also, Bin names cannot be Updated as of now.


Public bins created without secret-key cannot be deleted.


A bin created passing a secret-key header will be Private by default. In-order to mark the Bin as Public, you need to pass private: false flag.

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

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

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 = {"Sample": "Hello World"}.to_json

puts res.body
Request Response
    "Sample":"Hello World"
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
JSON cannot be empty

Fix: You cannot store an empty JSON record, hence, you need to pass some data to store it.

422 Unprocessible Entity
Invalid Collection ID

Fix: If you are trying to pass collection-id in the header, make sure the ID you are passing is correct.

401 Unauthorized
Invalid secret key provided.

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

422 Unprocessible Entity
Bin Name cannot be longer than 128 characters.

Fix: Do not use more than 128 characters for your bin name.

422 Unprocessible Entity
Bin Name cannot be empty.

Fix: Do not pass the name header empty.