---
title: "Queue a rule candidate found outside the review loop"
method: POST
path: "/v1/apps/{id}/rule-candidates"
tags: ["Apps"]
---

# Queue a rule candidate found outside the review loop

`POST /v1/apps/{id}/rule-candidates`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/apps/{id}/rule-candidates`
- Auth: HTTP bearer

For a miner that reads the registry or an ERP change log. The call is idempotent on `external_key`: re-submitting a key refreshes an `open` candidate's sentence, evidence and card (`created: false`), and refreshes only the evidence of a `promoted` or `dismissed` one, which keeps its decision. The candidate waits for a human; the call never changes the app's logic. When `proposed_card` is present, promotion drafts it as is. Requires the `configure` access tier on the app.

## Path parameters

- `id` string, uuid, required

## Request body

- AppRuleCandidateInput
  - `rule` string, required: The rule sentence the human approves or dismisses.
  - `external_key` string, required: Miner-stable id; the same key refreshes the existing candidate instead of adding a duplicate.
  - `source` 'registry' | 'erp' | 'both', required
  - `title` string, nullable
  - `evidence` object, nullable: Evidence for the reviewer: `support`, `counter`, `counter_names`, `items`, `repair`, `area`, `examples`, `counterexamples`, `changes`.
  - `proposed_card` object, nullable: An already-compiled rule card; promotion drafts it as is.

## Response `200`

The candidate and whether the call created it.

- object
  - `candidate` AppRuleCandidate
    - `id` string, uuid
    - `customer_id` string, uuid
    - `app_id` string, uuid
    - `source_review_id` string, uuid, nullable: The review whose feedback produced the candidate; null for mined candidates.
    - `correction` string: The rule sentence.
    - `source` 'review' | 'registry' | 'erp' | 'both'
    - `title` string, nullable
    - `evidence` object, nullable
    - `external_key` string, nullable
    - `created_by` string, nullable
    - `mined_by_app_id` string, uuid, nullable
    - `proposed_card` object, nullable
    - `evidence_lapsed` object, nullable: Set while the mining app's evidence no longer supports the rule: `since`, `reason` (`below_threshold`, `stale`, `timing`, `not_discriminating`), `status`, `detail`, and `kept`. Promotion refuses a lapsed candidate.
    - `state` 'open' | 'promoted' | 'dismissed'
    - `promoted_version` integer, nullable: The draft version the promotion landed in.
    - `created_at` string, date-time
    - `updated_at` string, date-time
  - `created` boolean

## Other responses

- `400`: The request is invalid.
- `401`: Missing or invalid API key.
- `403`: The API key does not have the required scope.
- `404`: The requested resource was not found.
- `429`: Daily rate limit exceeded.
- `501`: Rule candidates are not available in this deployment.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/apps/:id/rule-candidates/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
