def make(error, message=None, response=None):
    """
    Make error or success API response.
    :param error: True if the response format has to be as an error, False otherwise.
    :param message: Error message.
    :param response: Success dictionary response.
    :return: API response.
    """
    response_dict = dict(error=error)
    if error:
        assert type(message) is str
        response_dict['message'] = message
    else:
        assert type(response) is dict
        response_dict['response'] = response
    return response_dict