Skip to content
mittr

Connectors

Connectors are pre-built integrations that transform webhook payloads into native messages for popular platforms. Instead of writing custom delivery logic for each notification channel, create a connector and Mittr handles formatting, delivery, and retries.

ConnectorDelivery methodKey features
SlackIncoming webhookRich attachments, custom channel, username, emoji icons
DiscordWebhookEmbeds with color coding, custom bot username
Microsoft TeamsIncoming webhookMessageCard format with theme colors and sections
EmailSMTPTemplated subject and body, multiple recipients
WebhookHTTP POSTGeneric passthrough to any URL
Terminal window
curl -X POST https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-slack-alerts",
"type": "slack",
"config": {
"webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx",
"channel": "#webhook-alerts",
"username": "Mittr",
"iconEmoji": ":satellite:"
}
}'
Terminal window
curl -X POST https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-discord-alerts",
"type": "discord",
"config": {
"webhookUrl": "https://discord.com/api/webhooks/123/abc",
"username": "Mittr Bot"
}
}'
Terminal window
curl -X POST https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-teams-alerts",
"type": "teams",
"config": {
"webhookUrl": "https://outlook.office.com/webhook/..."
}
}'
Terminal window
curl -X POST https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "prod-email-alerts",
"type": "email",
"config": {
"smtpHost": "smtp.gmail.com",
"smtpPort": 587,
"smtpUsername": "[email protected]",
"smtpPassword": "app-password",
"fromEmail": "[email protected]",
}
}'

Every connector supports customizable message templates using Go template syntax. Templates have access to the event type and full payload.

VariableDescription
{{.event_type}}The event type (e.g., order.created)
{{.payload}}The full event payload as a map
{{.message}}Shorthand for payload.message if present
Any payload fieldTop-level payload fields are merged into the template context
Terminal window
curl -X POST https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "order-slack",
"type": "slack",
"config": {
"webhookUrl": "https://hooks.slack.com/services/T.../B.../xxx",
"channel": "#orders"
},
"template": {
"text": "New {{.event_type}} from {{.customer_name}}",
"title": "Order #{{.order_id}}",
"color": "#36a64f"
}
}'

If no custom template is provided, Mittr uses sensible defaults:

  • Slack: {{.event_type}}: {{.message}} with green attachment
  • Discord: Same text format with info-colored embed
  • Teams: MessageCard with event type as title
  • Email: Subject [Mittr] {{.event_type}}, body lists all payload fields

Connectors automatically transform your event payload into the native format for each platform:

  • Slack: JSON with text, channel, username, icon_emoji, and attachments
  • Discord: JSON with content, username, and embeds
  • Teams: MessageCard schema with @type, themeColor, and sections
  • Email: Renders subject and body from templates, delivers via SMTP
  • Webhook: Passes the payload through as-is (no transformation)
Terminal window
# List all connectors
curl https://app.mittr.io/api/v1/connectors \
-H "X-API-Key: mtr_your_key"
# Get a specific connector
curl https://app.mittr.io/api/v1/connectors/prod-slack-alerts \
-H "X-API-Key: mtr_your_key"
# Update a connector
curl -X PUT https://app.mittr.io/api/v1/connectors/prod-slack-alerts \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"config": { "channel": "#critical-alerts" },
"template": { "color": "#ff0000" }
}'
# Delete a connector
curl -X DELETE https://app.mittr.io/api/v1/connectors/prod-slack-alerts \
-H "X-API-Key: mtr_your_key"

Connectors are most powerful when paired with alert rules. Create an alert rule that triggers a connector when delivery failures exceed a threshold:

Terminal window
# Create alert rule that notifies Slack on failures
curl -X POST https://app.mittr.io/api/v1/alert-rules \
-H "X-API-Key: mtr_your_key" \
-H "Content-Type: application/json" \
-d '{
"name": "failure-spike",
"condition": "failure_rate > 10%",
"connectorName": "prod-slack-alerts"
}'