Hanzo
OpenapiAuthor

Proves that the caller owns a repository — or a whole OWNER — and records the…

Proves that the caller owns a repository — or a whole OWNER — and records the claim, which is what makes deploys of that code earn royalty.

POST /v1/author/repos/verify

Addresshttps://api.hanzo.ai/v1/author/repos/verify
MethodPOST
Operationpost_author_repos_verify
AuthAuthorization: Bearer $HANZO_API_KEY

Proves that the caller owns a repository — or a whole OWNER — and records the claim, which is what makes deploys of that code earn royalty.

Ownership is proven the SAME two ways in both cases, tried in order: an IAM-linked forge token with admin or push permission, or a hanzo.json on the default branch carrying the author's verify code. Claiming an OWNER proves it against that owner's ".github" control repository, and is exactly as strong as a per-repository claim — an owner the caller cannot prove is refused with 422, never assumed.

A per-repository claim wins over an owner-wide one, so a specifically-claimed repository always earns for its own author. A repository another author has already verified is a 409. The org must have connected first.

Answers 201 when it recorded a new claim and 200 when the claim already existed.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
repoUrlbodystringRepoURL is what to claim: a repository (github.com/owner/name) or a whole OWNER (github.com/owner, no repository segment).

Response

StatusBodyMeaning
200claimok

200 body — 15 fields.

FieldInTypeAlwaysDescription
createdbodybooleanCreated reports whether this call recorded a new claim (201) or found an existing one (200).
orgbodyorgView
org.badgeMarkdownbodystringBadgeMarkdown is the ready-to-paste README snippet, DERIVED for each response from this deployment's badge host and never stored — here it deep-links the…
org.createdAtbodyintegerCreatedAt is unix seconds when the owner claim was first recorded — equal to verifiedAt on the first proof, then fixed while verifiedAt moves.
org.methodbodystringMethod is HOW the owner was proven, always against its ".github" control repository: "oauth" — an IAM-linked forge token showed admin or push on it; or "file"…
org.ownerUrlbodystringOwnerURL is the claim key in canonical form — lowercased "host/owner" with NO repository segment, host ∈ {github.com, gitlab.com}.
org.verifiedbodybooleanVerified reports that ownership of the WHOLE owner was proven — against that owner's ".github" control repository, which is exactly as strong as a…
org.verifiedAtbodyintegerVerifiedAt is unix seconds of the most recent successful proof of the owner; re-verifying refreshes it, and the method beside it, in place.
repobodyauthorRepo
repo.badgeMarkdownbodystringBadgeMarkdown is the ready-to-paste README snippet, DERIVED for each response from this deployment's badge host and never stored: a "Deploy on Hanzo" image…
repo.createdAtbodyintegerCreatedAt is unix seconds when the claim was first recorded.
repo.methodbodystringMethod is HOW ownership was proven: "oauth" — an IAM-linked forge token showed admin or push on the repository; "file" — a hanzo.json on the default branch…
repo.repoUrlbodystringRepoURL is the claim key in canonical form — lowercased "host/owner/name", no scheme, no .git, host ∈ {github.com, gitlab.com}.
repo.verifiedbodybooleanVerified reports that ownership was proven.
repo.verifiedAtbodyintegerVerifiedAt is unix seconds of the most recent successful proof.

Failure carries the platform error shape — see Errors.

Examples

hanzo authors repos verify

Author API · All Hanzo APIs · Interactive reference

How is this guide?

On this page