POST /orgs/{org}/campaigns
Create a campaign for an organization.
The authenticated user must be an owner or security manager for the organization to use this endpoint.
OAuth app tokens and personal access tokens (classic) need the security_events
scope to use this endpoint.
Fine-grained tokens must have the "Code scanning alerts" repository permissions (read) on all repositories included in the campaign.
Servers
- https://api.github.com
Path parameters
Name | Type | Required | Description |
---|---|---|---|
org |
String | Yes |
The organization name. The name is not case sensitive. |
Request headers
Name | Type | Required | Description |
---|---|---|---|
Content-Type |
String | Yes |
The media type of the request body.
Default value: "application/json" |
Request body fields
Name | Type | Required | Description |
---|---|---|---|
name |
String | Yes |
The name of the campaign |
managers[] |
Array | No |
The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied. |
description |
String | Yes |
A description for the campaign |
contact_link |
String | No |
The contact link of the campaign. Must be a URI. |
team_managers[] |
Array | No |
The slugs of the teams to set as the campaign managers. |
code_scanning_alerts[] |
Array | Yes |
The code scanning alerts to include in this campaign |
code_scanning_alerts[].alert_numbers[] |
Array | Yes |
The alert numbers |
code_scanning_alerts[].repository_id |
Integer | Yes |
The repository id |
ends_at |
String | Yes |
The end date and time of the campaign. The date must be in the future. |
generate_issues |
Boolean | No |
If true, will automatically generate issues for the campaign. The default is false. Default value: false |
How to start integrating
- Add HTTP Task to your workflow definition.
- Search for the API you want to integrate with and click on the name.
- This loads the API reference documentation and prepares the Http request settings.
- Click Test request to test run your request to the API and see the API's response.