Channels
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Channels, in Arattai are designed for one-way communication, which makes them ideal for announcements and updates to a large audience. Unlike group chats, where everyone can participate, only channel admins can post messages. Subscribers can interact by reacting to messages, depending on the channel's settings.
Public channels are searchable by anyone and are ideal for broadcasting news and community discussions.
The Channels API enables users to retrieve detailed information about a channel they own, administer, or are a member of.
Get Channels
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use this API to retrieve a list of channels the authenticated user is part of or has access to.
Threshold limit: 100 requests per min per user
Number of API calls allowed within a minute.
Lock period: 10 minutes
Wait time before consecutive API requests.
OAuth Scope : Arattai.Channels.READ
Query Parameters
Note: Once the last page has been reached, the
data array in the response will be empty. This is expected and indicates that there are no more channels to fetch, not an error.
Maximum length: 250 characters.
headers_data = Map();
headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN");
response = invokeUrl
[
url: "https://api.arattai.in/restapi/v4/channels"
type: GET
headers: headers_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
Request request = new Request.Builder()
.url("https://api.arattai.in/restapi/v4/channels")
.get()
.addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.build();
Response response = client.newCall(request).execute();
const options = {method: 'GET', headers: {Authorization: 'Bearer REPLACE_BEARER_TOKEN'}};
fetch('https://api.arattai.in/restapi/v4/channels', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.arattai.in")
headers = { 'Authorization': "Bearer REPLACE_BEARER_TOKEN" }
conn.request("GET", "/restapi/v4/channels", headers=headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "GET",
"hostname": "api.arattai.in",
"port": null,
"path": "/restapi/v4/channels",
"headers": {
"Authorization": "Bearer REPLACE_BEARER_TOKEN"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.end();
var client = new RestClient("https://api.arattai.in/restapi/v4/channels");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Get,
RequestUri = new Uri("https://api.arattai.in/restapi/v4/channels"),
Headers =
{
{ "Authorization", "Bearer REPLACE_BEARER_TOKEN" },
},
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.arattai.in/restapi/v4/channels"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = null;
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("GET", "https://api.arattai.in/restapi/v4/channels");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.send(data);
curl --request GET \
--url https://api.arattai.in/restapi/v4/channels \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'
{
"url": "/restapi/v4/channels",
"type": "channel",
"data": [
{
"owner": {
"name": "Ryan West",
"id": "20034503234"
},
"id": "CT_1468515074926458190_20034503234-PC",
"photo_id": "CT_1468515074926458190_20034503234-PC|1793180886045",
"creator": {
"name": "Ryan West",
"id": "20034503234"
},
"role": "owner",
"last_message": {
"sender": {
"id": "20034503234"
},
"message": {
"type": "info",
"data": {
"type": "new_channel",
"title": "Design Discussions"
},
"time": 1793180886263,
"id": "1793180886263%206474491127"
}
},
"type": "public",
"title": "Design Discussions",
"created_time": 1793180886172,
"participant_count": 1
},
{
"owner": {
"name": "Ryan West",
"id": "20034503234"
},
"id": "CT_1463817946756310789_20034503234-PC",
"photo_id": "CT_1463817946756310789_20034503234-PC|1789641750559",
"creator": {
"name": "Ryan West",
"id": "20034503234"
},
"role": "owner",
"last_message": {
"sender": {
"name": "Ryan West",
"id": "20034503234"
},
"message": {
"type": "text",
"content": "Here's the updated color palette for review.",
"time": 1792993752944,
"id": "1792993752944%20839511013232"
}
},
"type": "public",
"title": "Product Updates",
"created_time": 1789641750671,
"participant_count": 2
}
]
}
Send a message in a channel
AI Tools
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Open in ChatGPT
Open in ChatGPT to ask questions about this page
Open in Claude
Open in Claude to ask questions about this page
Copy as Markdown
Copy this page as markdown to use with AI assistants
View as Markdown
Open this page as markdown in a new tab
Use this API to send a message in a specific channel. You can identify the channel using either its unique channel ID or its channel username (unique name).
Supported message types:
- The sample request shown below illustrates a channel message payload using
application/json. - Use this format for text, sticker, GIF, contact, and location messages.
- For File messages, send the request as
multipart/form-datainstead, with the file and comment attached as form fields (see file in Arguments).
Threshold limit: 50 requests per min per user
Number of API calls allowed within a minute.
Lock period: 10 minutes
Wait time before consecutive API requests.
OAuth Scope : Arattai.Messages.CREATE
Arguments
- Use this when you want to send a plain announcement, status update, or short message to the channel. Ideal for everyday communication and quick information sharing.
- Maximum length: 1,000,000 characters.
- default: Use one of the predefined default stickers.
- custom: Use a custom sticker uploaded by the user or workspace.
- Unique identifier of the sticker (e.g.,
:bunny#08_Bunny:). See the list of default sticker IDs for all accepted values. - Maximum length: 50 characters.
- URL of the GIF to be sent. Must point to a valid GIF file.
- Maximum length: 2,000 characters.
- Optional comment displayed with the GIF.
- Maximum length: 1,000 characters.
- Full name of the contact.
- Maximum length: 500 characters.
- Contact's company name.
- Maximum length: 500 characters.
- Base64-encoded profile image of the contact.
- Maximum length: 40,000 characters.
- List of phone numbers belonging to the contact.
- Maximum items: 10.
- personal
- home
- work
- mobile
- List of email addresses belonging to the contact.
- Maximum items: 10.
- home
- work
- other
- Name or label of the location.
- Maximum length: 500 characters.
- Latitude coordinate of the location.
- Maximum length: 500 characters.
- Longitude coordinate of the location.
- Maximum length: 500 characters.
- Human-readable address or place description for the coordinates above (e.g., street address, venue name, or city/state/country). This is a separate text field from the
locationobject that contains it. - Maximum length: 500 characters.
- Use this when you want to share a document, image, or video file in the channel.
- Send this as a
multipart/form-dataform field namedfile(not nested inside a JSON body). - Note: Maximum allowed file size is 4 GB. Uploaded files are scanned for viruses before delivery.
- Optional caption shown alongside the uploaded file.
- Send this as a
multipart/form-dataform field namedcomment. - Maximum length: 64,000 characters.
Path Parameters
You can use either:
- Channel ID: The system-generated unique identifier (e.g.,
CT_12091PUB). - Channel unique name: The human-readable channel username (e.g.,
design_discussions). This avoids the need to look up the channel ID separately.
parameters_data='{"field1":"value1","field2":"value2"}';
headers_data = Map();
headers_data.put("Authorization", "Bearer REPLACE_BEARER_TOKEN");
response = invokeUrl
[
url: "https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages"
type: POST
headers: headers_data
content-type: application/json
parameters: parameters_data
connection: <connection_name>
];
info response;
OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\"field1\":\"value1\",\"field2\":\"value2\"}");
Request request = new Request.Builder()
.url("https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages")
.post(body)
.addHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN")
.addHeader("content-type", "application/json")
.build();
Response response = client.newCall(request).execute();
const options = {
method: 'POST',
headers: {
Authorization: 'Bearer REPLACE_BEARER_TOKEN',
'content-type': 'application/json'
},
body: '{"field1":"value1","field2":"value2"}'
};
fetch('https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
import http.client
conn = http.client.HTTPSConnection("api.arattai.in")
payload = "{\"field1\":\"value1\",\"field2\":\"value2\"}"
headers = {
'Authorization': "Bearer REPLACE_BEARER_TOKEN",
'content-type': "application/json"
}
conn.request("POST", "/restapi/v4/channels/CHANNEL_ID/messages", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const http = require("https");
const options = {
"method": "POST",
"hostname": "api.arattai.in",
"port": null,
"path": "/restapi/v4/channels/CHANNEL_ID/messages",
"headers": {
"Authorization": "Bearer REPLACE_BEARER_TOKEN",
"content-type": "application/json"
}
};
const req = http.request(options, function (res) {
const chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function () {
const body = Buffer.concat(chunks);
console.log(body.toString());
});
});
req.write(JSON.stringify({field1: 'value1', field2: 'value2'}));
req.end();
var client = new RestClient("https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"field1\":\"value1\",\"field2\":\"value2\"}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new HttpClient();
var request = new HttpRequestMessage
{
Method = HttpMethod.Post,
RequestUri = new Uri("https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages"),
Headers =
{
{ "Authorization", "Bearer REPLACE_BEARER_TOKEN" },
},
Content = new StringContent("{\"field1\":\"value1\",\"field2\":\"value2\"}")
{
Headers =
{
ContentType = new MediaTypeHeaderValue("application/json")
}
}
};
using (var response = await client.SendAsync(request))
{
response.EnsureSuccessStatusCode();
var body = await response.Content.ReadAsStringAsync();
Console.WriteLine(body);
}
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
)
func main() {
url := "https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages"
payload := strings.NewReader("{\"field1\":\"value1\",\"field2\":\"value2\"}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer REPLACE_BEARER_TOKEN")
req.Header.Add("content-type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}
const data = JSON.stringify({
"field1": "value1",
"field2": "value2"
});
const xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.addEventListener("readystatechange", function () {
if (this.readyState === this.DONE) {
console.log(this.responseText);
}
});
xhr.open("POST", "https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages");
xhr.setRequestHeader("Authorization", "Bearer REPLACE_BEARER_TOKEN");
xhr.setRequestHeader("content-type", "application/json");
xhr.send(data);
curl --request POST \
--url https://api.arattai.in/restapi/v4/channels/CHANNEL_ID/messages \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN' \
--header 'content-type: application/json' \
--data '{"field1":"value1","field2":"value2"}'