View a story
POST
/api/stories/{storyId}/view
const url = 'http://localhost:3001/api/stories/example/view';const options = {method: 'POST', 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 POST \ --url http://localhost:3001/api/stories/example/view \ --header 'Authorization: <Authorization>'Record that the authenticated user viewed a story (notifies story owner)
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}Not Found
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}Internal Server Error
Media typeapplication/json
object
error
string
success
boolean
Examplegenerated
{ "error": "example", "success": true}