Hanzo
OpenapiAuthor

Enrols the caller's org in the author program at status "connected" and returns…

Enrols the caller's org in the author program at status "connected" and returns its enrolment, including the verify code the file method needs.

POST /v1/author/connect

Addresshttps://api.hanzo.ai/v1/author/connect
MethodPOST
Operationpost_author_connect
AuthAuthorization: Bearer $HANZO_API_KEY

Enrols the caller's org in the author program at status "connected" and returns its enrolment, including the verify code the file method needs. It is IDEMPOTENT: a second call returns the same enrolment rather than a conflict.

The forge login is taken from IAM's LINKED account for the provider when there is one — that is identity proof, not a claim — and only otherwise from the login in the body, which then has to be proven per repository. Connecting does not admit an org to earning: a platform reviewer approves that separately.

Answers 201 when it enrolled the org and 200 when it found an existing enrolment.

Request

3 fields, body application/json (required).

FieldInTypeRequiredDescription
githubLoginbodystringGithubLogin is the account to link.
loginbodystringLogin is the provider-neutral alias for GithubLogin, preferred when both are sent.
providerbodystringProvider is the forge to enrol with: github (the default) or gitlab.

Response

StatusBodyMeaning
200enrolmentok

200 body — 9 fields.

FieldInTypeAlwaysDescription
createdbodybooleanCreated reports whether this call enrolled the org (201) or found an existing enrolment (200).
githubLoginbodystringGithubLogin is the linked forge account.
idbodystringID is the author record's server-minted handle, "aut_"-prefixed.
shareBpsbodyintegerShareBps is this author's royalty share in basis points of the spend their deployed work generates.
statusbodystringStatus is connected, approved or suspended.
verifiedbodybooleanVerified reports whether any repository or owner claim has been proven yet.
verifyCodebodystringVerifyCode is this author's stable proof token — the value a repository's verify file must carry.
verifyFilebodystringVerifyFile is the repo-root file the file method reads, on the default branch.
verifySnippetbodystringVerifySnippet is that file's exact contents, ready to commit.

Failure carries the platform error shape — see Errors.

Examples

hanzo authors connect

Author API · All Hanzo APIs · Interactive reference

How is this guide?

On this page