API Reference
CORS Enabled
Request A JSON
GET /b/:id
Add /pretty (Optional parameter) for pretty JSON response
GET /b/:id/pretty
On Success (Server Response)
STATUS
200 OK
On Error (Server Response)
STATUS
422 Unprocessable Entity | 404 Not Found
DATA
success: false, (Invalid bin ID | Bin not found)
Example (jQuery)
$.get('//jsonbin.io/b/591a01528c8d6246313db019', function(data) {
//use the data here
console.log(data); //returns json object
});
Demo Fiddle
Create A JSON
POST (RAW) /b/new
ON SUCCESS (SERVER RESPONSE)
STATUS
200 OK
DATA
success: true, data: {STRINGIFIED_JSON}, id: SNIPPET_ID
On Error (Server Response)
STATUS
422 Unprocessable Entity
DATA
success: false, (Snippet (parameter is missing | cannot be blank, invalid json, please try again))
Example (Raw - Type JSON)
{
"snippet": "{\"name\": \"John Doe\"}" //Stringified JSON
}