---
title: "Update a resource"
description: "Change a resource's title, tags or source, or the text of a text resource, which is then indexed again."
canonical: "https://lookio.app/docs/api/resources/update-resource"
updated: "2026-10-17"
---

# Update a resource

Requires `resources:write`.

Send at least one of `title`, `tags`, `text` or `source`.

- `tags` replaces the whole list. An empty list clears the tags.
- `text` is only for text resources. On any other type it fails with `invalid_parameter`.
- `source` is shown with every citation of the resource. An empty string clears it.

A new text, or a new title, is indexed again because the title is part of every passage. The resource stays searchable on its current version until the new one is ready.

A `PATCH` is not retried by the CLI after a server error. Read the resource before you try again.

```http
PATCH https://api.lookio.app/v1/resources/{resource_id}
```

## Authorizations

- `Authorization` (bearer, in header, required)

## Path parameters

- `resource_id` (`string`, required, pattern: `^res_[abcdefghjkmnpqrstuvwxyz23456789]{12}$`)

## Body

`application/json`, required

- `title` (`string`, length: `1–200 chars`)
- `tags` (`string[]`, items: `≤ 30 items`): Up to 30 tags of 60 characters. An assistant can follow a tag to use every resource carrying it.
- `text` (`string`, length: `1–100000 chars`): Text resources only: the new text, which is re-indexed.
- `source` (`string`, length: `≤ 500 chars`): Where this resource comes from, shown with every citation of it: a URL or a mention such as "Employee handbook, 2026 edition". Up to 500 characters; an empty string clears it.

## Response

**200**: Update a resource

- `data` (`object`, required)
- `data.id` (`string`, required, pattern: `^res_[abcdefghjkmnpqrstuvwxyz23456789]{12}$`)
- `data.title` (`string`, required)
- `data.type` (`enum<string>`, required, one of: `text, file, url, site`)
- `data.status` (`enum<string>`, required, one of: `queued, processing, ready, failed, stale, ready_simulated`): `queued` and `processing`: being read and indexed (pass `wait=true` or poll until it changes). `ready`: searchable. `failed`: see `status_detail`, then fix and call reindex.
- `data.status_detail` (`string,null`, required)
- `data.tags` (`string[]`, required)
- `data.source_url` (`string,null`, required): The page or site address, for `url` and `site` resources.
- `data.source` (`string,null`, required): Where it comes from, as shown with its citations.
- `data.site` (`object | null`, required): A site's page rules and schedule; null for other types.
- `data.site.rules` (`object`, required, default: `{"include":[],"exclude":[],"excluded_urls":[]}`)
- `data.site.rules.include` (`string[]`, required, default: `[]`, items: `≤ 50 items`): Path patterns to keep, such as `/docs/**`. `*` is one level, `**` everything below. Empty keeps the whole site.
- `data.site.rules.exclude` (`string[]`, required, default: `[]`, items: `≤ 50 items`): Path patterns to leave out, such as `/blog/**`.
- `data.site.rules.regex` (`string`, length: `≤ 500 chars`): Advanced: a regular expression on the path; matching pages are left out.
- `data.site.rules.excluded_urls` (`string[]`, required, default: `[]`, items: `≤ 5000 items`): Single pages to leave out, by full address.
- `data.site.schedule` (`string`, required, length: `≤ 40 chars`, pattern: `^(?:manual|daily|weekly|monthly|every_\d+_(?:day|days|week|weeks|month|months))$`): `manual` syncs only on request. Recurring schedules accept `daily`, `weekly`, `monthly`, or `every_N_days`, `every_N_weeks` and `every_N_months` (1-90 days, 1-52 weeks, 1-12 months). Recurring schedules require a paid plan.
- `data.site.last_synced_at` (`string,null`, required)
- `data.created_at` (`string`, required)
- `data.updated_at` (`string`, required)
- `request_id` (`string`, required)

```json
{
  "data": {
    "id": "res_thk6smb5nvts",
    "title": "Refund policy",
    "type": "text",
    "status": "ready",
    "status_detail": null,
    "tags": [
      "legal",
      "faq"
    ],
    "source_url": null,
    "source": "Employee handbook, 2026 edition",
    "site": null,
    "created_at": "2026-10-12T09:30:00.000Z",
    "updated_at": "2026-10-12T09:30:00.000Z"
  },
  "request_id": "req_01K9X7M2Q4"
}
```

**400**: Possible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**401**: Possible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**403**: Possible codes: insufficient_scope, feature_not_available, admin_required, permission_denied

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**404**: Possible codes: resource_not_found

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**409**: Possible codes: conflict, assistant_has_no_resources

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**413**: Possible codes: request_too_large

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**422**: Possible codes: request_too_large_for_plan

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**429**: Possible codes: rate_limited

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**500**: Possible codes: internal_error

- `error` (`object`, required)
- `error.type` (`string`, required)
- `error.code` (`string`, required)
- `error.message` (`string`, required)
- `error.param` (`string`)
- `error.docs_url` (`string`, required)
- `error.action_url` (`string<uri>`)
- `request_id` (`string`, required)

```json
{
  "error": {
    "type": "<string>",
    "code": "<string>",
    "message": "<string>",
    "param": "<string>",
    "docs_url": "<string>",
    "action_url": "<string>"
  },
  "request_id": "<string>"
}
```

**Example request**

```bash
curl --request PATCH \
  --url 'https://api.lookio.app/v1/resources/<resource_id>' \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "title": "<string>",
  "tags": [
    "<string>"
  ],
  "text": "<string>",
  "source": "<string>"
}'
```
