curl --request GET \
--url https://api.assembly.com/v1/message-channels/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.assembly.com/v1/message-channels/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.assembly.com/v1/message-channels/{id}', 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.assembly.com/v1/message-channels/{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 => [
"X-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.assembly.com/v1/message-channels/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.assembly.com/v1/message-channels/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/message-channels/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clientId": "client_abc123",
"companyId": "company_abc123",
"createdAt": "2023-01-01T00:00:00Z",
"id": "abc123",
"lastMessageDate": "2023-01-03T00:00:00Z",
"lastRead": "2023-01-02T12:00:00Z",
"memberIds": [
"user_abc123",
"user_def456"
],
"membershipEntityId": "client_abc123",
"membershipType": "individual",
"object": "messageChannel",
"unreadCount": 3,
"updatedAt": "2023-01-02T00:00:00Z"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Get Message Channel by id
Returns a single message channel by id. The requester must be a member of the channel.
curl --request GET \
--url https://api.assembly.com/v1/message-channels/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://api.assembly.com/v1/message-channels/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://api.assembly.com/v1/message-channels/{id}', 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.assembly.com/v1/message-channels/{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 => [
"X-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.assembly.com/v1/message-channels/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-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.assembly.com/v1/message-channels/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.assembly.com/v1/message-channels/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"clientId": "client_abc123",
"companyId": "company_abc123",
"createdAt": "2023-01-01T00:00:00Z",
"id": "abc123",
"lastMessageDate": "2023-01-03T00:00:00Z",
"lastRead": "2023-01-02T12:00:00Z",
"memberIds": [
"user_abc123",
"user_def456"
],
"membershipEntityId": "client_abc123",
"membershipType": "individual",
"object": "messageChannel",
"unreadCount": 3,
"updatedAt": "2023-01-02T00:00:00Z"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}{
"code": "<string>",
"data": "<unknown>",
"message": "<string>"
}Authorizations
Path Parameters
ID of the message channel to retrieve
Response
OK
ClientID is the id of the client associated with an individual channel.
"client_abc123"
CompanyID is the id of the company associated with the channel.
"company_abc123"
CreatedAt is the time the channel was created.
"2023-01-01T00:00:00Z"
ID is the unique identifier of the message channel.
"abc123"
LastMessage is the time the most recent message was sent in the channel.
"2023-01-03T00:00:00Z"
LastRead is the time the viewer last read the channel. Populated alongside UnreadCount; omitted otherwise.
"2023-01-02T12:00:00Z"
MemberIds are the user ids that belong to the channel.
["user_abc123", "user_def456"]
MembershipEntityId is the id of the entity (company or client) the channel is scoped to.
"client_abc123"
MembershipType describes whether the channel is scoped to a company, a single client, or an ad-hoc group.
company, individual, group "individual"
Object is the resource type discriminator, always "messageChannel".
"messageChannel"
UnreadCount is the number of unread messages for the viewer. Populated by the /unread endpoint and by the list endpoint when includeUnread=true; omitted otherwise.
3
UpdatedAt is the time the channel was last updated.
"2023-01-02T00:00:00Z"