Skip to main content
GET
/
devapi
/
poll
/
{poll_id}
/
sessions
Get session metadata from a poll
curl --request GET \
  --url https://main.treble.ai/devapi/poll/{poll_id}/sessions \
  --header 'Authorization: <authorization>'
{
  "results": [
    {
      "id": "dabcf6c0-8150-4231-bafd-a3c331da385f4",
      "created_at": "2022-03-09 17:00:28.956422",
      "finished_at": "2022-03-09 19:08:38.808986",
      "user": {
        "country_code": "+57",
        "cellphone": "987654321"
      }
    },
    {
      "id": "dabcf6c0-8850-4231-bafd-a3c331da385f9",
      "created_at": "2022-03-09 17:11:46.754945",
      "finished_at": "2022-03-09 19:18:41.401605",
      "user": {
        "country_code": "+57",
        "cellphone": "123456789"
      }
    }
  ],
  "next_id": "da848b5f-27e2-49f9-8d31-313b791daf8d"
}

Headers

Authorization
string
required

Authorization API Key. Can be obtained at https://app.treble.ai/en/dashboard/settings/developers

Path Parameters

poll_id
string
required

ID of the poll from which you want to obtain the sessions

Query Parameters

since
integer

Timestamp UNIX UTC for the start date of the range to query

until
integer

Timestamp UNIX UTC for the end date of the range to query

limit
integer

Integer between 1 and 10,000 that indicates the number of sessions to recover

Required range: 1 <= x <= 10000
after
string

Pagination cursor returned in the 'next_id' property of the previous response

Response

List of session metadata obtained correctly

results
object[]

List of session metadata

next_id
string

Cursor to get the next page of results

I