---
title: "Change a source classification rule"
method: PATCH
path: "/api/mcp/projects/{projectId}/sources/rules/{ruleId}"
tags: ["Sources"]
---

# Change a source classification rule

`PATCH /api/mcp/projects/{projectId}/sources/rules/{ruleId}`

## Request

- Base URL: `https://app.searchable.com`
- URL: `https://app.searchable.com/api/mcp/projects/{projectId}/sources/rules/{ruleId}`
- Auth: HTTP bearer

Changes a rule's `citationType` (and `competitorId`); its scope never changes. A rule id that is not one of the project's returns 404 `not_found`. Refusals: 400 `invalid_citation_type`, `missing_competitor`, `unknown_competitor`. Requires the `source:classify` capability, and your own project role must allow managing the project (otherwise 403 `forbidden`). A pitch project that is not currently active refuses with 409 `INACTIVE_PITCH_PROMPT_MUTATION`. Numbers refresh within a few minutes: the answer carries `status.applying: true`, so poll `GET /projects/{projectId}/sources/rules` until `status.applying` is `false`.

## Path parameters

- `projectId` string, uuid, required
- `ruleId` string, required

## Request body

- SourceClassificationRulePatch
  - `citationType` 'brand' | 'competitor' | 'editorial' | 'social' | 'forum' | 'review' | 'institutional' | 'third_party' | 'other', required: A Source Type. `brand` is the app's Owned.
  - `competitorId` string, nullable: Required for a `competitor` rule; ignored for any other type.

## Response `200`

The rule was changed.

- SourceClassificationRuleChangeResponse: A saved rule change.
  - `rule` SourceClassificationRule, required
    - `id` string, required
    - `scope` string, required: The rule's scope as people read it, like `linkedin.com/help`.
    - `rootDomain` string, required
    - `host` string, nullable, required: The subdomain the rule covers; null for every host under `rootDomain`.
    - `pathPrefix` string, nullable, required: The path the rule covers; null for every path.
    - `citationType` 'brand' | 'competitor' | 'editorial' | 'social' | 'forum' | 'review' | 'institutional' | 'third_party' | 'other', required: A Source Type. `brand` is the app's Owned.
    - `competitorId` string, nullable, required
    - `competitorName` string, nullable, required
    - `createdBy` SourceClassificationPerson, required: A person named in the rules or their log.
      - `id` string, required
      - `name` string, nullable, required
    - `createdAt` string, date-time, required
    - `updatedAt` string, date-time, required
  - `removed` integer, required: Rules a removal deleted.
  - `impact` SourceClassificationImpact, required: What a rule change does to the citations already stored.
    - `rowsChanged` integer, required: Stored citations whose Source Type (or competitor) would change.
    - `answersChanged` integer, required: AI answers those citations belong to.
    - `transitions` object[], required: The moves from type to type, most citations first.
      - `from` 'brand' | 'competitor' | 'editorial' | 'social' | 'forum' | 'review' | 'institutional' | 'third_party' | 'other', required: A Source Type. `brand` is the app's Owned.
      - `to` 'brand' | 'competitor' | 'editorial' | 'social' | 'forum' | 'review' | 'institutional' | 'third_party' | 'other', required: A Source Type. `brand` is the app's Owned.
      - `rows` integer, required
  - `status` object, required
    - `rulesVersion` integer, required
    - `applying` boolean, required: True until the numbers have refreshed; poll `GET .../sources/rules` until it is false.
  - `success` boolean, required: Always `true` — injected on every success response by this endpoint family's response wrapper.

## Other responses

- `400`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `401`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `403`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `404`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `409`: Error response. `code` is the machine-readable reason — see the [error reference](/api/errors) for the full catalog and remediation per code.
- `429`: Rate limited. Usually the per-API-key REST limit (600 requests/minute); on Google-backed endpoints it can also relay an upstream Google rate limit. `Retry-After` (seconds) is present when the limit was applied by Searchable's own rate limiter; it may be absent when an upstream provider rate-limits.

## Changes

- **2026-11-03** `28a5e2a65cd3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/searchable/apis/searchable-rest-api/changes/api/mcp/projects/:projectId/sources/rules/:ruleId/patch.md)

---

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