PermuteDocs
Go to Permute

Facts · factsUpdate

Replace a fact

Replaces all editable fields. Omitted fields are cleared. Requires an organization-scoped request and fact write permission.

PUT/v1/facts/{factId}
betaapiKeyorganization

When to use

Replace an existing business rule.

For agents

Read first, then send every field you want to keep. Omitted editable fields are cleared.

Example

typescript
import { PermuteClient } from '@permute/sdk';

const orgClient = new PermuteClient({
  apiKey: process.env.PERMUTE_API_KEY!,
});

const result = await orgClient.facts.update('fact_revenue123', {
  "name": "Net revenue",
  "definition": "Revenue after returns",
  "formula": "revenue - returns",
  "formulaType": "math"
});

Request body

json
{
  "name": "Net revenue",
  "definition": "Revenue after returns",
  "formula": "revenue - returns",
  "formulaType": "math"
}

Response

json
{
  "data": {
    "id": "fact_revenue123",
    "organizationId": "org_acme123",
    "ownerId": "user_admin123",
    "key": "net_revenue",
    "name": "Net revenue",
    "type": "formula",
    "definition": "Revenue after returns",
    "formula": "revenue - returns",
    "formulaType": "math",
    "aliases": null,
    "usualValue": null,
    "usualValueMin": null,
    "usualValueMax": null,
    "unit": null,
    "startDate": null,
    "endDate": null,
    "scope": null,
    "metadata": null,
    "createdAt": "2026-09-10T12:00:00.000Z",
    "updatedAt": "2026-09-10T12:00:00.000Z"
  }
}