create api that can change state message