POST/github-apps

Create a GitHub app

Creates a GitHub app using its GitHub App and OAuth credentials. Supply name, html_url, app_id, installation_id, client_id, client_secret, and private_key_uuid; the remaining fields provide optional configuration. A 201 response returns the created app, including its generated identifiers and team association.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

13 body fields

GitHub app creation payload.

api_urlstringoptional
API URL for the GitHub app (e.g., https://api.github.com).
app_idintegerrequired
GitHub App ID from GitHub.
client_idstringrequired
GitHub OAuth App Client ID.
client_secretstringrequired
GitHub OAuth App Client Secret.
custom_portintegeroptional
Custom port for SSH access (default: 22).
custom_userstringoptional
Custom user for SSH access (default: git).
html_urlstringrequired
HTML URL for the GitHub app (e.g., https://github.com).
installation_idintegerrequired
GitHub Installation ID.
is_system_widebooleanoptional
Is this app system-wide (cloud only).
namestringrequired
Name of the GitHub app.
organizationstringoptional
Organization to associate the app with.
private_key_uuidstringrequired
UUID of an existing private key for GitHub App authentication.
webhook_secretstringoptional
Webhook secret for GitHub webhooks.

4 status codes
201Returns the created GitHub app, including its identifiers, configuration, and team association.
api_urlstringoptional
app_idintegeroptional
client_idstringoptional
custom_portintegeroptional
custom_userstringoptional
html_urlstringoptional
idintegeroptional
installation_idintegeroptional
is_system_widebooleanoptional
namestringoptional
organizationstringoptional
private_key_idintegeroptional
team_idintegeroptional
uuidstringoptional
400Returned when the token is invalid.
messagestringoptional
401Returned when the request is unauthenticated.
messagestringoptional
422Returned when the GitHub app payload fails validation.
errorsobjectoptional
messagestringoptional

Error handling

A 400 is returned for an invalid token; a 401 is returned when the request is unauthenticated; and a 422 is returned when the payload fails validation. name, html_url, app_id, installation_id, client_id, client_secret, and private_key_uuid are required.