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

# Update Session

> This endpoint updates a session

### Body

<ParamField body="id" type="string">
  This is the ID of the session to be updated.
</ParamField>

### Response

<ResponseField name="success" type="number">
  Indicates whether the call was successful. 1 if successful, 0 if not.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --location --request PUT 'https://api.stateset.com/v1/session' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Token <token>' \
  --data-raw '{
      "id": ""
  }'
  ```

  ```javascript Node.js theme={null}

  const updated = await stateset.session.update({
    id: "",
  });

  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
      "data": {
          "update_session": {
          "returning": [
              {
              "id": "",
              "name": "",
              "uuid": "",
              "user_id": ""
              }
          ]
          }
      }

  }
  ```
</ResponseExample>
