Skip to content
AM

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-ID when the token does not already resolve tenant context.
  • curl or another HTTP client.

Endpoint

The accounting API mounts GraphQL at:

https://api.inblack.app/graphql

Required headers for a JSON request:

Authorization: Bearer <token>
X-Tenant-ID: <tenant-id>
Content-Type: application/json

First query

Terminal window
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:

Terminal window
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

ServiceEndpoint shape
portal-apihttps://api.portal.inblack.app/graphql; REST under /api/...
accounting-apihttps://api.inblack.app/graphql
commerce-apihttps://api.commerce.inblack.app/graphql; REST under /api/v1/, /storefront/v1/, and /agentic/
customer360-apihttps://cx-api.inblack.app/graphql
studio-apihttps://api.studio.inblack.app/graphql; GitHub callback at /api/v1/webhooks/github
reporting-apihttps://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.