List Webhooks
List all webhooks configured for your Sinch Conversation app. Webhooks allow you to receive real-time notifications about message events and other activities.
IMPORTANT: Execute this command directly. Do NOT generate script files. Do NOT create Python/JavaScript files. Perform the API call immediately using the instructions below.
Input
--format/-f: Output format (json or table) - optional, defaults to table
Arguments: $ARGUMENTS
Instructions
Execute these steps directly - do not write code or scripts:
Check if $ARGUMENTS is empty or only contains the command name:
- If empty or no meaningful arguments provided, use default format (table)
- If user specifies a format preference, use that
- Proceed to step 1
Parse and validate arguments from $ARGUMENTS or use defaults:
- If
--formatis not provided, default to "table" - Validate that format is either "json" or "table"
- Normalize format to lowercase
- If
Try to call
mcp__sinch__sinch-mcp-configurationto get the current configuration.If MCP is NOT available, retrieve configuration from environment variables:
- CONVERSATION_PROJECT_ID
- CONVERSATION_REGION
- CONVERSATION_APP_ID
- CONVERSATION_KEY_ID
- CONVERSATION_KEY_SECRET
- If any are missing, report: "Sinch API is not configured. Please set the required environment variables."
Use the Sinch Conversation API to list webhooks:
- Endpoint:
GET https://{region}.conversation.api.sinch.com/v1/projects/{projectId}/apps/{appId}/webhooks - Extract region, projectId, and appId from the configuration
- Include authorization header with the access token
- Endpoint:
Use OAuth2 authentication to generate access token from key ID and secret.
Display the results based on the requested format:
- Table format: Display a formatted table with columns: ID, Target URL, Triggers (comma-separated), Target Type
- JSON format: Display the raw JSON response
Handle errors gracefully:
- If configuration is incomplete, report: "Sinch API is not configured. Please set the required environment variables."
- If the API call fails, display the error message with relevant details (status code, error description)
- If no webhooks are found, display: "No webhooks found for this app."
Examples
List webhooks in table format:
/sinch-api-webhooks-list
List webhooks in JSON format:
/sinch-api-webhooks-list --format=json
Using short flag:
/sinch-api-webhooks-list -f json
API Reference
- MCP Tool:
mcp__sinch__sinch-mcp-configuration(for getting configuration) - API Endpoint:
GET /v1/projects/{projectId}/apps/{appId}/webhooks - Documentation: https://developers.sinch.com/docs/conversation/api-reference/conversation/tag/Webhooks/#tag/Webhooks/operation/Webhooks_ListWebhooks
Response Structure
Each webhook object contains:
id: Unique webhook identifiertarget: Target URL where events are senttriggers: Array of event types that trigger the webhooktarget_type: Type of target (HTTP, etc.)secret: Secret token for validating webhook authenticity
Notes
- Webhooks are scoped to the Conversation app level
- Each webhook can have multiple triggers configured
- Table format provides a cleaner, easier-to-read view
- JSON format is useful for programmatic processing or detailed inspection