Delete a story
DELETE
/api/stories/{storyId}
const url = 'http://localhost:3001/api/stories/example';const options = {method: 'DELETE', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url http://localhost:3001/api/stories/example \ --header 'Authorization: <Authorization>'Delete a story (only the owner can delete their own stories)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”storyId
required
string
Story ID
Responses
Section titled “Responses”OK
Media typeapplication/json
object
message
string
success
boolean
Examplegenerated
{ "message": "example", "success": true}Bad Request
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Unauthorized
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Forbidden
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}