# Remove Item

# Deleting a Specific Item

The designated endpoint is intended for deleting specific items from the database, providing a powerful tool for platform owners and administrators to maintain the integrity and relevance of their platform's content. This endpoint enables authorized users to remove items that are no longer relevant, outdated, or inappropriate, ensuring that their platform's content remains current and high-quality.

To use this endpoint, users can send a DELETE request with the item's unique identifier, which the API will then verify and delete from the platform's database. The endpoint is designed to be highly secure, requiring appropriate authorization and authentication to ensure that only authorized users have the ability to delete items from the database.

#

# Request

  • HTTP Method: DELETE
  • accept : application/json
  • Content Type : application/json
  • Authorization : bearer userjwt
  • URL: https://comments-api-production.up.railway.app/items/delete-item/{itemid}

# Params Parameters

Property Type Required Description
itemId number true This is the id of the item

# Request example

curl -X DELETE \ 
 'https://comments-api-production.up.railway.app/items/delete-item/{itemId}' \ 
-H 'accept : application/json' \ 
-H 'Content-Type : application/json' \ 
-H 'Authorization : bearer userjwt' \ 

# Expected Responses:

# Item Deleted

You have successfully deleted the item

{ 
"statusCode":200, 
"responseValue":{ 
"message":"Deleted Successfully"} 
} 
 

# Other Responses:

# Unauthorised Access

this jwt is invalid

{ 
"statusCode":401, 
"message":"Unauthorized"} 
 

# Missing Item

This Item cannot be found

{ 
"statusCode":404, 
"message":["This resource cannot be found"], 
"error":"Not found"} 
 

# Unauthorised User

this email is not associated with this account

{ 
"statusCode":401, 
"message":["Your email is not associated with this resource"], 
"error":"Unauthorized"} 
 

# Playground

Method: DELETE

URL: https://comments-api-production.up.railway.app/items/delete-item/{itemId}

Headers:

KeyValue
accept
Content-Type
Authorization