Logo
Hack Back Better Demo API Documentation

Add a book

POST {{baseUrl}}/books

Note: User-added books are automatically deleted about 3 days after being added.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
Content-Type
string
Accept
string




RESPONSES

status Created

{ "id": "6d63c5b9-74ed-40ff-9415-81589189f690", "title": "The Four Agreements", "author": "don Miguel Ruiz", "genre": "self-help", "yearPublished": 1997, "checkedOut": false, "isPermanentCollection": false, "createdAt": "2022-03-17T16:09:41.950Z" }



Curl
curl -X POST 'https://library-api.postmanlabs.com/books' -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{"title":"The Very Busy Spider","author":"Eric Carle","genre":"fiction","yearPublished":1984}'

ENDPOINTS