Create a new note
POST
/info/notes
const url = 'https://sylve.lan:8181/api/info/notes';const options = { method: 'POST', headers: {Authorization: '<Authorization>', 'Content-Type': 'application/json'}, body: '{"content":"example","title":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://sylve.lan:8181/api/info/notes \ --header 'Authorization: <Authorization>' \ --header 'Content-Type: application/json' \ --data '{ "content": "example", "title": "example" }'Add a new note to the database
Authorizations
Section titled “Authorizations”Request Body
Section titled “Request Body”Note
Media typeapplication/json
object
content
required
string
title
required
string
Examplegenerated
{ "content": "example", "title": "example"}Responses
Section titled “Responses”Created
Media typeapplication/json
object
data
object
content
string
createdAt
string
id
integer
title
string
updatedAt
string
error
string
message
string
status
string
Examplegenerated
{ "data": { "content": "example", "createdAt": "example", "id": 1, "title": "example", "updatedAt": "example" }, "error": "example", "message": "example", "status": "example"}Bad Request
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}Internal Server Error
Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{ "data": "example", "error": "example", "message": "example", "status": "example"}