Skip to main content
PUT
/
api
/
password-generator
/
view-all-saved-passwords
/
{pk}
/
update
Update Saved Password
curl --request PUT \
  --url https://api.example.com/api/password-generator/view-all-saved-passwords/{pk}/update/ \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "password_saved": "<string>",
  "url": "<string>",
  "name_pages": "<string>"
}
'
{
  "url": ["Enter a valid URL."],
  "password_saved": ["This field may not be blank."]
}

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.

Updates an existing saved password. Users can only update their own passwords.

Endpoint

PUT /api/password-generator/view-all-saved-passwords/{pk}/update/

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 update.

Request Body

All fields are optional. Only include the fields you want to update (partial update).
password_saved
string
The updated password (max 200 characters).
url
string
The updated URL (max 200 characters).
name_pages
string
The updated friendly name (max 200 characters).

Request Example

{
  "password_saved": "NewSecureP@ss789",
  "name_pages": "Updated Example Website"
}

Response

Success Response

200 OK
"data saved"

Error Responses

{
  "url": ["Enter a valid URL."],
  "password_saved": ["This field may not be blank."]
}
{
  "error": "Password not found."
}
{
  "error": "error message"
}

Authorization

Users can only update passwords they own. The endpoint automatically filters by the authenticated user, ensuring users cannot update other users’ passwords.

Example Request

curl -X PUT https://api.example.com/api/password-generator/view-all-saved-passwords/1/update/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "password_saved": "NewSecureP@ss789",
    "name_pages": "Updated Example Website"
  }'

Implementation Details

This endpoint is implemented in views.py:90 using the update_saved_password view function. It supports partial updates through the partial=True parameter in the serializer, meaning you only need to send the fields you want to update.

Build docs developers (and LLMs) love