---
title: "POST /v1alpha/projects/{projectsId}/apps/{appsId}:generateAlertPolicy"
method: POST
path: "/v1alpha/projects/{projectsId}/apps/{appsId}:generateAlertPolicy"
tags: ["projects"]
---

# POST /v1alpha/projects/{projectsId}/apps/{appsId}:generateAlertPolicy

`POST /v1alpha/projects/{projectsId}/apps/{appsId}:generateAlertPolicy`

## Request

- Base URL: `https://firebasecrashlytics.googleapis.com`
- URL: `https://firebasecrashlytics.googleapis.com/v1alpha/projects/{projectsId}/apps/{appsId}:generateAlertPolicy`
- Auth: one of:
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/cloud-platform`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/cloud-platform`
  - OAuth 2 and OAuth 2
    - Implicit: `https://accounts.google.com/o/oauth2/auth`
    - Scopes: `https://www.googleapis.com/auth/firebase`
    - Authorization code: `https://accounts.google.com/o/oauth2/auth`
    - Token URL: `https://accounts.google.com/o/oauth2/token` scopes: `https://www.googleapis.com/auth/firebase`

Creates a Cloud Monitoring AlertPolicy for the requested Crashlytics Web alert type and returns the created resource reference.

## Path parameters

- `projectsId` string, required
- `appsId` string, required

## Query parameters

- `$.xgafv` '1' | '2'
- `access_token` string
- `alt` 'json' | 'media' | 'proto'
- `callback` string
- `fields` string
- `key` string
- `oauth_token` string
- `prettyPrint` boolean
- `quotaUser` string
- `uploadType` string
- `upload_protocol` string

## Request body

- GenerateAlertPolicyRequest: Request message for the GenerateAlertPolicy method.
  - `alertType` 'ALERT_TYPE_UNSPECIFIED' | 'ALERT_TYPE_NEW_ISSUE' | 'ALERT_TYPE_REGRESSED_ISSUE': Required. The type of alert to create.
  - `channelFormat` 'CHANNEL_FORMAT_UNSPECIFIED' | 'EMAIL' | 'INTEGRATION': Optional. Channel format to generate the alert policy for. `EMAIL` renders a rich HTML template (using `language`, defaulting to the requester's language preference), and `INTEGRATION` always uses en-US with a concise Markdown template. Defaults to EMAIL behavior when unspecified.
  - `language` 'USER_PREFERENCE' | 'EN_US': Optional. Language to use for the alert policy. Defaults to USER_PREFERENCE for `EMAIL` policies (can be set to `EN_US` for shared email channels such as PagerDuty email integrations). `INTEGRATION` policies always use `en-US`.

## Response `200`

Successful response

- GenerateAlertPolicyResponse: Response message for the GenerateAlertPolicy method.
  - `alertPolicy` string: The created Cloud Monitoring AlertPolicy resource name. Format: "projects/{project}/alertPolicies/{alert_policy_id}".

## Changes

- **2026-12-03** `b037c913ddb6`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/firebase` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/firebase` was removed from the endpoint's security scheme `Oauth2c`
- **2026-11-19** `c8ae6a84076b`: 4 info
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/cloud-platform` was added to the endpoint's security scheme `Oauth2c`
  - the security scope `https://www.googleapis.com/auth/firebase` was removed from the endpoint's security scheme `Oauth2`
  - the security scope `https://www.googleapis.com/auth/firebase` was removed from the endpoint's security scheme `Oauth2c`
- …earlier changes not shown

[Operation history](https://skmtc.dev/google/apis/firebasecrashlytics/changes/v1alpha/projects/:projectsId/apps/:appsId:generateAlertPolicy/post.md)

---

[API](https://skmtc.dev/google/apis/firebasecrashlytics.md) - [All operations](https://skmtc.dev/google/apis/firebasecrashlytics/llms.txt) - [OpenAPI document](https://skmtc.dev/google/apis/firebasecrashlytics/revisions/b037c913ddb6?raw)
