Create Org Alert Policy

Create an alert policy. A repo label with the same name is created to scope the policy; repositories carrying that label are governed by the policy. Requires a token with org-wide repository access; repo-restricted tokens receive 403.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes:

  • alert-policy:create
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

The slug of the organization

Body Params
string
required

The policy name (1-120 characters). Also used as the name of the repo label that scopes the policy.

string | null

Operator-provided description (up to 256 characters).

repository_ids
array of strings | null

Repositories to scope the policy to.

repository_ids
string | null

Baseline rule bundle the policy starts from. One of: essential, balanced, comprehensive. Null for no baseline.

Responses

Language
Credentials
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json