Webhooks

How to create a webhook

Short answer

To create a webhook, open Webhooks in the dashboard, press Add webhook, enter a public https:// URL, tick at least one event and save. Copy the signing secret it shows (it starts with mcws_). You can do the same with POST /v1/webhooks and a full-access API key. A team can have up to 10 endpoints, and only admins and developers can add them.

Last checked 16 November 2026

A webhook is a URL in your app that Mailcandor calls when something happens: an email is delivered, bounces, is marked as spam, or a reply arrives. You add the URL once, choose the events, and Mailcandor sends a signed POST with a JSON body for each event.

Before you start

  • You need the Admin or Developer role on the team.
  • Your endpoint must be reachable at a public https:// address. Mailcandor refuses http:// URLs, URLs with a username or password in them, and hosts that resolve to private, local or reserved IP addresses.
  • The endpoint should answer with any 2xx status within 10 seconds. Mailcandor does not follow redirects, so give the final URL.

Create a webhook in the dashboard

  1. Open Webhooks in the left menu.
  2. Press Add webhook.
  3. In Endpoint URL, enter your address, for example https://yourapp.com/webhooks/mailcandor.
  4. Under Events, tick the events you want. You must pick at least one. The list is grouped into Email, Domain, Suppression, Review, Inbound and Contact events.
  5. Press Add webhook.
  6. The page now shows Your signing secret. Copy it into your app’s secrets (for example an environment variable such as MAILCANDOR_WEBHOOK_SECRET), then press Done.

If you lose the secret, open the webhook and press Show signing secret.

Create a webhook with the API

Use a full-access API key. Sending-only keys cannot manage webhooks.

curl https://api.mailcandor.com/v1/webhooks \
  -H "Authorization: Bearer $MAILCANDOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yourapp.com/webhooks/mailcandor",
    "events": ["email.delivered", "email.bounced", "email.complained"]
  }'

The answer is 201 with the webhook and its signing_secret:

{
  "id": "6a1f0c2e-1b7d-4a55-9c1e-2f3a4b5c6d7e",
  "url": "https://yourapp.com/webhooks/mailcandor",
  "events": ["email.delivered", "email.bounced", "email.complained"],
  "status": "enabled",
  "signing_secret": "mcws_..."
}

The API shows the secret only in this response (and when you rotate it), so store it straight away. Always send an events list with at least one event: an empty or missing list is refused with a 422.

Change, pause or delete a webhook

Open the webhook in the dashboard. The buttons at the top are:

Button What it does
Turn off / Turn on Stops or restarts deliveries. Events that happen while it is off are not sent and cannot be replayed later.
Edit Change the URL or the events.
Show signing secret Shows the current secret.
Rotate secret Makes a new secret. The old one stops working at once.
Delete Stops sending and removes the delivery history.

With the API, use PATCH /v1/webhooks/{id} with any of url, events or status ("enabled" or "disabled"), and DELETE /v1/webhooks/{id}.

Check that it works

Send yourself a test email (open Emails and press Send a test email), then open the webhook. The Deliveries table lists each event with its status and number of attempts. Press Details to see what your endpoint answered.

If it does not work

  • “Use an https:// URL.” Your URL starts with http://. Use HTTPS.
  • “This URL points to a private or reserved address.” The host resolves to an internal IP. Use a public endpoint.
  • “We could not find … in DNS.” The hostname does not resolve yet. Check the spelling and your DNS.
  • “A team can have 10 webhook endpoints.” Delete one you no longer use.
  • No Add webhook button. Your role is Viewer. Ask an admin to change it on the Team page.
  • Deliveries show failed attempts. See Webhook not receiving events.

Next, verify the signature on every request, and read the events reference to see what each payload holds. The full API is at docs.mailcandor.com.

Questions

How many webhooks can a team have?

Up to 10 endpoints per team. Delete one before adding an eleventh.

Can I use an http:// URL or localhost for testing?

No. The URL must be https and must resolve to a public address. Private, local and reserved addresses are refused. Use a tunnel with a public https address for local testing.

Can I see the signing secret again later?

Yes, in the dashboard. Open the webhook and press Show signing secret. Through the API the secret is returned only when you create the webhook or rotate it.

Who on my team can create webhooks?

Admins and developers. Viewers can see webhooks but cannot add, change or delete them. The Billing role cannot see them.

Related

Send with someone on your side.

Unlimited domains on every plan, a person before any block, and 3,000 emails a month free. Tell us what you send and we set you up within one business day.