Remove Schema API (Detach from the Collection)

Using the Remove Schema API, You could detach the Schema API from a specific Collection.

Note that once the Schema is detached from the Collection, any recorded created already or thereafter will not be validated again unless a Schema is added.




Request Type


Request Headers

Below are the list of Accepted Request Headers if you are trying to Detach Schema Doc from a Collection.

Request Header Value Required
X-Master-Key <API_KEY> Yes
X-Master-Key Required

X-Master-Key is nothing but your Core API Access Key. You will need this Key to access mostly any API end-point on JSONBin. You could find the key on the API Keys page.

Code Samples

  • cURL
  • JavaScript (ES6)
  • Python 3
  • Ruby
curl -v\
  -H "X-Master-key: <YOUR_API_KEY>" \
  --request PUT \<COLLECTION_ID>/schemadoc/remove
let req = new XMLHttpRequest();

req.onreadystatechange = () => {
  if (req.readyState == XMLHttpRequest.DONE) {
};"PUT", "<COLLECTION_ID>/schemadoc/remove", true);
req.setRequestHeader("X-Master-Key", "<YOUR_API_KEY>");
import requests
url = '<COLLECTION_ID>/schemadoc/remove'
headers = {
  'X-Master-Key': '<YOUR_API_KEY>'
data = {}

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

uri = URI("<COLLECTION_ID>/schemadoc/remove")
res = Net::HTTP.start(, uri.port, use_ssl: true) do |http|
  req =
  req['X-Master-Key'] = '<YOUR_API_KEY>'

puts res.body

Request Response

Success Status Code: 200
  "collectionName": "<COLLECTION_NAME>",
  "schemaDocId": "<DETACHED_SCHEMA_DOC_ID>",
  "metadata": {
     "id": "<COLLECTION_ID>",
     "createdAt": "<DATE/TIME>"
Error Status Code: 400, 401, 403, 404
  "message": "<Error Message>"

For more information on the error codes & errors you might possibly encounter, refer to the below section.

Error Reference

  • 400 Bad Request
  • 401 Unauthorized
  • 403 Forbidden
  • 404 Not Found
Invalid Collection Id provided

You'll encounter this error when you've passed incorrect Collection Id in the URL. Verify your Collection Id.

You need to pass X-Master-Key in the header

You'll encounter this error if you are not passing the X-Master-Key header which is required to authenticate your request while creating bins. In-order to fix this, pass the X-Master-Key header with a value of the API Key which you can find on the API Keys page.

Invalid X-Master-Key provided

You could encounter this error if the X-Master-Key you've passed is invalid. Pass a valid API Key and then try again again

Requests exhausted. Buy additional requests at

You'll encounter this error if you've consumed all the available requests. You can purchase additional requests.

Collection not found

Check if the Id is valid and belongs to your account. You'll encounter this error if the Collection you requested to remove the Schema Validation doc of does not exists.

Create a Free Account

Create an Account View Pricing