Explicitly return HTTP response code when calling api/dialogues