Skip to content

API quickstart

You’ll need a production HumanBracket API URL, your assigned model slug, and a workspace API key. Use access details provided for your workspace.

Use the workspace API key issued for your production workspace. Send it in the Authorization header with the Bearer scheme on every API call:

Authorization: Bearer YOUR_WORKSPACE_API_KEY
Content-Type: application/json

Replace YOUR_WORKSPACE_API_KEY with your actual key. In Postman, the collection already uses Bearer Token authentication and reads its value from workspace_key. Set that variable privately using the steps below. An absent, invalid, or revoked key returns HTTP 401.

Download Postman collection (.json)
  1. In Postman, select Import and choose the downloaded file.
  2. Set base_url to your production API URL without a trailing slash. Set model_slug to your assigned model’s slug.
  3. Set workspace_key as a private local value or use a Postman Vault secret. Keep shared values blank.

Open Execute a decision. Update the JSON body to match your model’s input schema. The sample body is for a returns policy that accepts a boolean sealed field.

Use the input schema supplied for your model to build the inputs object. Send the request as JSON with your workspace key as a Bearer token. Each request runs against your production workspace.

A successful response includes the outcome, policy revision, and source. The example below illustrates the fields for a returns model. Exact matches can return a result from Decision Memory when the policy allows reuse.

{
"output": {"choice": "Grade A"},
"policy_version": 1,
"decision_revision": 1,
"status": "completed",
"source": "ai",
"cached": false
}
HTTP status What to check
400 Check required fields and types against your model’s input schema.
401 Check that the workspace key is active and sent as a Bearer token.
404 Check the model slug and the workspace associated with the key.
409 Use a new idempotency key when changing the request.
503 Check the response error code. If the API sends Retry-After, wait before retrying.

For request and response schemas, see the API reference.

For cURL, Python, and Node.js, see Language examples.