---
title: "Run Diagnose Api"
method: POST
path: "/diagnose"
tags: ["public-api"]
---

# Run Diagnose Api

`POST /diagnose`

## Request

- Base URL: `https://api.trakkr.ai`
- URL: `https://api.trakkr.ai/diagnose`
- Auth: HTTP bearer

Start a new diagnosis for a search query.

Queries AI models to analyze why your brand does or doesn't appear for
this query, then provides recommendations. Poll GET /diagnose?diagnosis_id=X
for results.

Subject to monthly usage limits based on your plan.

## Request body

- DiagnoseRunApiRequest: POST /diagnose request body.
  - `brand_id` string, uuid, required
  - `query` string, required: The search query to diagnose
  - `market_id` string, nullable: Exact brand market id. Null selects Global.
  - `idempotency_key` string, nullable: Stable key for retries, including after completion. If omitted, identical requests reuse an active run and start a new run after it finishes.

## Response `200`

Successful Response

- DiagnoseRunApiResponse: POST /diagnose response.
  - `diagnosis_id` string, required
  - `status` string
  - `message` string
  - `outcome` 'admitted' | 'existing'
  - `market_id` string, nullable
  - `market_scope` 'exact' | 'global'

## Other responses

- `401`: Missing, malformed, or expired credentials
- `402`: The current plan does not fund this operation
- `403`: Invalid credentials, missing brand access, or insufficient role
- `422`: Validation Error
- `429`: Rate limit exceeded
- `500`: The operation failed
- `503`: Authentication, entitlement, or a required dependency is temporarily unavailable

---

[API](https://skmtc.dev/trakkr/apis/trakkr-api.md) · [All operations](https://skmtc.dev/trakkr/apis/trakkr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/trakkr/apis/trakkr-api/revisions/189a9e76b8d5?raw)
