> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-StateMachine API Reference

State machine management feature




Manages state machines on the server side and provides a mechanism to transition states by event passing from the game.

The state machine definition uses its own GSL (GS2 Statement Language).
For the notation of GSL, please check the separate document.

State machines are versioned and will work with the state machine definition used at startup even if the state machine definition is updated.
This allows you to change the state machine definition without affecting the running state machine.
If you want to make changes to the state machine that would break compatibility, use the mechanism to delete the state machine that was started with a version below the specified version in the Namespace settings.
However, only the state machine is versioned by this mechanism, and the GS2-Script referenced by the state machine is not versioned.

The state machine that started can be set with an expiration time in minutes.
State machines with an expiration time set will be automatically deleted when the expiration time expires.

[Introduction to Microservices / GS2-StateMachine](../../microservices/state_machine)



- [GS2 States Language Format](/api_reference/state_machine/format/)
  
- [GS2-StateMachine Deploy/CDK Reference](/api_reference/state_machine/deploy/)
  
- [GS2-StateMachine Script Trigger Reference](/api_reference/state_machine/script/)
  
- [GS2-StateMachine SDK API Reference](/api_reference/state_machine/sdk/)
  
- [GS2-StateMachine SDK for Game Engine API Reference](/api_reference/state_machine/game_engine/)
  
- [GS2-StateMachine Transaction Actions](/api_reference/state_machine/stamp_sheet/)
  
