> ## Documentation Index
> Fetch the complete documentation index at: https://omni.fireflo.au/llms.txt
> Use this file to discover all available pages before exploring further.

# PATCH /v1/agents/knowledge/sources/{source_id}

> Change a knowledge source: its text, pages, collection, or whether agents use it.

Changes a source. Only what the body gives changes. When what agents read changes, the source is read again (`processing`); moving it to another collection or switching it on or off doesn't need that.

<Note>Needs the `agents.knowledge:write` scope.</Note>

## Path parameters

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `source_id` | string | Yes | The source's id. |

## Body

| Field | Type | Required | Notes |
| :- | :- | :- | :- |
| `active` | boolean | No | Any source: whether agents use it. Off, they ignore it without it being deleted. |
| `collection` | integer | No | Any source: the collection it goes in. |
| `title` | string | No | Articles and FAQs: the title, or the question. Up to 200 characters. |
| `body` | string | No | Articles and FAQs: the text (up to 20,000 characters), or the answer (up to 2,000). |
| `alternates` | array | No | FAQs: up to 20 other ways customers ask. Replaces the ones it has. |
| `answer_exactly` | boolean | No | FAQs: send the answer exactly as written. |
| `pages` | array | No | Websites: which of its pages to read — at least one, up to 50, from the pages it has. |
| `refresh` | string | No | Websites: `never`, `daily` or `weekly`. |

## Request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH "https://api.fireflo.au/v1/agents/knowledge/sources/b7e4c1d2-5a3f-4e8b-9c6d-1a2f3e4b5c6d" \
    -H "Authorization: Bearer $OMNI_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "body": "Refunds reach your account 5–7 working days after we receive the item. UPI refunds usually arrive within 2 days."
    }'
  ```

  ```python Python theme={null}
  import os

  import requests

  response = requests.patch(
      "https://api.fireflo.au/v1/agents/knowledge/sources/b7e4c1d2-5a3f-4e8b-9c6d-1a2f3e4b5c6d",
      headers={"Authorization": f"Bearer {os.environ['OMNI_API_KEY']}"},
      json={
          "body": "Refunds reach your account 5–7 working days after we receive the item. UPI refunds usually arrive within 2 days."
      },
  )
  print(response.status_code, response.json())
  ```

  ```javascript Node theme={null}
  const response = await fetch("https://api.fireflo.au/v1/agents/knowledge/sources/b7e4c1d2-5a3f-4e8b-9c6d-1a2f3e4b5c6d", {
    method: "PATCH",
    headers: {
      Authorization: `Bearer ${process.env.OMNI_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "body": "Refunds reach your account 5–7 working days after we receive the item. UPI refunds usually arrive within 2 days."
    }),
  });
  console.log(response.status, await response.json());
  ```
</CodeGroup>

## Response

`200 OK` — the source as it is now. A source has its `id`, `kind` (`article`, `faq`, `file` or `website`), `title` (an FAQ's question), its `collection`, whether agents use it (`active`) and when it last changed. `status` is `processing` while it is read, then `ready` — or `failed`, with the reason in `error`. An article or FAQ has its `body`; a website its `url`, how often it is checked for changes (`refresh`) and how many `pages` it reads; a file its `file` type and size in bytes.

```json theme={null}
{
  "id": "b7e4c1d2-5a3f-4e8b-9c6d-1a2f3e4b5c6d",
  "kind": "faq",
  "title": "How long does a refund take?",
  "collection": {
    "id": 3,
    "name": "Returns & warranty"
  },
  "status": "processing",
  "error": "",
  "active": true,
  "updated_at": "2026-10-06T10:12:40+05:30",
  "body": "Refunds reach your account 5–7 working days after we receive the item. UPI refunds usually arrive within 2 days."
}
```

## Errors

Every refusal is `{"error": {"code", "message", "field"}}`; `field` is there when one input is at fault.

| Status | Error code | When |
| :- | :- | :- |
| 400 | `invalid_request` | A value isn't allowed — `field` names it. Also when the new title or question is already another source's. |
| 404 | `not_found` | No knowledge source of this account's has that id. |
| 404 | `module_off` | The account doesn't have AI agents on: they aren't in its plan, or are switched off for it. |
| 403 | `scope_missing` | The key doesn't have the `agents.knowledge:write` scope. |

Any request can also be refused for its key, its account or its rate (`key_required`, `invalid_key`, `account_suspended`, `plan_excludes_api`, `address_not_allowed`, `rate_limited`); see [the overview](/api-reference/overview).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.