Verify repos

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
repoUrlbodystring—RepoURL is what to claim: a repository (github.com/owner/name) or a whole OWNER (github.com/owner, no repository segment).

Response

StatusBodyMeaning
200author.claimok
defaultproblem-detailsrefused

200 body — 15 fields.

FieldInTypeAlwaysDescription
createdbodyboolean—Created reports whether this call recorded a new claim (201) or found an existing one (200).
orgbodyauthor.orgView—
org.badgeMarkdownbodystring—BadgeMarkdown 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 OWNER's template import rather than one repository's.
org.createdAtbodyinteger (int64)—CreatedAt is unix seconds when the owner claim was first recorded — equal to verifiedAt on the first proof, then fixed while verifiedAt moves.
org.methodbodystring—Method 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" — a hanzo.json on its default branch carried this author's verify code.
org.ownerUrlbodystring—OwnerURL is the claim key in canonical form — lowercased "host/owner" with NO repository segment, host ∈ {github.com, gitlab.com}.
org.verifiedbodyboolean—Verified reports that ownership of the WHOLE owner was proven — against that owner's ".github" control repository, which is exactly as strong as a per-repository claim.
org.verifiedAtbodyinteger (int64)—VerifiedAt is unix seconds of the most recent successful proof of the owner; re-verifying refreshes it, and the method beside it, in place.
repobodyauthor.authorRepo—
repo.badgeMarkdownbodystring—BadgeMarkdown 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 linking to the one-click import of this repository.
repo.createdAtbodyinteger (int64)—CreatedAt is unix seconds when the claim was first recorded.
repo.methodbodystring—Method 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 carried this author's verify code; or "maintainer" — the repository sits in a first-party namespace, where ownership is intrinsic and the treasury author holds it with no proof step.
repo.repoUrlbodystring—RepoURL is the claim key in canonical form — lowercased "host/owner/name", no scheme, no .git, host ∈ {github.com, gitlab.com}.
repo.verifiedbodyboolean—Verified reports that ownership was proven.
repo.verifiedAtbodyinteger (int64)—VerifiedAt is unix seconds of the most recent successful proof.

Failure carries the platform error shape — see Errors.

Examples

hanzo author repos verify
import { Configuration, AuthorApi } from 'hanzoai';

const api = new AuthorApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postAuthorReposVerify({ repoUrl: "<repoUrl>" });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AuthorApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AuthorApi(client).post_author_repos_verify(repo_url="<repoUrl>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.AuthorAPI.PostAuthorReposVerify(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, author_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = author_api::post_author_repos_verify(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AuthorApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new AuthorApi(client).postAuthorReposVerify();
curl -X POST https://api.hanzo.ai/v1/author/repos/verify \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "repoUrl": "<repoUrl>"
     }'

MCP reaches author through the author tool, which names its 5 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_authors"
         }
       }
     }'

Author API · All Hanzo APIs · Interactive reference

Was this page useful?