Hanzo
OpenapiGit

Binds a Slack channel to a repo, so the lifecycle notifier posts that repo's…

Binds a Slack channel to a repo, so the lifecycle notifier posts that repo's push and deploy events there. Answers 201.

POST /v1/git/repos/{name}/subscriptions

Addresshttps://api.hanzo.ai/v1/git/repos/{name}/subscriptions
MethodPOST
Operationpost_git_repos_by_name_subscriptions
AuthAuthorization: Bearer $HANZO_API_KEY

Binds a Slack channel to a repo, so the lifecycle notifier posts that repo's push and deploy events there. Answers 201. The same channel twice on one repo is a 409; a repo outside the caller's scope is a 404, exactly as reading it is.

Request

4 fields, body application/json (required).

FieldInTypeRequiredDescription
namepathstringyesName is the repo to subscribe, from the :name path segment.
channelbodystringChannel is the Slack channel the notifier posts to — an id (C…/G…), a #name, or a bare name.
eventsbodystring[]Events narrows delivery to these lifecycle kinds (push.landed, deploy.live, deploy.failed).
namebodystringName is the repo to subscribe, from the :name path segment.

Response

StatusBodyMeaning
201subscriptionViewcreated

201 body — 5 fields.

FieldInTypeAlwaysDescription
channelbodystringChannel is the Slack channel id or name the notifier posts to.
createdAtbodystringCreatedAt is RFC 3339 UTC.
eventsbodystring[]Events is the kind filter; absent means every deliverable kind.
idbodystringID is the subscription's identifier ("sub_…"), the handle to delete it by.
repobodystringRepo is the repo whose lifecycle events are delivered.

Failure carries the platform error shape — see Errors.

Examples

hanzo git repos subscriptions create <name>

Git API · All Hanzo APIs · Interactive reference

How is this guide?

On this page