Skip to main content
PUT
/
1
/
configs
/
{indexName}
curl
curl --request PUT \
  --url https://query-suggestions.us.algolia.com/1/configs/ALGOLIA_INDEX_NAME \
  --header 'accept: application/json' \
  --header 'content-type: application/json' \
  --header 'x-algolia-api-key: ALGOLIA_API_KEY' \
  --header 'x-algolia-application-id: ALGOLIA_APPLICATION_ID' \
  --data '{"sourceIndices":[{"indexName":"products","replicas":false,"analyticsTags":["lorem"],"facets":[{"attribute":"category","amount":3},{"attribute":"brand","amount":2}],"minHits":5,"minLetters":4,"generate":[["color","brand"]],"external":["lorem"]}],"languages":["lorem"],"exclude":["lorem"],"enablePersonalization":false,"allowSpecialCharacters":false}'
{
"status": 200,
"message": "Configuration was updated, and a new indexing job has been scheduled."
}
Required ACL: editSettings

Authorizations

x-algolia-application-id
string
header
required

Your Algolia application ID.

x-algolia-api-key
string
header
required

Your Algolia API key with the necessary permissions to make the request. Permissions are controlled through access control lists (ACL) and access restrictions. The required ACL to make a request is listed in each endpoint's reference.

Path Parameters

indexName
string
required

Query Suggestions index name.

Example:

"ALGOLIA_INDEX_NAME"

Body

application/json

Query Suggestions configuration.

sourceIndices
object[]
required

Algolia indices from which to get the popular searches for query suggestions.

Minimum length: 1
languages

Languages for deduplicating singular and plural suggestions. If specified, only the more popular form is included.

Languages for which to deduplicate singular and plural forms.

Two-letter country code.

exclude
string[] | null

Words or regular expressions to exclude from the suggestions.

enablePersonalization
boolean
default:false

Whether to turn on personalized query suggestions.

allowSpecialCharacters
boolean
default:false

Whether to include suggestions with special characters.

Response

OK

status
integer

HTTP status code.

message
string

Details about the response, such as error messages.

I