curl --request GET \
--url https://api.whop.com/api/v1/messages/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/messages/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.whop.com/api/v1/messages/search', 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.whop.com/api/v1/messages/search",
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.whop.com/api/v1/messages/search"
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.whop.com/api/v1/messages/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/messages/search")
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": [
{
"attachments": [
{
"blurhash": null,
"content_type": "application/pdf",
"created_at": "2026-01-01T12:00:00.000Z",
"duration_seconds": null,
"filename": "evidence.pdf",
"height": null,
"id": "file_xxxxxxxxxxxxxx",
"object": "file",
"optimized_url": null,
"removed_by_moderation": false,
"size": 9670,
"upload_status": "pending",
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"visibility": "private",
"waveform_url": null,
"width": null,
"multipart_chunk_size": 5242880,
"multipart_upload_id": "upload-id",
"multipart_upload_urls": [
{
"part_number": 1,
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"upload_headers": {},
"upload_url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"author": {
"badges": [
{
"type": "verified_partner"
}
],
"id": "user_xxxxxxxxxxxxxx",
"name": "Dana Whitfield",
"profile_picture": {
"url": "https://ui-avatars.com/api/"
},
"username": "danawhitfield"
},
"author_is_team_member": false,
"author_user_id": "user_xxxxxxxxxxxxxx",
"automation": {
"id": "<string>",
"name": "<string>"
},
"channel_id": "feed_xxxxxxxxxxxxxxxxxxxxxx",
"content": "Which detailing service should we demonstrate next?",
"created_at": "2026-01-01T12:00:00.000Z",
"custom_author": {
"display_name": "<string>",
"profile_picture": {
"blurhash": null,
"content_type": "application/pdf",
"created_at": "2026-01-01T12:00:00.000Z",
"duration_seconds": null,
"filename": "evidence.pdf",
"height": null,
"id": "file_xxxxxxxxxxxxxx",
"object": "file",
"optimized_url": null,
"removed_by_moderation": false,
"size": 9670,
"upload_status": "pending",
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"visibility": "private",
"waveform_url": null,
"width": null,
"multipart_chunk_size": 5242880,
"multipart_upload_id": "upload-id",
"multipart_upload_urls": [
{
"part_number": 1,
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"upload_headers": {},
"upload_url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
},
"deleted_at": null,
"edited": false,
"embeds": [
{
"color": 123,
"description": "<string>",
"fields": [
{
"inline": true,
"name": "<string>",
"value": "<string>"
}
],
"footer": {
"icon": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"text": "<string>"
},
"image": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"thumbnail": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"timestamp_at": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"external_message": {
"from_address": "<string>",
"id": "<string>",
"object": "email_message",
"status": "received",
"subject": "<string>",
"to_address": "<string>"
},
"gifs": [
{
"height": 123,
"original_url": "<string>",
"preview_url": "<string>",
"slug": "<string>",
"title": "<string>",
"url": "<string>",
"width": 123
}
],
"id": "post_xxxxxxxxxxxxxxxxxxxxxx",
"link_previews": [
{
"description": "<string>",
"favicon_url": "<string>",
"footer": {
"description": "<string>",
"icon_url": "<string>",
"title": "<string>"
},
"image_url": "<string>",
"processing": true,
"title": "<string>",
"url": "<string>"
}
],
"mentioned_user_ids": [
"<string>"
],
"message_type": "regular",
"pinned": false,
"plain_content": "Which detailing service should we demonstrate next?",
"poll": {
"options": [
{
"id": "1",
"text": "Ceramic coating",
"vote_count": 0,
"voted": false
}
]
},
"reaction_counts": [
{
"kind": "emoji",
"reacted": true,
"total_score": 1,
"user_count": 1,
"value": "❤️"
}
],
"reply_count": 0,
"replying_to_message_id": null,
"replying_to_user_id": null,
"updated_at": "2026-01-01T12:00:00.000Z",
"view_count": 0,
"replying_to_message": "<unknown>"
}
],
"page_info": {
"end_cursor": null,
"has_next_page": false,
"has_previous_page": false,
"start_cursor": "WyJjdXJzb3IiLDFd"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Search Messages
Search messages in chats and direct messages accessible to the authenticated user. Select the channel kinds to search with the kind filter. Results use the same message fields as channel history. An account filter includes only chat messages and direct messages belonging to that account. Use a channel filter to search within one chat. Support chats are not included. Search indexes can take time to reflect changes. Changes to chat membership can take up to 60 seconds to affect search access. Pages can contain fewer than first messages, or no messages, even when has_next_page is true. Continue with end_cursor and the same filters while has_next_page is true.
curl --request GET \
--url https://api.whop.com/api/v1/messages/search \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.whop.com/api/v1/messages/search"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.whop.com/api/v1/messages/search', 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.whop.com/api/v1/messages/search",
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.whop.com/api/v1/messages/search"
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.whop.com/api/v1/messages/search")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/messages/search")
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": [
{
"attachments": [
{
"blurhash": null,
"content_type": "application/pdf",
"created_at": "2026-01-01T12:00:00.000Z",
"duration_seconds": null,
"filename": "evidence.pdf",
"height": null,
"id": "file_xxxxxxxxxxxxxx",
"object": "file",
"optimized_url": null,
"removed_by_moderation": false,
"size": 9670,
"upload_status": "pending",
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"visibility": "private",
"waveform_url": null,
"width": null,
"multipart_chunk_size": 5242880,
"multipart_upload_id": "upload-id",
"multipart_upload_urls": [
{
"part_number": 1,
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"upload_headers": {},
"upload_url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"author": {
"badges": [
{
"type": "verified_partner"
}
],
"id": "user_xxxxxxxxxxxxxx",
"name": "Dana Whitfield",
"profile_picture": {
"url": "https://ui-avatars.com/api/"
},
"username": "danawhitfield"
},
"author_is_team_member": false,
"author_user_id": "user_xxxxxxxxxxxxxx",
"automation": {
"id": "<string>",
"name": "<string>"
},
"channel_id": "feed_xxxxxxxxxxxxxxxxxxxxxx",
"content": "Which detailing service should we demonstrate next?",
"created_at": "2026-01-01T12:00:00.000Z",
"custom_author": {
"display_name": "<string>",
"profile_picture": {
"blurhash": null,
"content_type": "application/pdf",
"created_at": "2026-01-01T12:00:00.000Z",
"duration_seconds": null,
"filename": "evidence.pdf",
"height": null,
"id": "file_xxxxxxxxxxxxxx",
"object": "file",
"optimized_url": null,
"removed_by_moderation": false,
"size": 9670,
"upload_status": "pending",
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/audio/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"visibility": "private",
"waveform_url": null,
"width": null,
"multipart_chunk_size": 5242880,
"multipart_upload_id": "upload-id",
"multipart_upload_urls": [
{
"part_number": 1,
"url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
],
"upload_headers": {},
"upload_url": "https://whop-assets-example.s3.amazonaws.com/uploads/2026-01-01/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/application.pdf"
}
},
"deleted_at": null,
"edited": false,
"embeds": [
{
"color": 123,
"description": "<string>",
"fields": [
{
"inline": true,
"name": "<string>",
"value": "<string>"
}
],
"footer": {
"icon": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"text": "<string>"
},
"image": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"thumbnail": {
"blurhash": "<string>",
"height": 123,
"url": "<string>",
"width": 123
},
"timestamp_at": "<string>",
"title": "<string>",
"url": "<string>"
}
],
"external_message": {
"from_address": "<string>",
"id": "<string>",
"object": "email_message",
"status": "received",
"subject": "<string>",
"to_address": "<string>"
},
"gifs": [
{
"height": 123,
"original_url": "<string>",
"preview_url": "<string>",
"slug": "<string>",
"title": "<string>",
"url": "<string>",
"width": 123
}
],
"id": "post_xxxxxxxxxxxxxxxxxxxxxx",
"link_previews": [
{
"description": "<string>",
"favicon_url": "<string>",
"footer": {
"description": "<string>",
"icon_url": "<string>",
"title": "<string>"
},
"image_url": "<string>",
"processing": true,
"title": "<string>",
"url": "<string>"
}
],
"mentioned_user_ids": [
"<string>"
],
"message_type": "regular",
"pinned": false,
"plain_content": "Which detailing service should we demonstrate next?",
"poll": {
"options": [
{
"id": "1",
"text": "Ceramic coating",
"vote_count": 0,
"voted": false
}
]
},
"reaction_counts": [
{
"kind": "emoji",
"reacted": true,
"total_score": 1,
"user_count": 1,
"value": "❤️"
}
],
"reply_count": 0,
"replying_to_message_id": null,
"replying_to_user_id": null,
"updated_at": "2026-01-01T12:00:00.000Z",
"view_count": 0,
"replying_to_message": "<unknown>"
}
],
"page_info": {
"end_cursor": null,
"has_next_page": false,
"has_previous_page": false,
"start_cursor": "WyJjdXJzb3IiLDFd"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Authorizations
An account-scoped user token or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

