Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

docs: improve PKI alerts docs

Carlos Monastyrski2eb335e86408
diff --git a/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
index 734b315b51..3fc47e5c81 100644
--- a/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/email-alerts.mdx
@@ -4,7 +4,8 @@ sidebarTitle: "Email"
description: "Send certificate alert notifications by email."
---
-import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
+import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
+import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
An email channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) emails the recipients you choose whenever the alert fires. Email channels are available on every plan.
@@ -17,26 +18,115 @@ An email channel on a certificate [alert](/documentation/platform/pki/applicatio
- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- Recipients who are organization members, or addresses on one of your organization's [verified email domains](/documentation/platform/email-domain)
-## Step 1: Start an alert
-
-<StartAlert />
-
-## Step 2: Add the email channel
-
-<Steps>
- <Step>
- Select **Add Channel** > **Email**.
- </Step>
- <Step>
- In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test email to the recipients.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
-</Steps>
+## Create the alert
+
+<Tabs>
+ <Tab title="Certificate Management">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartCertManagementAlert />
+
+ On the **Channels** step, add the email channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Email**.
+ </Step>
+ <Step>
+ In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test email to the recipients.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an `email` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ Each entry in the channel's `recipients` array is one of these:
+
+ - An organization member, with `principalType` set to `user` and `principalId` set to the member's `user.id` from [the get user memberships endpoint](/api-reference/endpoints/organizations/memberships)
+ - An address on one of your organization's verified email domains, with `principalType` set to `email` and `principalId` set to the address
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "issued-certificates-expiring",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "sources": ["issued"] },
+ "channels": [
+ {
+ "name": "platform-team",
+ "channelType": "email",
+ "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+ <Tab title="Application">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartApplicationAlert />
+
+ On the **Channels** step, add the email channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Email**.
+ </Step>
+ <Step>
+ In **Recipients**, select organization members, or type an address on one of your organization's verified email domains and add it.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test email to the recipients.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with an `email` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ Each entry in the channel's `recipients` array is one of these:
+
+ - An organization member, with `principalType` set to `user` and `principalId` set to the member's `user.id` from [the get user memberships endpoint](/api-reference/endpoints/organizations/memberships)
+ - An address on one of your organization's verified email domains, with `principalType` set to `email` and `principalId` set to the address
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-expiring",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.expiry",
+ "condition": { "alertBefore": "30d" },
+ "channels": [
+ {
+ "name": "payments-team",
+ "channelType": "email",
+ "recipients": [{ "principalType": "email", "principalId": "[email protected]" }]
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+</Tabs>
<Check>
Your alert is set up. Infisical emails the recipients whenever the alert fires.
diff --git a/docs/documentation/platform/pki/applications/alerting/overview.mdx b/docs/documentation/platform/pki/applications/alerting/overview.mdx
index 09249fba15..3101540f38 100644
--- a/docs/documentation/platform/pki/applications/alerting/overview.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/overview.mdx
@@ -73,3 +73,32 @@ Without filters, the alert covers every active signer under **Code Signing** > *
- When you reissue a signer's certificate, the alert follows the new certificate and stops alerting on the one it replaced
- If several signers share a certificate, the notification names only the ones the filter selects
- If you delete a signer that the filter lists, the **Filters** step shows it as **Unknown signer** when you edit the alert, so you can remove it
+
+## Create an alert through the API
+
+To create an alert from a script, send a request to the create alert endpoint with an [access token](/api-reference/overview/authentication). The request sets which certificates the alert covers and which event it watches:
+
+| Alert | `resourceType` | `resourceId` | `eventType` |
+| --- | --- | --- | --- |
+| Certificate Management | `cert-manager` | Leave out | `cert-manager.certificate.expiry`, `cert-manager.certificate.issuance`, `cert-manager.certificate.renewal`, or `cert-manager.certificate.revocation` |
+| Application | `cert-manager.application` | The application's ID | `cert-manager.application.certificate.expiry`, `cert-manager.application.certificate.issuance`, `cert-manager.application.certificate.renewal`, or `cert-manager.application.certificate.revocation` |
+| Signer certificate expiration | `cert-manager.signer` | Leave out | `cert-manager.signer.certificate.expiry` |
+
+To find an application's ID, call [the list applications endpoint](/api-reference/endpoints/pki/applications/configuration/list).
+
+For a full request, see the API tab in the [email](/documentation/platform/pki/applications/alerting/email-alerts), [Slack](/documentation/platform/pki/applications/alerting/slack-alerts), [PagerDuty](/documentation/platform/pki/applications/alerting/pagerduty-alerts), or [webhook](/documentation/platform/pki/applications/alerting/webhook-alerts) guide.
+
+### Expiration and filter settings
+
+The `condition` object holds the same settings as the **Alert Before** field, the **Repeat daily until expiry** toggle, and the **Filters** step in Infisical:
+
+| Field | Applies to | Value |
+| --- | --- | --- |
+| `alertBefore` | Expiration alerts (required) | A number and a unit, such as `30d` or `2w`, up to 365 days |
+| `dailyReminder` | Expiration alerts | `true` to [repeat the alert every day](#how-often-expiration-alerts-repeat) until the certificate expires |
+| `applicationIds` | Certificate Management alerts | Up to 100 application IDs |
+| `profileIds` | Certificate Management alerts | Up to 100 certificate profile IDs |
+| `sources` | Certificate Management alerts | Any of `issued` (**Managed** in Infisical), `imported`, and `discovered` |
+| `signerIds` | Signer certificate expiration alerts | Up to 100 signer IDs |
+
+For issuance, renewal, and revocation alerts on an application, leave out `condition`.
diff --git a/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
index a3ac63c329..3bce752871 100644
--- a/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/pagerduty-alerts.mdx
@@ -4,7 +4,8 @@ sidebarTitle: "PagerDuty"
description: "Create PagerDuty incidents for certificate alerts."
---
-import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
+import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
+import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
A PagerDuty channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) creates PagerDuty incidents through the [Events API v2](https://developer.pagerduty.com/docs/events-api-v2-overview), so your on-call team gets paged when certificates are about to expire or are revoked.
@@ -39,23 +40,98 @@ A PagerDuty channel on a certificate [alert](/documentation/platform/pki/applica
</Step>
</Steps>
-## Step 2: Start an alert
-
-<StartAlert />
-
-## Step 3: Add the PagerDuty channel
-
-<Steps>
- <Step>
- Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test event to the PagerDuty service.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
-</Steps>
+## Step 2: Create the alert
+
+<Tabs>
+ <Tab title="Certificate Management">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartCertManagementAlert />
+
+ On the **Channels** step, add the PagerDuty channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test event to the PagerDuty service.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `pagerduty` channel, and set `integrationKey` in the channel's `config` to the key from [step 1](#step-1-get-a-pagerduty-integration-key). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "certificates-expiring-this-month",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "dailyReminder": true },
+ "channels": [
+ {
+ "name": "pki-on-call",
+ "channelType": "pagerduty",
+ "config": { "integrationKey": "<integration-key>" }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+ <Tab title="Application">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartApplicationAlert />
+
+ On the **Channels** step, add the PagerDuty channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **PagerDuty** and paste the key from [step 1](#step-1-get-a-pagerduty-integration-key) into **Integration key**.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test event to the PagerDuty service.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `pagerduty` channel, and set `integrationKey` in the channel's `config` to the key from [step 1](#step-1-get-a-pagerduty-integration-key). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-revocations",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.revocation",
+ "channels": [
+ {
+ "name": "payments-on-call",
+ "channelType": "pagerduty",
+ "config": { "integrationKey": "<integration-key>" }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+</Tabs>
<Check>
Your alert is set up. Infisical opens a PagerDuty incident whenever the alert fires.
diff --git a/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
index 03eeadb21d..79c76191b7 100644
--- a/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/slack-alerts.mdx
@@ -4,7 +4,8 @@ sidebarTitle: "Slack"
description: "Send certificate alert notifications to a Slack channel."
---
-import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
+import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
+import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
A Slack channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) posts to a Slack channel through an [Incoming Webhook](https://api.slack.com/messaging/webhooks) whenever the alert fires.
@@ -41,23 +42,98 @@ A Slack channel on a certificate [alert](/documentation/platform/pki/application
</Step>
</Steps>
-## Step 2: Start an alert
-
-<StartAlert />
-
-## Step 3: Add the Slack channel
-
-<Steps>
- <Step>
- Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test message to the Slack channel.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
-</Steps>
+## Step 2: Create the alert
+
+<Tabs>
+ <Tab title="Certificate Management">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartCertManagementAlert />
+
+ On the **Channels** step, add the Slack channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test message to the Slack channel.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `slack` channel, and set `webhookUrl` in the channel's `config` to the URL from [step 1](#step-1-create-a-slack-incoming-webhook). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "certificate-revocations",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.revocation",
+ "channels": [
+ {
+ "name": "pki-alerts",
+ "channelType": "slack",
+ "config": { "webhookUrl": "<slack-webhook-url>" }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+ <Tab title="Application">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartApplicationAlert />
+
+ On the **Channels** step, add the Slack channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Slack** and paste the URL from [step 1](#step-1-create-a-slack-incoming-webhook) into **Webhook URL**. The URL must start with `https://hooks.slack.com`.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test message to the Slack channel.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `slack` channel, and set `webhookUrl` in the channel's `config` to the URL from [step 1](#step-1-create-a-slack-incoming-webhook). To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api).
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-expiring",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.expiry",
+ "condition": { "alertBefore": "30d" },
+ "channels": [
+ {
+ "name": "payments-alerts",
+ "channelType": "slack",
+ "config": { "webhookUrl": "<slack-webhook-url>" }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+</Tabs>
<Check>
Your alert is set up. Infisical posts to the Slack channel whenever the alert fires.
diff --git a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
index d26b14de3f..b3a90eefc1 100644
--- a/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
+++ b/docs/documentation/platform/pki/applications/alerting/webhook-alerts.mdx
@@ -4,7 +4,8 @@ sidebarTitle: "Webhook"
description: "Send certificate alert notifications to a webhook URL."
---
-import StartAlert from "/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx";
+import StartApplicationAlert from "/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx";
+import StartCertManagementAlert from "/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx";
A webhook channel on a certificate [alert](/documentation/platform/pki/applications/alerting/overview) sends an HTTP POST request to your endpoint whenever the alert fires. Use a webhook to connect certificate alerts to your own systems or to services Infisical doesn't support directly.
@@ -17,32 +18,145 @@ A webhook channel on a certificate [alert](/documentation/platform/pki/applicati
- The Certificate Management **Admin** role to create a Certificate Management alert, or the **Admin** [application role](/documentation/platform/pki/applications/overview#application-roles) to create an application alert
- An HTTPS endpoint that accepts POST requests
-## Step 1: Start an alert
-
-<StartAlert />
-
-## Step 2: Add the webhook channel
-
-<Steps>
- <Step>
- Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
- </Step>
- <Step>
- If your endpoint requires authentication, under **Authentication**, select **Bearer Token**, **Basic Auth**, or **API Key**, and enter the [credentials](#authentication) it expects.
- </Step>
- <Step>
- Optionally, select **Add Signing Secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
- </Step>
- <Step>
- Optionally, select **Add Header** to send [custom headers](#custom-headers) with each request.
- </Step>
- <Step>
- Optionally, select **Send test** to send a test request to your endpoint.
- </Step>
- <Step>
- Select **Continue**, check the **Review** step, and select **Create Alert**.
- </Step>
-</Steps>
+## Create the alert
+
+<Tabs>
+ <Tab title="Certificate Management">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartCertManagementAlert />
+
+ On the **Channels** step, add the webhook channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
+ </Step>
+ <Step>
+ If your endpoint requires authentication, under **Authentication**, select **Bearer Token**, **Basic Auth**, or **API Key**, and enter the [credentials](#authentication) it expects.
+ </Step>
+ <Step>
+ Optionally, select **Add Signing Secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
+ </Step>
+ <Step>
+ Optionally, select **Add Header** to send [custom headers](#custom-headers) with each request.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test request to your endpoint.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `webhook` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api). The channel's `config` takes these fields:
+
+ | Field | Value |
+ | --- | --- |
+ | `url` (required) | Your endpoint's HTTPS URL |
+ | `authType` | `bearer` (**Bearer Token**), `basic` (**Basic Auth**), or `header` (**API Key**), for [authentication](#authentication) |
+ | `authCredentials` | The token, if `authType` is `bearer` |
+ | `basicUsername`, `basicPassword` | The username and password, if `authType` is `basic` |
+ | `authHeaderName`, `authHeaderValue` | The header name and the API key, if `authType` is `header` |
+ | `signingSecret` | A secret to [sign each request](#verify-the-signature) with |
+ | `headers` | [Custom headers](#custom-headers), as an array of `{ "key": "<name>", "value": "<value>" }` objects |
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "imported-certificates-expiring",
+ "resourceType": "cert-manager",
+ "eventType": "cert-manager.certificate.expiry",
+ "condition": { "alertBefore": "30d", "sources": ["imported"] },
+ "channels": [
+ {
+ "name": "certificate-inventory",
+ "channelType": "webhook",
+ "config": {
+ "url": "https://alerts.example.com/infisical",
+ "authType": "bearer",
+ "authCredentials": "<token>",
+ "signingSecret": "<signing-secret>"
+ }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+ <Tab title="Application">
+ <Tabs>
+ <Tab title="Infisical UI">
+ <StartApplicationAlert />
+
+ On the **Channels** step, add the webhook channel:
+
+ <Steps>
+ <Step>
+ Select **Add Channel** > **Webhook** and enter your endpoint's **URL**. The URL must use HTTPS.
+ </Step>
+ <Step>
+ If your endpoint requires authentication, under **Authentication**, select **Bearer Token**, **Basic Auth**, or **API Key**, and enter the [credentials](#authentication) it expects.
+ </Step>
+ <Step>
+ Optionally, select **Add Signing Secret** and enter a secret, so your endpoint can [verify the signature](#verify-the-signature) of each request.
+ </Step>
+ <Step>
+ Optionally, select **Add Header** to send [custom headers](#custom-headers) with each request.
+ </Step>
+ <Step>
+ Optionally, select **Send test** to send a test request to your endpoint.
+ </Step>
+ <Step>
+ Select **Continue**, check the **Review** step, and select **Create Alert**.
+ </Step>
+ </Steps>
+ </Tab>
+ <Tab title="API">
+ Send a request to the create alert endpoint with a `webhook` channel. To choose the alert's event and settings, see [Create an alert through the API](/documentation/platform/pki/applications/alerting/overview#create-an-alert-through-the-api). The channel's `config` takes these fields:
+
+ | Field | Value |
+ | --- | --- |
+ | `url` (required) | Your endpoint's HTTPS URL |
+ | `authType` | `bearer` (**Bearer Token**), `basic` (**Basic Auth**), or `header` (**API Key**), for [authentication](#authentication) |
+ | `authCredentials` | The token, if `authType` is `bearer` |
+ | `basicUsername`, `basicPassword` | The username and password, if `authType` is `basic` |
+ | `authHeaderName`, `authHeaderValue` | The header name and the API key, if `authType` is `header` |
+ | `signingSecret` | A secret to [sign each request](#verify-the-signature) with |
+ | `headers` | [Custom headers](#custom-headers), as an array of `{ "key": "<name>", "value": "<value>" }` objects |
+
+ ```bash Request
+ curl --request POST \
+ --url https://app.infisical.com/api/v1/alerts \
+ --header 'Authorization: Bearer <access-token>' \
+ --header 'Content-Type: application/json' \
+ --data '{
+ "name": "payments-api-renewals",
+ "resourceType": "cert-manager.application",
+ "resourceId": "<application-id>",
+ "eventType": "cert-manager.application.certificate.renewal",
+ "channels": [
+ {
+ "name": "payments-deploy-hook",
+ "channelType": "webhook",
+ "config": {
+ "url": "https://deploy.example.com/hooks/certificate-renewed",
+ "signingSecret": "<signing-secret>",
+ "headers": [{ "key": "X-Env", "value": "production" }]
+ }
+ }
+ ]
+ }'
+ ```
+ </Tab>
+ </Tabs>
+ </Tab>
+</Tabs>
<Check>
Your alert is set up. Infisical sends a POST request to your endpoint whenever the alert fires.
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx
deleted file mode 100644
index b0fd62d4a5..0000000000
--- a/docs/snippets/documentation/platform/pki/applications/alerting/start-alert.mdx
+++ /dev/null
@@ -1,54 +0,0 @@
-<Tabs>
- <Tab title="Certificate Management">
- <Steps>
- <Step>
- Go to **Certificate Manager** > **Settings** and select the **Alerts** tab, then select **Create Alert**.
- </Step>
- <Step>
- Select the **Alert Type** from the **Certificate Lifecycle** or **Code Signing** group, then enter an **Alert Name** and an optional **Description**.
- </Step>
- <Step>
- For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
-
- <Note>
- To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
- </Note>
-
- Select **Continue**.
- </Step>
- <Step>
- On the **Filters** step, optionally select **Add Filter** to [narrow the certificates the alert covers](/documentation/platform/pki/applications/alerting/overview#filter-a-certificate-management-alert). A signer certificate expiration alert skips this step.
-
- Select **Continue** to go to the **Channels** step.
- </Step>
- </Steps>
- </Tab>
- <Tab title="Application">
- <Steps>
- <Step>
- Go to **Certificate Manager** > **Applications** and select your application.
- </Step>
- <Step>
- Select the **Settings** tab, then select **Create Alert** in the **Alerts** section.
- </Step>
- <Step>
- Select the **Alert Type**, then enter an **Alert Name** and an optional **Description**.
- </Step>
- <Step>
- For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
-
- <Note>
- To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
- </Note>
-
- Select **Continue** to go to the **Channels** step.
- </Step>
- </Steps>
-
- An application can have one alert for each event. To notify more places about the same event, add more channels to that alert.
- </Tab>
-</Tabs>
-
-<Tip>
-To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
-</Tip>
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx
new file mode 100644
index 0000000000..07f6fb90ed
--- /dev/null
+++ b/docs/snippets/documentation/platform/pki/applications/alerting/start-application-alert.mdx
@@ -0,0 +1,26 @@
+<Steps>
+ <Step>
+ Go to **Certificate Manager** > **Applications** and select your application.
+ </Step>
+ <Step>
+ Select the **Settings** tab, then select **Create Alert** in the **Alerts** section.
+ </Step>
+ <Step>
+ Select the **Alert Type**, then enter an **Alert Name** and an optional **Description**.
+ </Step>
+ <Step>
+ For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
+
+ <Note>
+ To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
+ </Note>
+
+ Select **Continue** to go to the **Channels** step.
+ </Step>
+</Steps>
+
+An application can have one alert for each event. To notify more places about the same event, add more channels to that alert.
+
+<Tip>
+To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
+</Tip>
diff --git a/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx b/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx
new file mode 100644
index 0000000000..6d9840e9cf
--- /dev/null
+++ b/docs/snippets/documentation/platform/pki/applications/alerting/start-cert-management-alert.mdx
@@ -0,0 +1,26 @@
+<Steps>
+ <Step>
+ Go to **Certificate Manager** > **Settings** and select the **Alerts** tab, then select **Create Alert**.
+ </Step>
+ <Step>
+ Select the **Alert Type** from the **Certificate Lifecycle** or **Code Signing** group, then enter an **Alert Name** and an optional **Description**.
+ </Step>
+ <Step>
+ For an expiration alert, enter **Alert Before** as a number and a unit. For example: `30d` or `2w`, up to 365 days.
+
+ <Note>
+ To get a reminder every day, turn on **Repeat daily until expiry**. Otherwise, the alert repeats on a [schedule based on **Alert Before**](/documentation/platform/pki/applications/alerting/overview#how-often-expiration-alerts-repeat).
+ </Note>
+
+ Select **Continue**.
+ </Step>
+ <Step>
+ On the **Filters** step, optionally select **Add Filter** to [narrow the certificates the alert covers](/documentation/platform/pki/applications/alerting/overview#filter-a-certificate-management-alert). A signer certificate expiration alert skips this step.
+
+ Select **Continue** to go to the **Channels** step.
+ </Step>
+</Steps>
+
+<Tip>
+To add this channel to an existing alert instead, edit the alert and go to its **Channels** step.
+</Tip>