Conversations
Get a conversation
GET
/
conversations
/
{id}
Get a conversation
curl --request GET \
--url https://shortext.ny-corp.io/api/v2.0/conversations/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/conversations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://shortext.ny-corp.io/api/v2.0/conversations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/conversations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "<string>",
"status": "active",
"channel": {
"type": "whatsapp",
"id": "<string>"
},
"agent": {
"id": "<string>",
"name": "<string>"
},
"contact": {
"identifier": "<string>",
"identifier_type": "<string>",
"profile": {},
"country": {}
},
"session": {
"started_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"handover": true,
"handover_at": "2023-11-07T05:31:56Z",
"assignee": {
"id": "USR-XXXXX",
"name": "<string>"
}
},
"last_message_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}Authorizations
Response
200 - application/json
Always HTTP 200: the outcome is in success and code (absolute value of the response code).
⌘I
Get a conversation
curl --request GET \
--url https://shortext.ny-corp.io/api/v2.0/conversations/{id} \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://shortext.ny-corp.io/api/v2.0/conversations/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://shortext.ny-corp.io/api/v2.0/conversations/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://shortext.ny-corp.io/api/v2.0/conversations/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"success": true,
"code": 1000,
"message": "Request success.",
"body": {
"id": "<string>",
"status": "active",
"channel": {
"type": "whatsapp",
"id": "<string>"
},
"agent": {
"id": "<string>",
"name": "<string>"
},
"contact": {
"identifier": "<string>",
"identifier_type": "<string>",
"profile": {},
"country": {}
},
"session": {
"started_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"handover": true,
"handover_at": "2023-11-07T05:31:56Z",
"assignee": {
"id": "USR-XXXXX",
"name": "<string>"
}
},
"last_message_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z"
},
"token": "<string>",
"trace_id": "<string>"
}