List messages
curl --request GET \
--url https://api.1club.ai/v1/platform/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/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{
"data": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "outbound",
"status": "draft",
"subject": "<string>",
"content": {
"html": "<string>",
"blocks": {
"blocks": [
{
"type": "paragraph",
"data": {},
"id": "<string>",
"tunes": {}
}
],
"time": 123,
"version": "<string>"
}
},
"preview": "<string>",
"source": "<string>",
"sender": {
"userId": 123,
"name": "<string>"
},
"audience": {
"mode": "manual",
"segment": {
"type": [
"<string>"
],
"clubId": 123,
"tags": [
123
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
],
"progressionLevelIds": [
123
]
}
},
"recipientCount": 123,
"recipients": [
{
"contactId": 123,
"name": "<string>",
"deliveryStatus": "<string>",
"engagementStatus": "open",
"skippedReason": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"openedAt": "2023-11-07T05:31:56Z",
"clickedAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"unsubscribedAt": "2023-11-07T05:31:56Z"
}
],
"replyToMessageId": 123,
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Messages
List messages
Returns the organization’s Messages - email, SMS and WhatsApp, drafts and sent, outbound and inbound - newest first. Each row carries a plain text preview, its audience and recipientCount; the body and the per-recipient delivery status come with GET /v1/platform/messages/.
This API never sends a Message. Drafts written here (source: api) wait in the admin app for a member of staff to review and send.
GET
/
v1
/
platform
/
messages
List messages
curl --request GET \
--url https://api.1club.ai/v1/platform/messages \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/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.1club.ai/v1/platform/messages")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.1club.ai/v1/platform/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{
"data": [
{
"id": 123,
"uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "<string>",
"direction": "outbound",
"status": "draft",
"subject": "<string>",
"content": {
"html": "<string>",
"blocks": {
"blocks": [
{
"type": "paragraph",
"data": {},
"id": "<string>",
"tunes": {}
}
],
"time": 123,
"version": "<string>"
}
},
"preview": "<string>",
"source": "<string>",
"sender": {
"userId": 123,
"name": "<string>"
},
"audience": {
"mode": "manual",
"segment": {
"type": [
"<string>"
],
"clubId": 123,
"tags": [
123
],
"membershipPlanIds": [
123
],
"membershipPlanCategoryIds": [
123
],
"pipelineStageIds": [
123
],
"sourceIds": [
123
],
"progressionLevelIds": [
123
]
}
},
"recipientCount": 123,
"recipients": [
{
"contactId": 123,
"name": "<string>",
"deliveryStatus": "<string>",
"engagementStatus": "open",
"skippedReason": "<string>",
"sentAt": "2023-11-07T05:31:56Z",
"deliveredAt": "2023-11-07T05:31:56Z",
"openedAt": "2023-11-07T05:31:56Z",
"clickedAt": "2023-11-07T05:31:56Z",
"bouncedAt": "2023-11-07T05:31:56Z",
"failedAt": "2023-11-07T05:31:56Z",
"unsubscribedAt": "2023-11-07T05:31:56Z"
}
],
"replyToMessageId": 123,
"sentAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
],
"total": 123,
"limit": 123,
"offset": 123
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}{
"error": "<string>",
"code": "<string>",
"details": {}
}Authorizations
Organization-scoped bearer credential: a customer API key (1club_sk_live_...) or an MCP OAuth access token.
Query Parameters
Only drafts, or only Messages that have gone out (inbound ones are stored as sent)
Available options:
draft, sent Only this channel
Available options:
email, sms, whatsapp Only Messages this contact is a recipient of
Match on the subject, a recipient's name or the sender's name
Maximum string length:
120Required range:
1 <= x <= 100Required range:
x >= 0Was this page helpful?