Create graphql

Runs one GraphQL request against the caller's org Base.

POST /v1/base/graphql

Addresshttps://api.hanzo.ai/v1/base/graphql
MethodPOST
Operationpost_base_graphql
AuthAuthorization: Bearer $HANZO_API_KEY

Runs one GraphQL request against the caller's org Base. Every field is answered by the Base's own record, aggregate and history routes as the caller, so what a field reads or writes is what the same request over /v1/base/collections may. No subscriptions: realtime is /v1/base/realtime.

Request

The document declares no body for POST /v1/base/graphql. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask MCP's describe for post_base_graphql, which answers from the running route.

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo base graphql create
import { Configuration, BaseApi } from 'hanzoai';

const api = new BaseApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postBaseGraphql();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BaseApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BaseApi(client).post_base_graphql()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

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

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

let result = base_api::post_base_graphql(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BaseApi;

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

var result = new BaseApi(client).postBaseGraphql();
curl -X POST https://api.hanzo.ai/v1/base/graphql \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches base through the base tool, which names its 3 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_base_bases"
         }
       }
     }'

Base API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.