Status codes and Meilisearch errors

    Meilisearch uses the following standard HTTP codes for a successful or failed API request:

    Status codeDescription
    200Ok Everything worked as expected.
    201Created The resource has been created (synchronous)
    202Accepted The task has been added to the queue (asynchronous)
    204No Content The resource has been deleted or no content has been returned
    205Reset Content All the resources have been deleted
    400Bad Request The request was unacceptable, often due to missing a required parameter
    401Unauthorized No valid API key provided
    403Forbidden The API key doesn't have the permissions to perform the request
    404Not Found The requested resource doesn't exist


    All detailed task responses contain an error field. When a task fails, it is always accompanied by a JSON-formatted error response. Meilisearch errors can be of one of the following types:

    invalid_requestThis is due to an error in the user input. It is accompanied by the HTTP code 4xx
    internalThis is due to machine or configuration constraints. It is accompanied by the HTTP code 5xx
    authThis type of error is related to authentication and authorization. It is accompanied by the HTTP code 4xx
    systemThis indicates your system has reached or exceeded its limit for disk size, index size, open files, or the database doesn't have read or write access. It is accompanied by the HTTP code 5xx

    Error format

      "message": "Index `movies` not found.",
      "code": "index_not_found",
      "type": "invalid_request",
      "link": ""
    messageHuman-readable description of the error
    codeError code
    typeType of error returned
    linkLink to the relevant section of the documentation

    If you're having trouble understanding an error, take a look at the complete list of code values and descriptions.