Skip to main content
DELETE
/
api
/
password-generator
/
view-all-saved-passwords
/
{pk}
/
delete
Delete Saved Password
curl --request DELETE \
  --url https://api.example.com/api/password-generator/view-all-saved-passwords/{pk}/delete/ \
  --header 'Authorization: <authorization>'
{
  "error": "Password not found."
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/edimez14/password_generator/llms.txt

Use this file to discover all available pages before exploring further.

Deletes a saved password. Users can only delete their own passwords.

Endpoint

DELETE /api/password-generator/view-all-saved-passwords/{pk}/delete/

Authentication

Authorization
string
required
Bearer token for authentication. User must be logged in.

Path Parameters

pk
integer
required
The unique identifier (primary key) of the saved password to delete.

Request

This endpoint does not require a request body.

Response

Success Response

204 No Content
{
  "message": "Password deleted successfully"
}

Error Responses

{
  "error": "Password not found."
}
{
  "error": "error message"
}

Authorization

Users can only delete passwords they own. The endpoint automatically filters by the authenticated user, ensuring users cannot delete other users’ passwords. If a user attempts to delete a password that:
  • Does not exist, or
  • Belongs to another user
The endpoint will return a 404 Not Found error.

Example Request

curl -X DELETE https://api.example.com/api/password-generator/view-all-saved-passwords/1/delete/ \
  -H "Authorization: Bearer YOUR_TOKEN"

Implementation Details

This endpoint is implemented in views.py:108 using the delete_saved_password view function. It retrieves the password instance filtered by both the primary key and the authenticated user, then deletes it from the database.

Build docs developers (and LLMs) love