Skip to main content
POST
/
1
/
configs
curl
curl --request POST \
  --url https://query-suggestions.us.algolia.com/1/configs \
  --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 '{"indexName":"ALGOLIA_INDEX_NAME","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 created, 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.

Body

application/json

Query Suggestions configuration.

indexName
string
required

Name of the Query Suggestions index (case-sensitive).

Example:

"ALGOLIA_INDEX_NAME"

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