Quickstart: HTTP API
Use the HTTP APIs for backend integrations, UI-equivalent service calls, read-heavy work, bulk work, and code-mode orchestration. If an agent needs to mutate customer-facing financial state, call the MCP tool instead.
Prerequisites
- A bearer token accepted by the target service.
- A tenant ID for
X-Tenant-IDwhen the token does not already resolve tenant context. curlor another HTTP client.
Endpoint
The accounting API mounts GraphQL at:
https://api.inblack.app/graphqlRequired headers for a JSON request:
Authorization: Bearer <token>X-Tenant-ID: <tenant-id>Content-Type: application/jsonFirst query
curl https://api.inblack.app/graphql \ -H "Authorization: Bearer <token>" \ -H "X-Tenant-ID: <tenant-id>" \ -H "Content-Type: application/json" \ -d '{ "query": "{ accounts { id code name type balance } }" }'The accounts field comes from the accounting GraphQL schema and returns the chart of accounts for the tenant.
Mutation example
Create a vendor through the service layer:
curl https://api.inblack.app/graphql \ -H "Authorization: Bearer <token>" \ -H "X-Tenant-ID: <tenant-id>" \ -H "Content-Type: application/json" \ -d '{ "query": "mutation($input: CreateVendorInput!) { createVendor(input: $input) { id displayName email } }", "variables": { "input": { "displayName": "Glowstack Polypro Supplier", "email": "ar@example.invalid" } } }'This API call writes immediately according to the service authorization path. If an agent is performing the same class of customer-facing business write and needs review semantics, use MCP. The catalog-backed agent tool is inblack_create_vendor; it is T3 and queues confirmation before execution.
Service map
| Service | Endpoint shape |
|---|---|
portal-api | https://api.portal.inblack.app/graphql; REST under /api/... |
accounting-api | https://api.inblack.app/graphql |
commerce-api | https://api.commerce.inblack.app/graphql; REST under /api/v1/, /storefront/v1/, and /agentic/ |
customer360-api | https://cx-api.inblack.app/graphql |
studio-api | https://api.studio.inblack.app/graphql; GitHub callback at /api/v1/webhooks/github |
reporting-api | https://api.reporting.inblack.app/api/v1/reporting/... |
Code-mode rule
Code-mode may consume APIs directly for read-heavy and bulk orchestration. It must call MCP from inside the code when it needs a customer-facing financial write such as a journal-entry post, refund, account adjustment, or book-affecting correction.