> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get current state

## Overview

Gets the current state of a state machine, associated with a token.

## HTTP request

`POST /Agent/StateMachines/GetCurrentState`

## Authentication

Requires a valid JWT bearer token.

## Request (JSON)

```json theme={null}
{
	"tokenId":Required(Str(PTokenId))
}
```

## Input parameters

| Parameter | Description                                |
| --------- | ------------------------------------------ |
| PTokenId  | ID of token associated with state machine. |

## Response (JSON)

```json theme={null}
{
	"CurrentState":Required(PCurrentState)
}
```

## Response parameters

| Parameter     | Description                                               |
| ------------- | --------------------------------------------------------- |
| PCurrentState | Current state of state machine, if found, and authorized. |

## Notes

This endpoint uses the request schema notation described in [Pattern matching](/neuron-api/pattern-matching).
