Developer guide
This page is intentionally focused on platform API integration (not deployment): how to authenticate, call UmamiAI endpoints from your services, and validate everything with curl.
Prereqs
You need an UmamiAI deployment URL, an organization, and at least one published agent version. Integration uses an UmamiAI API key created in the console.
export BASE_URL="https://<your-domain>"
export UMAMI_API_KEY="umami_<your-key>"
export ORG_ID="<uuid>"
export AGENT_VERSION_ID="<uuid>"ORG_ID appears in the console URL (e.g. /org/<orgId>). Agent version IDs can be copied from the agent/version page URL.Downloads
These assets are generated for integration testing. Import into Postman or run from the terminal.
umami_... keys to browsers.openapi.json to generate clients or import into tools like Postman/Insomnia.Postman setup
- In Postman, click Import and import the collection JSON and the environment JSON from the Downloads section.
- Select the environment and set:
base_url,api_key,org_id,agent_version_id. - Run Create Agent Run. Copy the returned
run_idinto env varrun_id. - Run Get Agent Run until status becomes
succeededorfailed.
Authentication (API keys + scopes)
All Platform API calls use a Bearer token header:Authorization: Bearer umami_...
- Open Org → API Keys.
- Click Create key, choose scopes, and copy the key (shown once).
- Store it securely in your backend (never ship it to browsers).
runs:create, runs:read, kb:read. Use * for full access (recommended only for development).Agent runs API
Create a run, then poll until it completes.
curl -sS "$BASE_URL/api/v1/agent-runs" \
-X POST \
-H "Authorization: Bearer $UMAMI_API_KEY" \
-H "Content-Type: application/json" \
--data "{\"org_id\":\"$ORG_ID\",\"agent_version_id\":\"$AGENT_VERSION_ID\",\"input\":\"Draft a concise incident summary for leadership.\"}"run_id.export RUN_ID="<run_id_from_previous_step>"
curl -sS "$BASE_URL/api/v1/agent-runs/$RUN_ID" \
-H "Authorization: Bearer $UMAMI_API_KEY"while true; do
res=$(curl -sS "$BASE_URL/api/v1/agent-runs/$RUN_ID" -H "Authorization: Bearer $UMAMI_API_KEY");
status=$(echo "$res" | jq -r ".status");
echo "status=$status";
if [ "$status" = "succeeded" ] || [ "$status" = "failed" ]; then
echo "$res" | jq;
break;
fi;
sleep 2;
doneoutput. On failure, inspect error.Knowledge search API
Run similarity search over your org knowledge. The endpoint embeds your query server-side.
curl -sS "$BASE_URL/api/v1/knowledge/search" \
-X POST \
-H "Authorization: Bearer $UMAMI_API_KEY" \
-H "Content-Type: application/json" \
--data "{\"org_id\":\"$ORG_ID\",\"query\":\"What are our top failure modes?\",\"match_count\":6}" | jqmatches[] with fields: chunk_id, doc_id, content, score.OPENAI_API_KEY set.Receiving webhooks
Configure outbound webhooks in Org → Webhooks. UmamiAI delivers signed JSON POST requests. Verify the signature before trusting the payload.
X-Umami-Event— event nameX-Umami-Delivery— delivery UUIDX-Umami-Signature—sha256=<hex-hmac>
export WEBHOOK_SECRET="<your-webhook-secret>"
export WEBHOOK_URL="https://example.com/umamiai/webhook"
BODY='{"event":"agent_run.completed","org_id":"<org_id>","run_id":"<run_id>"}'
SIG=$(printf "%s" "$BODY" | openssl dgst -sha256 -hmac "$WEBHOOK_SECRET" | sed "s/^.* //")
curl -sS "$WEBHOOK_URL" \
-X POST \
-H "Content-Type: application/json" \
-H "X-Umami-Event: agent_run.completed" \
-H "X-Umami-Delivery: 00000000-0000-0000-0000-000000000000" \
-H "X-Umami-Signature: sha256=$SIG" \
--data "$BODY"Errors + status codes
401—missing_api_key/invalid_api_key403—insufficient_scopeor org mismatch400—invalid_request404—not_found
{ error: string }.Testing checklist
- Start with a key that has scopes
runs:create+runs:read. - Create a run and poll until
succeededorfailed. - Enable
kb:readonly if you need knowledge search. - Test webhook receiver signature verification locally using the openssl curl recipe above.