API referenceSessions
List sessions
Authorization
AuthorizationRequiredBearer <token>Send your API key in the Authorization header on every request:
Authorization: Bearer sk_live_.... Keys are created in the admin UI under
Settings → API Keys and are project-scoped.
In: header
Query Parameters
limitintegerMaximum number of items to return per page. Clamped to [1, 100].
Default:
20Minimum: 1Maximum: 100starting_afterstringCursor for pagination. Pass the id of the last item from the previous page.
Omit on the first page. See Pagination.
customer_phonestringFilter to sessions with this caller phone (E.164).
channelstringdirectionstringValue in:
"inbound" | "outbound"started_afterstringFormat:
"date-time"started_beforestringFormat:
"date-time"Response Body
A page of sessions.
TypeScript Definitions
Use the response body type in TypeScript.
objectRequiredstringValue in:
"list"dataRequiredarray<object>has_moreRequiredbooleannext_cursorstring | null | nullcurl -X GET "https://app.meetdolores.ai/v1/sessions?limit=20&starting_after=string&customer_phone=string&channel=string&direction=inbound&started_after=2019-08-24T14%3A15%3A22Z&started_before=2019-08-24T14%3A15%3A22Z" \
-H "Authorization: Bearer <token>"fetch("https://app.meetdolores.ai/v1/sessions?limit=20&starting_after=string&customer_phone=string&channel=string&direction=inbound&started_after=2019-08-24T14%3A15%3A22Z&started_before=2019-08-24T14%3A15%3A22Z", {
headers: {
"Authorization": "Bearer <token>"
}
})package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://app.meetdolores.ai/v1/sessions?limit=20&starting_after=string&customer_phone=string&channel=string&direction=inbound&started_after=2019-08-24T14%3A15%3A22Z&started_before=2019-08-24T14%3A15%3A22Z"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://app.meetdolores.ai/v1/sessions?limit=20&starting_after=string&customer_phone=string&channel=string&direction=inbound&started_after=2019-08-24T14%3A15%3A22Z&started_before=2019-08-24T14%3A15%3A22Z"
response = requests.request("GET", url, headers = {
"Authorization": "Bearer <token>"
})
print(response.text)require 'net/http'
require 'json'
require 'uri'
uri = URI('https://app.meetdolores.ai/v1/sessions')
req = Net::HTTP::Get.new(uri, {
'Authorization' => "Bearer #{ENV['DOLORES_API_KEY']}",
})
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
puts res.body<?php
$ch = curl_init('https://app.meetdolores.ai/v1/sessions');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer ' . getenv('DOLORES_API_KEY'),
],
]);
echo curl_exec($ch);{
"object": "list",
"data": [
{
"id": "sess_01HXY7P3K9ABCDEFGHJKMNPQRS",
"object": "session",
"created_at": "2019-08-24T14:15:22Z",
"started_at": "2019-08-24T14:15:22Z",
"ended_at": "2019-08-24T14:15:22Z",
"duration_seconds": 0,
"customer_phone": "string",
"destination_phone": "string",
"channel": "string",
"direction": "inbound",
"mode": "string",
"transferred": true,
"forwarded_at": "2019-08-24T14:15:22Z",
"forwarded_to": "string",
"has_recording": true,
"recording_url": "string",
"transcript_url": "string"
}
],
"has_more": true,
"next_cursor": "string"
}