Developer Reference

API Documentation

Reference for the Sonu AI deployment webhook and account management endpoints.

Deployment Webhook

This endpoint accepts a signed GitHub push webhook and starts the server-side deployment script configured by DEPLOY_SCRIPT_PATH.

POSThttp://127.0.0.1/sonu_ai/webhooks/github/deploy

Required headers

HeaderDescription
X-GitHub-EventUse push for deployment.
X-Hub-Signature-256HMAC signature generated with the configured webhook secret.
Content-Typeapplication/json.

Only pushes to the configured deployment branch are accepted. The script path and shell command are never read from the request body.

POST http://127.0.0.1/sonu_ai/webhooks/github/deploy X-GitHub-Event: push X-Hub-Signature-256: sha256=<hmac-signature>

Account API

Account and API-key management endpoints are served by the Node backend.

MethodEndpointDescription
POST/auth/registerCreate a user account.
POST/auth/loginAuthenticate and receive a JWT.
GET/api/v1/keysList API keys.
POST/api/v1/keysCreate an API key.
DELETE/api/v1/keys/:idRevoke an API key.