Back to Skills

list-messages

verified

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.

View on GitHub

Marketplace

sinch

sinch/sinch-plugins

Plugin

sinch-claude-plugin

communication

Repository

sinch/sinch-plugins
5stars

plugins/sinch-claude-plugin/skills/list-messages/SKILL.md

Last Verified

January 22, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/sinch/sinch-plugins/blob/main/plugins/sinch-claude-plugin/skills/list-messages/SKILL.md -a claude-code --skill list-messages

Installation paths:

Claude
.claude/skills/list-messages/
Powered by add-skill CLI

Instructions

# 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

1. **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

2. **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)

3. **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

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
3805 chars