Obter conversa
curl --request GET \
--url https://api.jurichat.com/conversation/{conversationId} \
--header 'x-jurichat-api-key: <api-key>'import requests
url = "https://api.jurichat.com/conversation/{conversationId}"
headers = {"x-jurichat-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-jurichat-api-key': '<api-key>'}};
fetch('https://api.jurichat.com/conversation/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jurichat.com/conversation/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-jurichat-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jurichat.com/conversation/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-jurichat-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jurichat.com/conversation/{conversationId}")
.header("x-jurichat-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/conversation/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-jurichat-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"person": {
"id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"imageUrl": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>",
"imageUrl": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"participants": [
{
"id": "<string>",
"name": "<string>",
"isAgent": true,
"isMember": true,
"imageUrl": "<string>",
"phoneNumber": "<string>"
}
],
"messages": [
{
"id": "<string>",
"content": "<string>",
"type": "<string>",
"direction": "<string>",
"messageAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalStatus": "<string>",
"errorMessage": "<string>",
"participantId": "<string>",
"formattedDate": "<string>",
"contact": {
"name": "<string>",
"phoneNumber": "<string>"
},
"quotedMessage": {
"id": "<string>",
"content": "<string>",
"formattedDate": "<string>"
},
"transcription": "<string>",
"summary": "<string>",
"metadata": "<unknown>",
"templateContent": {
"templateName": "<string>",
"headerMedia": {
"link": "<string>",
"filename": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
}
}
}
],
"isGroup": true,
"group": {
"id": "<string>",
"name": "<string>",
"externalId": "<string>",
"imageUrl": "<string>"
},
"inboxId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"hasMore": true,
"nextCursor": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Conversations
Obter conversa
Retorna os dados de uma conversa com participantes, tags e mensagens. Use cursor e limit para paginar as mensagens.
GET
/
conversation
/
{conversationId}
Obter conversa
curl --request GET \
--url https://api.jurichat.com/conversation/{conversationId} \
--header 'x-jurichat-api-key: <api-key>'import requests
url = "https://api.jurichat.com/conversation/{conversationId}"
headers = {"x-jurichat-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-jurichat-api-key': '<api-key>'}};
fetch('https://api.jurichat.com/conversation/{conversationId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.jurichat.com/conversation/{conversationId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-jurichat-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.jurichat.com/conversation/{conversationId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-jurichat-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.jurichat.com/conversation/{conversationId}")
.header("x-jurichat-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.jurichat.com/conversation/{conversationId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-jurichat-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"person": {
"id": "<string>",
"name": "<string>",
"phoneNumber": "<string>",
"imageUrl": "<string>"
},
"user": {
"id": "<string>",
"name": "<string>",
"imageUrl": "<string>"
},
"tags": [
{
"id": "<string>",
"name": "<string>",
"color": "<string>"
}
],
"participants": [
{
"id": "<string>",
"name": "<string>",
"isAgent": true,
"isMember": true,
"imageUrl": "<string>",
"phoneNumber": "<string>"
}
],
"messages": [
{
"id": "<string>",
"content": "<string>",
"type": "<string>",
"direction": "<string>",
"messageAt": "2023-11-07T05:31:56Z",
"externalId": "<string>",
"externalStatus": "<string>",
"errorMessage": "<string>",
"participantId": "<string>",
"formattedDate": "<string>",
"contact": {
"name": "<string>",
"phoneNumber": "<string>"
},
"quotedMessage": {
"id": "<string>",
"content": "<string>",
"formattedDate": "<string>"
},
"transcription": "<string>",
"summary": "<string>",
"metadata": "<unknown>",
"templateContent": {
"templateName": "<string>",
"headerMedia": {
"link": "<string>",
"filename": "<string>",
"latitude": "<string>",
"longitude": "<string>",
"name": "<string>",
"address": "<string>"
}
}
}
],
"isGroup": true,
"group": {
"id": "<string>",
"name": "<string>",
"externalId": "<string>",
"imageUrl": "<string>"
},
"inboxId": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
},
"hasMore": true,
"nextCursor": "<string>"
}{
"message": "<string>",
"statusCode": 123,
"details": "<unknown>"
}Authorizations
Chave de API do escritório (criada no painel). Envie o valor no header x-jurichat-api-key.
Path Parameters
ID da conversa.
Pattern:
^[cC][^\s-]{8,}$Query Parameters
Cursor para buscar a próxima página de mensagens. Use o valor retornado em nextCursor.
Quantidade máxima de mensagens por página.
⌘I