> ## 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.

# List Sessions

> This endpoint gets a sessions.

### Body

### Response

<ResponseField name="id" type="string">
  This is the id of the session
</ResponseField>

<ResponseField name="name" type="string">
  This is the name of the session
</ResponseField>

<ResponseField name="uuid" type="string">
  This is the uuid of the session
</ResponseField>

<ResponseField name="user_id" type="string">
  This is the user\_id of the session
</ResponseField>

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

  ```graphQL GraphQL theme={null}

  query MySession {
    session {
      id
      created_at
      name
      system_prompt
      user_id 
    }
  }


  ```

  ```js Node.js theme={null}
  const sessions = await stateset.sessions.retrieve({
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  });
  ```

  ```py Python theme={null}
  sessions = stateset.sessions.retrieve({
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  })
  ```

  ```go Golang  theme={null}
  sessions, err := stateset.Sessions.Retrieve(
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  )
  ```

  ```ruby Ruby theme={null}
  sessions = Stateset::Sessions.retrieve(
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  )
  ```

  ```java Java theme={null}
  Session session = Stateset.Sessions.retrieve(
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```csharp C# theme={null}
  Session session = Stateset.Sessions.Retrieve(
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```php PHP theme={null}
  $sessions = Stateset\Sessions::retrieve(
    'ct_1NXWPnCo6bFb1KQto6C8OWvE'
  );
  ```

  ```http HTTP theme={null}
  GET /v1/sessions HTTP/1.1
  Host: api.stateset.com
  Content-Type: application/json
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}

  {
      "data": {
          "message": {
              "id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
              "created_at": "2021-01-01T00:00:00.000000Z",
              "name": "My Session",
              "system_prompt": "You are a helpful assistant.",
              "user_id": "rt_1NXWPnCo6bFb1KQto6C8OWvE",
          }
      }
  }


  ```
</ResponseExample>
