I am sorry for late reply. Can you try that the state machine works with the very same data structure you use for the API page using another method? E.g. saving data through a screen or a sequential workflow.
Does the entity has AllFields set to True? This is always recommended for saving data with an active state machine.
Is the state machine event dependency set correctly? No dependency (all changes) or correct dependency?