You can Create Private & Public bins using the Create API. By passing optional headers, you can also Create these bins inside a Collection.

Request Type
Request Headers
Header Value Required
Content-Type application/json Yes
X-Master-Key <YOUR_API_KEY> Yes
X-Bin-Private false No
X-Bin-Name <BIN_NAME> No
X-Collection-Id <COLLECTION_ID> No

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


X-Master-Key needs to be passed in-order to Create a bin. In-order to get the key, you need to sign-up and navigate to API Keys page.


By default, bins are created as a Private record. In-order to set the bin as Public, you need to pass the above header with a value of false. These bins can be then Read without passing a X-Master-Key


Creating a bin will generate a Random ID and the same will be shown on the Dashboard. Now this is not that helpful, so to make it easier to recognize your bins, you can name them by passing the above header. You can set a max of 128 character name for your Bin.


Collections are great way to maintain a group of bins, else they stay unsorted. In-order to create a bin under a collection, you need to pass the above header and set the Collection Id as the value in which you would like to create that bin.

Basic Code Samples
curl -v\
  -H "Content-Type: application/json" \
  -H "X-Master-key: <YOUR_API_KEY>" \
  --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.setRequestHeader("X-Master-Key", "<YOUR_API_KEY>");
req.send('{"sample": "Hello World"}');
import requests
url = ''
headers = {
  'Content-Type': 'application/json',
  'X-Master-Key': '<YOUR_API_KEY>'
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['X-Master-Key'] = '<YOUR_API_KEY>'

  req.body = {"sample": "Hello World"}.to_json

puts res.body
Request Response
  "record": {
    "sample": "Hello World"
  "metadata": {
    "id": "<BIN_ID>",
    "createdAt": "<DATE/TIME>",
    "private": <true/false>
400, 401, 403
  "message": "<ERROR_MESSAGE>"
Status Code Error Message
400 Bad Request
You need to pass Content-Type set to application/json
401 Unauthorized
You need to pass X-Master-Key in the header
400 Bad Request
Bin cannot be blank
400 Bad Request
X-Bin-Name cannot be blank or over 128 characters
400 Bad Request
Invalid X-Collection-Id provided
403 Forbidden
Free users cannot create a record over 500kb. Upgrade to Pro plan to create records upto 1mb
403 Forbidden
Requests exhausted. Buy additional requests at
400 Bad Request
Collection not found or the Collection does not belong to the X-Master-Key provided
400 Bad Request
Schema Doc Validation Mismatch: key:val
404 Not Found
Bin not found or it doesn't belong to your account