{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Create a campaign for an organization.\n\nThe authenticated user must be an owner or security manager for the organization to use this endpoint.\n\nOAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint.\n\nFine-grained tokens must have the \"Code scanning alerts\" repository permissions (read) on all repositories included\nin the campaign.","properties":{"path":{"type":"object","properties":{"org":{"type":"string","description":"The organization name. The name is not case sensitive."}},"required":["org"],"additionalProperties":false},"body":{"type":"object","additionalProperties":false,"properties":{"name":{"description":"The name of the campaign","type":"string","minLength":1,"maxLength":50},"description":{"description":"A description for the campaign","type":"string","minLength":1,"maxLength":255},"managers":{"description":"The logins of the users to set as the campaign managers. At this time, only a single manager can be supplied.","type":"array","maxItems":10,"items":{"description":"The login of each manager","type":"string"}},"team_managers":{"description":"The slugs of the teams to set as the campaign managers.","type":"array","maxItems":10,"items":{"description":"The slug of each team","type":"string"}},"ends_at":{"description":"The end date and time of the campaign. The date must be in the future.","type":"string","format":"date-time"},"contact_link":{"description":"The contact link of the campaign. Must be a URI.","type":["string","null"],"format":"uri"},"code_scanning_alerts":{"description":"The code scanning alerts to include in this campaign","type":["array","null"],"minItems":1,"items":{"type":"object","additionalProperties":false,"properties":{"repository_id":{"type":"integer","description":"The repository id"},"alert_numbers":{"type":"array","description":"The alert numbers","minItems":1,"items":{"type":"integer"}}},"required":["repository_id","alert_numbers"]}},"generate_issues":{"description":"If true, will automatically generate issues for the campaign. The default is false.","type":"boolean","default":false}},"required":["name","description","ends_at"],"oneOf":[{"required":["code_scanning_alerts"]},{"required":["secret_scanning_alerts"]}],"examples":[{"name":"Critical CodeQL alerts","description":"Address critical alerts before they are exploited to prevent breaches, protect sensitive data, and mitigate financial and reputational damage.","managers":["octocat"],"ends_at":"2024-03-14T00:00:00Z","code_scanning_alerts":[{"repository_id":1296269,"alert_numbers":[1,2]}]}]}},"required":["path","body"],"additionalProperties":false},"name":"Create a campaign for an organization","id":"github.campaigns.create-campaign","example":{"path":{"org":"example"},"body":{"name":"Critical CodeQL alerts","description":"Address critical alerts before they are exploited to prevent breaches, protect sensitive data, and mitigate financial and reputational damage.","managers":["octocat"],"ends_at":"2024-03-14T00:00:00Z","code_scanning_alerts":[{"repository_id":1296269,"alert_numbers":[1,2]}]}},"maxRequests":1,"summary":false}}