added plugin model to api and changed message api