Documentation Index
Fetch the complete documentation index at: https://docs.hypersender.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Manage SMS message threads programmatically with Hypersender’s Laravel SDK. This page covers listing threads with filters, editing archived status, and deleting threads.
Methods
List Message Threads
Index all message threads with pagination and filtering. (learn more)
Basic Usage
Basic Usage with Filters
Parameters
use Hypersender\Hypersender;
$response = Hypersender::sms()->messageThreads();
use Hypersender\Hypersender;
$request = app(MessageThreadsIndexRequest::class, [
'perPage' => '50',
'page' => '1',
'sort' => '-updated_at',
'include' => 'last_message',
'filter' => [
'last_message_content' => 'otp',
'is_archived' => false,
'last_message_id' => '9e03fc6b-ce90-4399-a472-6b029857e15b',
'from_or_to_number' => '+201234567890',
// other filters (check Parameters tab)
],
]);
$response = Hypersender::sms()->messageThreads($request);
| Parameter | Type | Required | Description |
|---|
| per_page | int | no | Number of items per page (max 50) |
| page | int | no | Page number to retrieve |
| sort | string | no | Sort fields (default: -updated_at) |
| include | string | no | Related resources to include (comma-separated) |
| filter[last_message_content] | string | no | Filter by the content of the last message in the thread |
| filter[is_archived] | bool | no | Filter by archived status |
| filter[last_message_id] | string | no | Filter by the ID of the last message in the thread |
| filter[from_or_to_number] | string | no | Filter by phone number (either sender or recipient) |
Edit Message Thread
Edit a message thread’s archived status. (learn more)
use Hypersender\Hypersender;
Hypersender::sms()->editMessageThread(
isArchived: true,
messageThreadId: 'thread_01HXYZABCDEF1234567'
);
| Parameter | Type | Required | Description |
|---|
| isArchived | bool | yes | Whether the thread should be marked as archived |
| messageThreadId | string | yes | The ID of the message thread to edit |
Delete Message Thread
Delete a message thread and all associated messages. (learn more)
use Hypersender\Hypersender;
Hypersender::sms()->deleteMessageThread(
messageThreadId: 'thread_01HXYZABCDEF1234567'
);
| Parameter | Type | Required | Description |
|---|
| messageThreadId | string | yes | The ID of the message thread to delete |