List Messages
Retrieve message history from Sinch Conversation API using the Conversation API specification. Note: MCP tools do not provide a list messages tool, so this skill always uses the Conversation API endpoint. Supports filtering by contact, conversation, channel, and time range.
Instructions
Extract query parameters from user request:
- Contact: contact ID, phone number, or contact name
- Conversation: conversation ID (if specified)
- Channel: WhatsApp, SMS, or other channel filter
- Count: number of messages to retrieve (default: 10, max: 1000)
- Time range: start_time and end_time if specified
Use Conversation API endpoint to list messages:
- Note: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API endpoint
- Endpoint:
GET /v1/projects/{project_id}/messages
- Operation ID:
Messages_ListMessages
- Authentication: Use Basic Auth or OAuth2 with credentials from environment variables (CONVERSATION_PROJECT_ID, CONVERSATION_KEY_ID, CONVERSATION_KEY_SECRET)
- Region: Use CONVERSATION_REGION environment variable (us, eu, or br)
- Base URL:
https://{region}.conversation.api.sinch.com
- Apply filters based on extracted parameters as query parameters
- Messages are returned in descending order by accept_time (most recent first)
Response formatting:
- Display messages in chronological order (oldest to newest for readability)
- Include: message ID, timestamp, sender/recipient, channel, message content
- Show conversation context if available
- Indicate if there are more messages (pagination using page_token)
Examples
Natural language prompts that trigger this Skill:
- "Show me the last 5 messages with Alice"
- "What messages did I receive from John?"
- "List recent WhatsApp messages"
- "Show conversation history with contact ID abc123"
- "Display messages from the last hour"
- "What are the last 10 messages?"
Conversation API Usage (Required - no MCP alternative):
- Note: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API
- Use the Conversation API endpoint:
GET /v1/projects/{project_id}/messages
- Authentication: Use Basic Auth with CONVERSATION_KEY_ID and CONVERSATION_KEY_SECRET, or OAuth2
- Include required headers:
Authorization, Content-Type: application/json
- Use query parameters for filtering:
contact_id, conversation_id, channel, start_time, end_time, page_size, page_token, app_id, channel_identity, messages_source, only_recipient_originated, view
Filtering Options
- By contact: Filter messages for a specific contact
- By conversation: Filter messages in a specific conversation
- By channel: Filter messages by channel (WHATSAPP, SMS, etc.)
- By time range: Filter messages between start_time and end_time
- By app: Filter messages for a specific app ID
- Pagination: Use page_size (default 10, max 1000) and page_token for pagination
Message View Options
- FULL: Complete message details (default)
- BASIC: Basic message information
Notes
- MCP Note: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API endpoint
- Messages are ordered by accept_time in descending order (most recent first)
- Use the Conversation API endpoint directly - reference the OpenAPI spec for exact parameter names and types
- If no messages found, inform the user clearly
- Support pagination for large message lists using
page_token from response
- The
messages_source parameter determines processing mode: CONVERSATION_SOURCE for CONVERSATION mode, DISPATCH_SOURCE for DISPATCH mode
- Some query parameters may not be supported depending on the
messages_source value - check the API spec for details
1---2name: list-messages3description: Retrieve and display message history from Sinch Conversation API. Use when the user asks to show messages, view conversation history, list recent messages, see messages with a contact, check message history, or view last N messages. Supports filtering by contact, conversation, channel, and time range.4---5
6# List Messages
7
8Retrieve message history from Sinch Conversation API using the Conversation API specification. Note: MCP tools do not provide a list messages tool, so this skill always uses the Conversation API endpoint. Supports filtering by contact, conversation, channel, and time range.
9
10## Instructions
11
121. **Extract query parameters from user request:**
13 - Contact: contact ID, phone number, or contact name
14 - Conversation: conversation ID (if specified)
15 - Channel: WhatsApp, SMS, or other channel filter
16 - Count: number of messages to retrieve (default: 10, max: 1000)
17 - Time range: start_time and end_time if specified
18
192. **Use Conversation API endpoint to list messages:**
20 - **Note**: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API endpoint
21 - Endpoint: `GET /v1/projects/{project_id}/messages`
22 - Operation ID: `Messages_ListMessages`
23 - Authentication: Use Basic Auth or OAuth2 with credentials from environment variables (CONVERSATION_PROJECT_ID, CONVERSATION_KEY_ID, CONVERSATION_KEY_SECRET)
24 - Region: Use CONVERSATION_REGION environment variable (us, eu, or br)
25 - Base URL: `https://{region}.conversation.api.sinch.com`
26 - Apply filters based on extracted parameters as query parameters
27 - Messages are returned in descending order by accept_time (most recent first)
28
293. **Response formatting:**
30 - Display messages in chronological order (oldest to newest for readability)
31 - Include: message ID, timestamp, sender/recipient, channel, message content
32 - Show conversation context if available
33 - Indicate if there are more messages (pagination using page_token)
34
35## Examples
36
37**Natural language prompts that trigger this Skill:**
38- "Show me the last 5 messages with Alice"
39- "What messages did I receive from John?"
40- "List recent WhatsApp messages"
41- "Show conversation history with contact ID abc123"
42- "Display messages from the last hour"
43- "What are the last 10 messages?"
44
45**Conversation API Usage (Required - no MCP alternative):**
461. **Note**: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API
472. Use the Conversation API endpoint: `GET /v1/projects/{project_id}/messages`
483. Authentication: Use Basic Auth with CONVERSATION_KEY_ID and CONVERSATION_KEY_SECRET, or OAuth2
494. Include required headers: `Authorization`, `Content-Type: application/json`
505. Use query parameters for filtering: `contact_id`, `conversation_id`, `channel`, `start_time`, `end_time`, `page_size`, `page_token`, `app_id`, `channel_identity`, `messages_source`, `only_recipient_originated`, `view`
51
52## Filtering Options
53
54- **By contact**: Filter messages for a specific contact
55- **By conversation**: Filter messages in a specific conversation
56- **By channel**: Filter messages by channel (WHATSAPP, SMS, etc.)
57- **By time range**: Filter messages between start_time and end_time
58- **By app**: Filter messages for a specific app ID
59- **Pagination**: Use page_size (default 10, max 1000) and page_token for pagination
60
61## Message View Options
62
63- **FULL**: Complete message details (default)
64- **BASIC**: Basic message information
65
66## Notes
67
68- **MCP Note**: MCP Sinch does not provide a list messages tool, so this skill always uses the Conversation API endpoint
69- Messages are ordered by accept_time in descending order (most recent first)
70- Use the Conversation API endpoint directly - reference the OpenAPI spec for exact parameter names and types
71- If no messages found, inform the user clearly
72- Support pagination for large message lists using `page_token` from response
73- The `messages_source` parameter determines processing mode: `CONVERSATION_SOURCE` for CONVERSATION mode, `DISPATCH_SOURCE` for DISPATCH mode
74- Some query parameters may not be supported depending on the `messages_source` value - check the API spec for details
75