post_v1_sync
Create declares a sync between two endpoints and returns it.
Create declares a sync between two endpoints and returns it. It is an UPSERT: re-declaring the same source and target updates that link rather than piling up duplicates, so a console that re-submits is safe. The org comes from the validated principal, never from the request, so a sync can only ever bind endpoints inside the caller's own org. A git source must be an https clone URL on the provider's own host with no embedded credentials; a target left empty is derived as a native repository named after the source. With run=true the first reconcile is queued in the background, so a large initial import never blocks this response.
| Tool | post_v1_sync |
| Door | https://api.hanzo.ai/v1/mcp |
| Method | tools/call (JSON-RPC 2.0) |
| Arguments | 7 |
| Operation | POST /v1/sync |
| Product | sync |
Arguments
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
actor | string | — | — | Actor is the identity the sync writes as, used as the loop guard so its own writes do not re-trigger it. Defaults to the deployment's GIT_SYNC_ACTOR. |
direction | string | — | — | Direction is both (the default), pull, push or off. |
kind | string | — | — | Kind is what is being synced. Only "git" today, which is also the default. |
run | boolean | — | — | Run reconciles once immediately after the upsert, in the background. |
source | endpointReq | — | — | Source is the upstream end. Required. |
target | endpointReq | — | — | Target is the downstream end. Optional for git: a native repository named after the source is derived when it is omitted. |
trigger | string | — | — | Trigger is what starts a reconcile: webhook (the default), poll or manual. |
This tool's schema does not declare which fields are required, nor any default, nor any enumerated value set. The columns above are empty because the door publishes nothing there, not because the answer is "none" — where a field is constrained, the constraint is stated in that field's own description.
Object types
endpointReq are objects this tool's fields refer to. Each is declared inside the tool's own schema.
endpointReq
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
connector | string | — | — | Connector names the stored credential to reach this endpoint with. |
locator | string | — | — | Locator addresses the resource. For a git source it is the https clone URL on the provider's own host, with no embedded credentials; for a native target it is the repository name. |
provider | string | — | — | Provider is the platform: github or gitlab for a source; a target defaults to the native Hanzo Git plane. |
Call it
A tools/call carries every argument in one flat object — nothing binds to a path or a query string. Every declared argument is shown, because the door marks none of them required.
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "post_v1_sync",
"arguments": {
"actor": "<actor>",
"direction": "<direction>",
"kind": "<kind>",
"run": false,
"source": {},
"target": {},
"trigger": "<trigger>"
}
}
}'Values are placeholders derived from each field's declared type. tools/list needs no credential; tools/call does — called without one the door answers HTTP 200 with a JSON-RPC result whose isError is set and whose text says what was missing. How to get a key →
The operation behind it
| Operation | Route | Product | Summary |
|---|---|---|---|
cloud_post_v1_sync | POST /v1/sync | sync | Create declares a sync between two endpoints and returns it. |
The same capability over plain HTTP is in the sync API reference, on https://api.hanzo.ai.
All 834 tools · The door · API reference
Generated from tools/list on https://api.hanzo.ai/v1/mcp — 834 tools captured 2026-08-01 (this build read the vendored copy; the door was unreachable).
How is this guide?