Unpin a saved search and return the exact previous Files Version for Undo.
const url = 'https://example.com/api/v1/search/saved/example/unpin';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/search/saved/example/unpin \ --header 'Authorization: Bearer <token>'Route: /api/v1/search/saved/{id}/unpin. Inputs: id. Do not automatically replay this operation after an uncertain result.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Saved search id
Responses
Section titled “Responses”The unpinned search and its checked previous version
Exact file version and digest for an Unpin Undo. Hashes fence any later edit.
object
A saved search: a named query that works like a smart folder (DESIGN §32
S10). It is user data, stored as one JSON file per search in
<home>/.calternal/saved-searches/<id>.json.
object
Creation time (RFC 3339, UTC).
Stable identifier (a lowercase UUID). Links use it, so a rename never breaks them.
Display name chosen by the user.
True when the search shows in the sidebar.
The raw query, operators included, exactly as the search field shows it.
Last change time (RFC 3339, UTC).
Examplegenerated
{ "expected_hash": "example", "saved_search": { "created": "example", "id": "example", "name": "example", "pinned": true, "query": "example", "updated": "example" }, "version_name": "example"}No such saved search
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}The search changed before it could be unpinned
The standard API error response: { "error": { ... } }.
object
Example
{ "error": { "code": "bad_request" }}