Update a search query hook

Updates an existing search query hook.

Requires authentication.

Request

PUT /search-query-hook/{id}

Path Parameters

ParameterTypeRequiredDescription
idintegerYesThe ID of the search query hook to update.

Headers

HeaderValue
AuthorizationBearer <token>
Content-Typeapplication/json

Request Body

FieldTypeRequiredDescription
typestringNoWhen the hook executes: pre-search, post-search, or modify-result.
targetstringNoWhere the hook applies: search or recommendation.
urlstringNoUpdated webhook URL.
priorityintegerNoUpdated execution priority.

Example Request

{
  "url": "https://my-service.example.com/hooks/search-v2",
  "priority": 20
}

Response

Returns the updated search query hook object.

Example Response

{
  "id": 3,
  "type": "post-search",
  "target": "search",
  "url": "https://my-service.example.com/hooks/search-v2",
  "priority": 20
}
Path Params
integer
required
Body Params
integer

The priority of the hook, if we have multiple hooks of a same type, the one with higher priority will be executed first

string
enum

The type of the webhook, it will determine when the hook is executed

Allowed:
string
enum

The target of the webhook, it will determine where the hook is executed

Allowed:
string

The url of the webhook, where the result of search/recommendation is modified

Headers
string
required

Makaira Instance ID

Response
200

Updated

Language
Credentials
Bearer
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here!