---
title: "Block Source Graph"
method: POST
path: "/extensions/roboledger/{graph_id}/operations/block-source-graph"
tags: ["RoboLedger: Report Distribution"]
---

# Block Source Graph

`POST /extensions/roboledger/{graph_id}/operations/block-source-graph`

## Request

- Base URL: `https://api.robosystems.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.robosystems.ai/extensions/roboledger/{graph_id}/operations/block-source-graph`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Bars a graph from sharing reports into this one. Subsequent `share-report` calls naming this graph fail for this target with an explicit error — blocked senders are told, not silently dropped. Idempotent: re-blocking preserves the original `blocked_at`. Set `purge` to also delete every report already shared in from that source, along with its fact sets and facts; reports this graph authored are never touched.

**Idempotency**: supply an `Idempotency-Key` header to make safe retries; replays within 24 hours return the same envelope. Reusing the key with a different body returns HTTP 409 Conflict.

## Path parameters

- `graph_id` string, required

## Headers

- `Idempotency-Key` string, nullable

## Request body

- BlockSourceGraphOperation: Bar a graph from sharing reports into this one.
  - `source_graph_id` string, required: Graph ID to block. Read it off the `source_graph_id` provenance field of a report that was shared to you.
  - `reason` string, nullable: Free-form note for your own records. Never disclosed to the sender.
  - `purge` boolean: Also delete every report already shared in from this source, with their fact sets and facts. Reports you authored are never touched.

## Response `200`

Successful Response

- OperationEnvelopeBlockSourceGraphResult
  - `operation` string, required: Kebab-case operation name
  - `operationId` string, required: op_-prefixed ULID for audit and SSE correlation
  - `status` 'completed' | 'pending' | 'failed', required: Operation lifecycle state
  - `result` BlockSourceGraphResult: Outcome of a block, including anything the purge removed.
    - `block` BlockedSourceGraphResponse, required: One blocked source graph.
      - `id` string, required: Block row identifier (ULID).
      - `source_graph_id` string, required: The blocked sender's graph ID.
      - `source_graph_name` string, nullable: Display name of the blocked graph (if known).
      - `blocked_by` string, required: User ID that created the block.
      - `blocked_at` string, date-time, required: When the block was created.
      - `reason` string, nullable: Recipient's own note, if given.
    - `already_blocked` boolean: True when the source was already blocked and this call was a no-op apart from any purge.
    - `purged_report_count` integer: Number of previously-shared reports deleted from this graph. Zero unless `purge` was set.
    - `purged_report_ids` string[]: Ids of the previously-shared reports deleted from this graph. Empty unless `purge` was set.
  - `at` string, required: ISO-8601 UTC timestamp
  - `createdBy` string, nullable: User ID that initiated the operation
  - `idempotentReplay` boolean: True when this envelope came from the idempotency cache — the underlying command did not execute again. False on fresh executions.

## Other responses

- `400`: Invalid request
- `401`: Authentication required
- `403`: Access denied
- `404`: Resource not found
- `409`: Idempotency-Key conflict — key reused with different body
- `422`: Validation error
- `429`: Rate limit exceeded
- `500`: Internal server error

---

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