PUT /update-link/:id
Updates the expiration time and/or maximum view count for an existing viewer link.Authentication
Requires JWT authentication token in the Authorization header.Path Parameters
The unique identifier of the viewer link to update
Request Body
Number of days from now until the link should expire. If greater than 0, sets a new expiration date.
New maximum number of views allowed. If greater than 0, updates the view limit.
Response
Confirmation message indicating successful update
Example Request
Example Response
Status Codes
200 OK- Viewer link successfully updated400 Bad Request- Invalid ID format or invalid JSON payload401 Unauthorized- Missing or invalid authentication token404 Not Found- Viewer link with specified ID not found500 Internal Server Error- Failed to update link in database
Notes
- Only fields with values greater than 0 will be updated
- If
expires_in_daysis 0 or negative, the expiration date is not modified - If
max_viewsis 0 or negative, the max views setting is not modified - The new expiration time is calculated from the current time, not from the original creation date
- The current view count is not affected by this update
- You can update one or both fields in a single request