Last updated:

API reference

Canonical surface for entitled services: org API keys, POST /v1/commerce/execute, and POST /v1/mcp. Same outcome as upload in Orders.

Authentication

Org API key

Header: Authorization: Bearer ih_live_…. Create keys under Orders for buyer orgs. Prefer keys for server and agent traffic.

Session

Interactive browser sessions in Orders and Studio. Same org role checks as machine credentials.

curl -X POST https://api.intellihuman.ai/v1/commerce/execute \
  -H "authorization: Bearer ih_live_…" \
  -H "content-type: application/json" \
  -d '{ "service_slug": "telecom-billing-exception-audit", "inputs": [ … ] }'

Endpoints

POST/v1/org/api-keys

Create org API key

Issue a machine credential (ih_live_…). Store the secret once; only the prefix is retained server-side.

Auth: Session (org admin / operator)

Request

{
  "label": "production-orders"
}

Response

{
  "id": "…",
  "prefix": "ih_live_a1b2c3d4",
  "secret": "ih_live_a1b2c3d4.…",
  "created_at": "2026-11-18T18:00:00Z"
}
POST/v1/commerce/execute

Execute entitled service

Create an Order from an entitlement, normalize inputs, and optionally start the run. channel defaults to api. Returns 402 when no entitlement remains.

Auth: Bearer ih_live_… or session

Request

{
  "service_slug": "telecom-billing-exception-audit",
  "channel": "api",
  "idempotency_key": "run-2026-11-18-001",
  "start": true,
  "inputs": [
    {
      "filename": "carrier_invoices__cycles.csv",
      "mime_type": "text/csv",
      "content": "circuit_id,site,amount_usd,description\n…",
      "encoding": "utf8",
      "input_key": "carrier_invoices"
    },
    {
      "filename": "service_inventory__sites.csv",
      "mime_type": "text/csv",
      "content": "circuit_id,site,monthly_rate_usd,life_safety\n…",
      "encoding": "utf8",
      "input_key": "service_inventory"
    }
  ]
}

Response

{
  "order_id": "…",
  "run_id": "…",
  "entitlement_id": "…",
  "channel": "api",
  "normalize_meta": {
    "files": []
  }
}
POST/v1/mcp

MCP JSON-RPC

Model Context Protocol over HTTP. Methods: initialize, tools/list, tools/call. Tools: list_entitlements, execute_service, get_order, get_order_evidence.

Auth: Bearer ih_live_…

Request

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "execute_service",
    "arguments": {
      "service_slug": "telecom-billing-exception-audit",
      "inputs": [
        {
          "filename": "carrier_invoices__cycles.csv",
          "mime_type": "text/csv",
          "content": "…"
        }
      ]
    }
  }
}

Response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"order_id\":\"…\",\"run_id\":\"…\",\"entitlement_id\":\"…\",\"channel\":\"mcp\"}"
      }
    ]
  }
}

Common errors

CodeMeaning
402No remaining entitlement for this service / org
401Missing or invalid API key / session
403Org role not allowed for this route
409Idempotency or state conflict on the Order
422Intake/normalize failed — required fields missing

Execution spine

1

Entitlement

Purchase on Marketplace authorizes N executions of a service that stays defined.

2

Intake

upload | api | mcp | email | sftp — bytes arrive differently; worker does not branch on channel.

3

Normalize + run

Format adapters map vendor shapes to canonical fields; allowlisted tools execute.

4

Review → evidence → accept

Expert review when required. Buyer accepts. Proof exports from Orders.

Legacy — not Commerce

Decision-intelligence routes

Historical decision-engine paths such as POST /ask, case ingest, and workflow inference are a separate product layer. They are not the entitlement-backed Commerce Execution API used by Marketplace, Orders, and Studio. New integrations should use /v1/commerce/execute and /v1/mcp.

  • POST /ask — legacy query
  • Case / inference / audit export — legacy workflow layer
Developers overview

Ready to call execute?

Purchase a service, create an org API key in Orders, then POST /v1/commerce/execute or MCP tools/call.