[{"data":1,"prerenderedAt":28},["ShallowReactive",2],{"$f1mictqoordyls":3},{"href":4,"title":5,"description":6,"kind":7,"mark":7,"planned":8,"contributors":9,"provenance":7,"html":10,"headings":11},"\u002Fdocs\u002Fapi","The API","The HTTP API behind the portal: what it is, how to call it, and what a token can reach.",null,false,[],"\u003Ch2 id=\"what-it-is\">What it is\u003C\u002Fh2>\n\u003Cp>Everything the portal does goes through the Zero Human OS API, and so can you: start a task from a deploy script,\nread what is blocked from a dashboard, answer a gate from another system. Its address is:\u003C\u002Fp>\n\u003Cpre>\u003Ccode>https:\u002F\u002Fapi.zerohuman.com\u002Fv1\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Every route starts with \u003Ccode>\u002Fv1\u003C\u002Fcode>. There is no other version.\u003C\u002Fp>\n\u003Ch2 id=\"your-first-call\">Your first call\u003C\u002Fh2>\n\u003Cp>Create a token under \u003Cstrong>Settings → API tokens\u003C\u002Fstrong> in the portal (\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fauthentication\">Authentication\u003C\u002Fa>), give it\nthe \u003Ccode>blockers:read\u003C\u002Fcode> scope, and ask what needs attention:\u003C\u002Fp>\n\u003Cpre>\u003Ccode class=\"language-bash\">curl -H &quot;Authorization: Bearer $ZEROHUMAN_TOKEN&quot; https:\u002F\u002Fapi.zerohuman.com\u002Fv1\u002Fblockers\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>A token acts for the enterprise it was created in, and only reaches what its scopes allow.\u003C\u002Fp>\n\u003Ch2 id=\"what-a-token-can-reach\">What a token can reach\u003C\u002Fh2>\n\u003Cp>Nearly all of it: tasks, runs, executions, gates, blockers, teams, members, roles, memory, spend, tools, webhooks\nand the rest, each behind its own scope (\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fendpoints\">Endpoints\u003C\u002Fa> lists every route). A few things are the\nportal's alone, because they belong to a person signed in, not to a credential:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>managing API tokens (no token can create, change or revoke tokens, whatever its scopes);\u003C\u002Fli>\n\u003Cli>signing in and out, the enterprises a person belongs to, and the people in an enterprise;\u003C\u002Fli>\n\u003Cli>connected apps and the consent screen.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"without-a-token\">Without a token\u003C\u002Fh2>\n\u003Cp>Two routes need no token at all:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Ccode>GET \u002Fv1\u002Fhealth\u003C\u002Fcode> answers whether the API is up, and which version it runs.\u003C\u002Fli>\n\u003Cli>The \u003Ca href=\"\u002Fdocs\u002Fapi\u002Fwebhooks\">webhooks\u003C\u002Fa>, which start a task or answer a gate, authenticate with your enterprise's\nwebhook secret instead.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Ch2 id=\"also-here\">Also here\u003C\u002Fh2>\n\u003Cul>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fauthentication\">Authentication\u003C\u002Fa>: tokens and scopes.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fconventions\">Conventions\u003C\u002Fa>: errors, pagination, and which calls are safe to retry.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fendpoints\">Endpoints\u003C\u002Fa>: every route, by resource, with the scope it needs.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fapi\u002Ftasks\">Tasks over the API\u003C\u002Fa>: create, change and start a task from code.\u003C\u002Fli>\n\u003Cli>\u003Ca href=\"\u002Fdocs\u002Fapi\u002Fwebhooks\">Webhooks\u003C\u002Fa>: start a run, or answer a gate, from another system.\u003C\u002Fli>\n\u003Cli>Agents that speak MCP can use the same API through your enterprise's \u003Ca href=\"\u002Fdocs\u002Fmcp\">MCP server\u003C\u002Fa>.\u003C\u002Fli>\n\u003C\u002Ful>\n",[12,16,19,22,25],{"id":13,"text":14,"level":15,"planned":8},"what-it-is","What it is",2,{"id":17,"text":18,"level":15,"planned":8},"your-first-call","Your first call",{"id":20,"text":21,"level":15,"planned":8},"what-a-token-can-reach","What a token can reach",{"id":23,"text":24,"level":15,"planned":8},"without-a-token","Without a token",{"id":26,"text":27,"level":15,"planned":8},"also-here","Also here",1791124519308]