Webhooks
Functionality that allows you to easily find out what is in the request sent by a service. In particular, understand what information actually comes in the request body, headers, source IP, and so on.
HTTP Webhooks
Debugging and processing incoming HTTP requests.
Simple response
You can also edit the response, in particular: code, Content-Type header and response body.
The edit window can be called from the menu on the right, there are also other options, like a link, clearing history or deletion.
Example call using curl:
Traffic policy
In addition to a simple response, you can describe complex webhook processing rules, simulating an API response, for example. There is a complete guide on a separate page about Traffic Policies.
Forwarding request to tunnel
If you have running tunnels, you can forward the received request to it.
Other
In the request overview area, there are hotlinks for checking the source IP in different services.
SMTP Webhooks
SMTP webhooks allow you to simulate email sending and receive emails for debugging. Emails are not forwarded anywhere and you cannot use the service for real email distribution.
Receiving mail
You can send an email to the specified mailbox from any real email, on the page you will see the message body in text representation and all SMTP headers. Thus, you can also use SMTP webhooks as a private temporary mail, but keep in mind that messages in webhooks are automatically cleaned over time. Or for debugging how your mailings work in testing / dev environments.
Sending mail
Even more often during development for debugging mailings you need to check whether messages are sent to everyone who needs them and whether they are sent to those who don't need them.
In this case, you can use sending to the SMTP server smtp.tuna.am:25 emails with any destination address, specifying the webhook mailbox address as the sender's mailbox.
An example of sending an email using curl is below in the examples.
Examples
In GitLab and GitHub repositories, you can create webhooks for specific or all actions, for example opening a PR or push. We, for example, use this to notify our bot, which then writes to telegram about opening an MR or adds labels to a new Issue. You can use Tuna Webhooks to understand what exactly comes in the request body, what headers, and so on.
🦊 GitLab Webhooks
🐱 GitHub Webhooks
🔵 YooKassa HTTP notifications
📬 Sending e-mail using curl
replace XXX with your webhook address
Create an email.txt file with content:
From: XXX@smtp.tuna.am
To: John Doe <to@example.com>
Subject: Test Email
This is the body.
Run the command to send:
curl -s --url 'smtp://smtp.tuna.am:25' --mail-rcpt 'to@example.com' --mail-from 'XXX@smtp.tuna.am' --upload-file email.txt