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

# Check status

> Check whether the user session is running, waiting for input, or idle

## Description

Returns the session status for a `referenceId` on an agent with custom channel enabled.

This endpoint is a **controlled** query: it requires the same HMAC signature as [send interaction](/en/api/custom-channel/send-interaction). Channel `credentials.auth` is **not** required here (it only applies to outbound calls to your webhook).

## Endpoint

```
POST https://chatbot.jelou.ai/v1/custom-channel/{botId}/status
```

## Path parameters

<ParamField path="botId" type="string" required>
  Agent identifier.
</ParamField>

## Body parameters

<ParamField body="referenceId" type="string" required>
  Same user identifier you used when [sending the interaction](/en/api/custom-channel/send-interaction).
</ParamField>

## Authentication / signature

Include the required header:

```
X-Jelou-Signature: sha256=<HMAC_HEX>
```

The signature is computed over the exact **raw body** of the request (HMAC-SHA256). Details in [HMAC signature](/en/api/custom-channel/hmac-signature).

## `status` values

| Value           | Meaning                                   |
| --------------- | ----------------------------------------- |
| `running`       | A flow execution is in progress.          |
| `pending_input` | The agent is waiting for a user reply.    |
| `idle`          | No active execution and no pending input. |

## Request example

```bash cURL theme={null}
curl --request POST \
  --url https://chatbot.jelou.ai/v1/custom-channel/BOT_ID/status \
  --header 'Content-Type: application/json' \
  --header 'X-Jelou-Signature: sha256=HMAC_HEX' \
  --data '{
    "referenceId": "user-123"
  }'
```

## Responses

| Code | Status                | Description                                  |
| ---- | --------------------- | -------------------------------------------- |
| 200  | OK                    | Status returned.                             |
| 400  | Bad Request           | Missing `referenceId`.                       |
| 401  | Unauthorized          | Invalid, missing, or unresolvable signature. |
| 500  | Internal Server Error | Could not read status.                       |

## Response example

```json theme={null}
{
  "status": "pending_input"
}
```
