Knowledge

Propose a knowledge backfill

Propose indexing the records that already exist in a scope (documents, meetings, email threads, tasks, decisions and more) so organizational knowledge can find them. Use after connecting a source or when setup status shows nothing indexed. It never pulls new data from a provider. Nothing is queued until the user approves the returned plan at reviewUrl. Send an Idempotency-Key header.

Method

POST

Path

/v1/knowledge/backfill

Required scope

changes:propose

Request

curl -X POST "https://api.endurancehq.app/v1/knowledge/backfill" \
  -H "Authorization: Bearer $EHQ_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"

JSON body schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "organizationId": {
      "description": "Index one organization. Use \"platform\" for the platform team.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "eventId": {
      "description": "Index one event.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "sourceTypes": {
      "description": "Limit to these source types, for example document, meeting or email_thread. Omit for every type.",
      "maxItems": 20,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      }
    }
  },
  "additionalProperties": false
}

Response

Success status: 201

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "planId": {
          "type": "string"
        },
        "title": {
          "type": "string"
        },
        "summary": {
          "type": "string"
        },
        "risk": {
          "type": "string",
          "enum": [
            "low",
            "medium",
            "high"
          ]
        },
        "fidelity": {
          "type": "string",
          "enum": [
            "kind_module",
            "raw_input"
          ]
        },
        "diff": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "field": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "label": {
                "type": "string"
              },
              "before": {},
              "after": {},
              "beforeText": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "afterText": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "field",
              "label",
              "before",
              "after",
              "beforeText",
              "afterText"
            ],
            "additionalProperties": false
          }
        },
        "effects": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "reviewHref": {
          "type": "string"
        },
        "expiresAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$"
        },
        "reviewUrl": {
          "type": "string"
        }
      },
      "required": [
        "planId",
        "title",
        "summary",
        "risk",
        "fidelity",
        "diff",
        "effects",
        "reviewHref",
        "expiresAt",
        "reviewUrl"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}

Other surfaces

MCP tool: ehq_knowledge_backfill_propose