List messages in a conversation
curl --request GET \
--url https://api.greentick.ai/v1/conversations/{id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.greentick.ai/v1/conversations/{id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.greentick.ai/v1/conversations/{id}/messages', 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.greentick.ai/v1/conversations/{id}/messages",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.greentick.ai/v1/conversations/{id}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.greentick.ai/v1/conversations/{id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/v1/conversations/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"conversationId": "<string>",
"messages": [
{
"id": "<string>",
"wamid": "<string>",
"direction": "inbound",
"type": "<string>",
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deliveryStatus": "pending",
"deliveryHistory": [
{
"status": "pending",
"timestamp": "2023-11-07T05:31:56Z",
"errorCode": 123,
"errorTitle": "<string>",
"errorMessage": "<string>"
}
],
"repliedBy": "<string>",
"template": {
"name": "order_update",
"language": "en_US",
"templateCategory": "MARKETING",
"parameterFormat": "NAMED",
"components": [
{}
],
"variableValues": {
"customer_name": "Akshay",
"order_id": "ord_123"
},
"headerComponent": {}
},
"mediaId": "<string>",
"isRevoked": true
}
],
"total": 128,
"hasMoreBefore": true,
"hasMoreAfter": true,
"oldestCursor": "<string>",
"newestCursor": "<string>"
}
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}Conversations
List messages in a conversation
Fetches paginated message history for a conversation. Without before/after, returns the latest page. Use before to load older messages and after to load newer ones.
GET
/
conversations
/
{id}
/
messages
List messages in a conversation
curl --request GET \
--url https://api.greentick.ai/v1/conversations/{id}/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.greentick.ai/v1/conversations/{id}/messages"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.greentick.ai/v1/conversations/{id}/messages', 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.greentick.ai/v1/conversations/{id}/messages",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.greentick.ai/v1/conversations/{id}/messages"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.greentick.ai/v1/conversations/{id}/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.greentick.ai/v1/conversations/{id}/messages")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"conversationId": "<string>",
"messages": [
{
"id": "<string>",
"wamid": "<string>",
"direction": "inbound",
"type": "<string>",
"text": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"deliveryStatus": "pending",
"deliveryHistory": [
{
"status": "pending",
"timestamp": "2023-11-07T05:31:56Z",
"errorCode": 123,
"errorTitle": "<string>",
"errorMessage": "<string>"
}
],
"repliedBy": "<string>",
"template": {
"name": "order_update",
"language": "en_US",
"templateCategory": "MARKETING",
"parameterFormat": "NAMED",
"components": [
{}
],
"variableValues": {
"customer_name": "Akshay",
"order_id": "ord_123"
},
"headerComponent": {}
},
"mediaId": "<string>",
"isRevoked": true
}
],
"total": 128,
"hasMoreBefore": true,
"hasMoreAfter": true,
"oldestCursor": "<string>",
"newestCursor": "<string>"
}
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}{
"success": false,
"code": "INVALID_TO",
"message": "to (E.164 phone) is required"
}Authorizations
Create an API key in GreenTick Developer settings. Send it as Authorization: Bearer gt_live_… (Bearer prefix required).
Path Parameters
GreenTick conversation ID.
Query Parameters
GreenTick phone line ref from GET /phone-numbers (ref field).
Required range:
1 <= x <= 100Load messages older than this cursor (oldestCursor from a previous response).
Load messages newer than this cursor (newestCursor from a previous response).

