POST

Add Recent Search


Developer Preview

This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.

Adds a term to the top of the calling user's recent searches on this site.

An earlier copy of the same term, in any letter case, is removed, and only the newest 10 terms are kept. Call this once the user settles on a term, not on every keystroke.

When the user edits a term you added earlier in the same session, pass the earlier one in replacedSearchTerm so the list doesn't keep both. Don't pass a term that was already in the list when the session started, or an older search the user made is removed.

An invalid term is rejected. Saving a valid one is best effort: if it can't be stored, the call still succeeds, so a successful call doesn't confirm the term was kept. Two calls close together may keep only the later term, so wait for one call to finish before sending the next.

To retrieve the list, call Get Recent Searches.

Permission Scopes
SCOPE.BACK_OFFICE.SEARCH
Learn more about app permissions.
Endpoint
POST
https://www.wixapis.com/back-office-search/v1/recent-searches

Errors

This method doesn't return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?