Add api for Messages.