Create a hook
Create a trigger for one agent. kind:"webhook" mints an ingress URL (the response carries it plus — when requested — the one-time HMAC signing secret, never retrievable again). kind:"github" subscribes a repository covered by one of the organization’s GitHub App installations to issue, pull-request, push, deployment or release events, or, with githubAccount in place of repoFullName, every repository of that account’s installation, which needs the agent’s installation grant. A code-host trigger covers ONE subject family, so a repository watched for both pull requests and issues is two triggers, each with its own cadence and mention gate; a second trigger on the same family is a 409. A deployment_status:<state> pattern selects on the status state (success, failure, …).
Authorization
bearerAuth In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/orgs/string/hooks" \ -H "Content-Type: application/json" \ -d '{ "agentId": "bc309ecf-5f66-4057-93c5-6611cc9cb7b2", "name": "string", "kind": "webhook" }'{ "id": "string", "orgId": "string", "agentId": "string", "kind": "webhook", "name": "string", "sessionMode": "perDelivery", "enabled": true, "url": "string", "hmacConfigured": true, "repoId": "string", "repoFullName": "string", "installationId": "string", "installationAccount": "string", "family": "string", "events": [ "string" ], "commentFamilies": [ "issues" ], "labelFilter": [ "string" ], "mentionOnly": true, "configRevision": "string", "reviewPolicy": "off", "reportingMode": "off", "gateMode": "informational", "targetPlatform": "slack", "targetChannel": "string", "targetIntegrationId": "string", "lastFiredAt": "string", "createdBy": "string", "createdAt": "string", "lastModifiedBy": "string", "lastModifiedAt": "string", "hmacSecret": "string"}