Unpublish message
curl --request POST \
--url https://api.tightknit.ai/v1/messages/{message_id}/unpublish \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tightknit.ai/v1/messages/{message_id}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tightknit.ai/v1/messages/{message_id}/unpublish', 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.tightknit.ai/v1/messages/{message_id}/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.tightknit.ai/v1/messages/{message_id}/unpublish"
req, _ := http.NewRequest("POST", 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.post("https://api.tightknit.ai/v1/messages/{message_id}/unpublish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tightknit.ai/v1/messages/{message_id}/unpublish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "message",
"id": "msg_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "post",
"feed_id": "feed_7m3x9k4t8plz",
"parent_message_id": "msg_9f2b8c1d4e5a",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"body": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"notice": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"cover_image_file_id": "file_2b3c4d5e6f7g",
"author_profile_id": "prof_9f2b8c1d4e5a",
"source": "slack",
"is_published": true,
"first_published_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"latest_activity_at": "2023-11-07T05:31:56Z",
"replies_count": 1,
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"ts": "1788879207.324959",
"permalink": "<string>"
}
},
"author": {
"object": "profile",
"id": "prof_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Ada Lovelace",
"full_name": "Ada Lovelace",
"display_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"email": "[email protected]",
"email_domain": "example.com",
"locale": "<string>",
"is_team_member": true,
"is_deactivated": true,
"opt_out_of_public_profile": true,
"member_since": "2023-11-07T05:31:56Z",
"invited_at": "2023-11-07T05:31:56Z",
"signed_up_at": "2023-11-07T05:31:56Z",
"source": "slack_sync",
"has_account": true,
"flair_group_id": "grup_7m3x9k4t8plz",
"slack_profile_id": "U0BRY4S6LNQ",
"integrations": {
"slack": {
"profile": {
"object": "slack_profile",
"id": "U0BRY4S6LNQ",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"workspace_id": "T01ABC123",
"display_name": "<string>",
"real_name": "<string>",
"email": "[email protected]",
"pronouns": "<string>",
"avatar_url": "<string>",
"locale": "<string>",
"tz": "<string>",
"is_bot": true,
"is_app_user": true,
"is_workflow_bot": true,
"is_admin": true,
"is_owner": true,
"is_restricted": true,
"is_invited_user": true,
"is_deleted": true
}
}
},
"field_values": [
{
"object": "profile_field_value",
"id": "pfvl_3n8c5v1b7zrd",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "prof_9f2b8c1d4e5a",
"profile_field_id": "pfld_6t2k9w4m8xqa",
"profile_field": {
"object": "profile_field",
"id": "pfld_6t2k9w4m8xqa",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "City",
"hint": "<string>",
"type": "text",
"is_active": true,
"show_label_on_site": true,
"is_value_restricted_to_members": true,
"is_featured": true
},
"value": "San Francisco",
"display_text": "<string>"
}
]
},
"feed": {
"object": "feed",
"id": "feed_4h2o89z6qlpw",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"slug": "product-updates",
"emoji_icon": "<string>",
"visibility": "disabled",
"is_archived": true,
"is_unlisted": true,
"show_in_navigation_menu": true,
"allow_site_posting": true,
"selected_answers_enabled": true,
"show_pinned_posts": true,
"list_view_display_format": "card",
"post_detail_display_format": "discussion",
"ai_titles_enabled": true,
"ai_post_title_prompt": "<string>",
"ai_post_description_prompt": "<string>",
"created_by_id": "prof_5Yq7tVz2Hm3n",
"banner_file_id": "file_2b3c4d5e6f7g",
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"stores_new_messages": true,
"sync_all_incoming_messages": true,
"post_sync_reminder_enabled": true,
"channel": {
"object": "slack_channel",
"id": "C01ABC123",
"name": "<string>",
"is_private": true,
"is_archived": true,
"num_members": 1,
"topic": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"purpose": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
}
}
}
},
"created_by": {
"object": "profile",
"id": "prof_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Ada Lovelace",
"full_name": "Ada Lovelace",
"display_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"email": "[email protected]",
"email_domain": "example.com",
"locale": "<string>",
"is_team_member": true,
"is_deactivated": true,
"opt_out_of_public_profile": true,
"member_since": "2023-11-07T05:31:56Z",
"invited_at": "2023-11-07T05:31:56Z",
"signed_up_at": "2023-11-07T05:31:56Z",
"source": "slack_sync",
"has_account": true,
"flair_group_id": "grup_7m3x9k4t8plz",
"slack_profile_id": "U0BRY4S6LNQ",
"integrations": {
"slack": {
"profile": {
"object": "slack_profile",
"id": "U0BRY4S6LNQ",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"workspace_id": "T01ABC123",
"display_name": "<string>",
"real_name": "<string>",
"email": "[email protected]",
"pronouns": "<string>",
"avatar_url": "<string>",
"locale": "<string>",
"tz": "<string>",
"is_bot": true,
"is_app_user": true,
"is_workflow_bot": true,
"is_admin": true,
"is_owner": true,
"is_restricted": true,
"is_invited_user": true,
"is_deleted": true
}
}
},
"field_values": [
{
"object": "profile_field_value",
"id": "pfvl_3n8c5v1b7zrd",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "prof_9f2b8c1d4e5a",
"profile_field_id": "pfld_6t2k9w4m8xqa",
"profile_field": {
"object": "profile_field",
"id": "pfld_6t2k9w4m8xqa",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "City",
"hint": "<string>",
"type": "text",
"is_active": true,
"show_label_on_site": true,
"is_value_restricted_to_members": true,
"is_featured": true
},
"value": "San Francisco",
"display_text": "<string>"
}
]
},
"banner_file": {
"object": "file",
"id": "file_2b3c4d5e6f7g",
"name": "cover.png",
"title": "<string>",
"mimetype": "image/png",
"size": 1,
"url": "<string>",
"thumbnail_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"cover_image_file": {
"object": "file",
"id": "file_2b3c4d5e6f7g",
"name": "cover.png",
"title": "<string>",
"mimetype": "image/png",
"size": 1,
"url": "<string>",
"thumbnail_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"parent_message": {
"object": "message",
"id": "msg_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "post",
"feed_id": "feed_7m3x9k4t8plz",
"parent_message_id": "msg_9f2b8c1d4e5a",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"body": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"notice": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"cover_image_file_id": "file_2b3c4d5e6f7g",
"author_profile_id": "prof_9f2b8c1d4e5a",
"source": "slack",
"is_published": true,
"first_published_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"latest_activity_at": "2023-11-07T05:31:56Z",
"replies_count": 1,
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"ts": "1788879207.324959",
"permalink": "<string>"
}
}
}
}{
"type": "about:blank",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "<string>",
"param": "<string>",
"used_by": [
{
"object": "event",
"id": "cevt_V1StGXR8Z5jd",
"field": "cover_image_file_id"
}
],
"request_id": "req_9f2b8c1d4e5a6b7c8d9e0f1a2b3c4d5e"
}Messages
Unpublish message
Takes a post or reply off the community site, keeping its title, slug and body for a later publish. Unpublishing a post also unpublishes its replies. Unpublishing a message that is not on the site changes nothing.
Unpublish message
curl --request POST \
--url https://api.tightknit.ai/v1/messages/{message_id}/unpublish \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.tightknit.ai/v1/messages/{message_id}/unpublish"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.tightknit.ai/v1/messages/{message_id}/unpublish', 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.tightknit.ai/v1/messages/{message_id}/unpublish",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.tightknit.ai/v1/messages/{message_id}/unpublish"
req, _ := http.NewRequest("POST", 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.post("https://api.tightknit.ai/v1/messages/{message_id}/unpublish")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tightknit.ai/v1/messages/{message_id}/unpublish")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"object": "message",
"id": "msg_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "post",
"feed_id": "feed_7m3x9k4t8plz",
"parent_message_id": "msg_9f2b8c1d4e5a",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"body": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"notice": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"cover_image_file_id": "file_2b3c4d5e6f7g",
"author_profile_id": "prof_9f2b8c1d4e5a",
"source": "slack",
"is_published": true,
"first_published_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"latest_activity_at": "2023-11-07T05:31:56Z",
"replies_count": 1,
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"ts": "1788879207.324959",
"permalink": "<string>"
}
},
"author": {
"object": "profile",
"id": "prof_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Ada Lovelace",
"full_name": "Ada Lovelace",
"display_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"email": "[email protected]",
"email_domain": "example.com",
"locale": "<string>",
"is_team_member": true,
"is_deactivated": true,
"opt_out_of_public_profile": true,
"member_since": "2023-11-07T05:31:56Z",
"invited_at": "2023-11-07T05:31:56Z",
"signed_up_at": "2023-11-07T05:31:56Z",
"source": "slack_sync",
"has_account": true,
"flair_group_id": "grup_7m3x9k4t8plz",
"slack_profile_id": "U0BRY4S6LNQ",
"integrations": {
"slack": {
"profile": {
"object": "slack_profile",
"id": "U0BRY4S6LNQ",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"workspace_id": "T01ABC123",
"display_name": "<string>",
"real_name": "<string>",
"email": "[email protected]",
"pronouns": "<string>",
"avatar_url": "<string>",
"locale": "<string>",
"tz": "<string>",
"is_bot": true,
"is_app_user": true,
"is_workflow_bot": true,
"is_admin": true,
"is_owner": true,
"is_restricted": true,
"is_invited_user": true,
"is_deleted": true
}
}
},
"field_values": [
{
"object": "profile_field_value",
"id": "pfvl_3n8c5v1b7zrd",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "prof_9f2b8c1d4e5a",
"profile_field_id": "pfld_6t2k9w4m8xqa",
"profile_field": {
"object": "profile_field",
"id": "pfld_6t2k9w4m8xqa",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "City",
"hint": "<string>",
"type": "text",
"is_active": true,
"show_label_on_site": true,
"is_value_restricted_to_members": true,
"is_featured": true
},
"value": "San Francisco",
"display_text": "<string>"
}
]
},
"feed": {
"object": "feed",
"id": "feed_4h2o89z6qlpw",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "<string>",
"slug": "product-updates",
"emoji_icon": "<string>",
"visibility": "disabled",
"is_archived": true,
"is_unlisted": true,
"show_in_navigation_menu": true,
"allow_site_posting": true,
"selected_answers_enabled": true,
"show_pinned_posts": true,
"list_view_display_format": "card",
"post_detail_display_format": "discussion",
"ai_titles_enabled": true,
"ai_post_title_prompt": "<string>",
"ai_post_description_prompt": "<string>",
"created_by_id": "prof_5Yq7tVz2Hm3n",
"banner_file_id": "file_2b3c4d5e6f7g",
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"stores_new_messages": true,
"sync_all_incoming_messages": true,
"post_sync_reminder_enabled": true,
"channel": {
"object": "slack_channel",
"id": "C01ABC123",
"name": "<string>",
"is_private": true,
"is_archived": true,
"num_members": 1,
"topic": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"purpose": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
}
}
}
},
"created_by": {
"object": "profile",
"id": "prof_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"name": "Ada Lovelace",
"full_name": "Ada Lovelace",
"display_name": "<string>",
"first_name": "<string>",
"last_name": "<string>",
"avatar_url": "<string>",
"email": "[email protected]",
"email_domain": "example.com",
"locale": "<string>",
"is_team_member": true,
"is_deactivated": true,
"opt_out_of_public_profile": true,
"member_since": "2023-11-07T05:31:56Z",
"invited_at": "2023-11-07T05:31:56Z",
"signed_up_at": "2023-11-07T05:31:56Z",
"source": "slack_sync",
"has_account": true,
"flair_group_id": "grup_7m3x9k4t8plz",
"slack_profile_id": "U0BRY4S6LNQ",
"integrations": {
"slack": {
"profile": {
"object": "slack_profile",
"id": "U0BRY4S6LNQ",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"workspace_id": "T01ABC123",
"display_name": "<string>",
"real_name": "<string>",
"email": "[email protected]",
"pronouns": "<string>",
"avatar_url": "<string>",
"locale": "<string>",
"tz": "<string>",
"is_bot": true,
"is_app_user": true,
"is_workflow_bot": true,
"is_admin": true,
"is_owner": true,
"is_restricted": true,
"is_invited_user": true,
"is_deleted": true
}
}
},
"field_values": [
{
"object": "profile_field_value",
"id": "pfvl_3n8c5v1b7zrd",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"profile_id": "prof_9f2b8c1d4e5a",
"profile_field_id": "pfld_6t2k9w4m8xqa",
"profile_field": {
"object": "profile_field",
"id": "pfld_6t2k9w4m8xqa",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"label": "City",
"hint": "<string>",
"type": "text",
"is_active": true,
"show_label_on_site": true,
"is_value_restricted_to_members": true,
"is_featured": true
},
"value": "San Francisco",
"display_text": "<string>"
}
]
},
"banner_file": {
"object": "file",
"id": "file_2b3c4d5e6f7g",
"name": "cover.png",
"title": "<string>",
"mimetype": "image/png",
"size": 1,
"url": "<string>",
"thumbnail_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
}
},
"cover_image_file": {
"object": "file",
"id": "file_2b3c4d5e6f7g",
"name": "cover.png",
"title": "<string>",
"mimetype": "image/png",
"size": 1,
"url": "<string>",
"thumbnail_url": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"parent_message": {
"object": "message",
"id": "msg_9f2b8c1d4e5a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"type": "post",
"feed_id": "feed_7m3x9k4t8plz",
"parent_message_id": "msg_9f2b8c1d4e5a",
"title": "<string>",
"slug": "<string>",
"description": "<string>",
"body": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"notice": {
"doc": {
"type": "doc",
"version": 1,
"content": [
{}
]
},
"text": "<string>"
},
"cover_image_file_id": "file_2b3c4d5e6f7g",
"author_profile_id": "prof_9f2b8c1d4e5a",
"source": "slack",
"is_published": true,
"first_published_at": "2023-11-07T05:31:56Z",
"edited_at": "2023-11-07T05:31:56Z",
"latest_activity_at": "2023-11-07T05:31:56Z",
"replies_count": 1,
"integrations": {
"slack": {
"channel_id": "C01ABC123",
"ts": "1788879207.324959",
"permalink": "<string>"
}
}
}
}{
"type": "about:blank",
"title": "Not found",
"status": 404,
"code": "not_found",
"detail": "<string>",
"param": "<string>",
"used_by": [
{
"object": "event",
"id": "cevt_V1StGXR8Z5jd",
"field": "cover_image_file_id"
}
],
"request_id": "req_9f2b8c1d4e5a6b7c8d9e0f1a2b3c4d5e"
}Authorizations
Path Parameters
Response
Success
Was this page helpful?

