Update a resource
Changes its title, its tags, or, for a text resource, its text. A new text, or a new title on a file, is re-indexed; the resource stays searchable on its current version meanwhile.
PATCH/v1/resources/{resource_id}
Requires resources:write.
Send at least one of title, tags, text or source.
tagsreplaces the whole list. An empty list clears the tags.textis only for text resources. On any other type it fails withinvalid_parameter.sourceis 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.
Authorizations
Authorizationbearerin headerrequiredPath parameters
resource_idstringrequiredpattern: ^res_[abcdefghjkmnpqrstuvwxyz23456789]{12}$Body
application/jsonrequiredtitlestringlength: 1–200 charstagsstring[]items: ≤ 30 itemsUp to 30 tags of 60 characters. An assistant can follow a tag to use every resource carrying it.
textstringlength: 1–100000 charsText resources only: the new text, which is re-indexed.
sourcestringlength: ≤ 500 charsWhere 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
Update a resource
dataobjectrequiredrequest_idstringrequiredPossible codes: invalid_request, unknown_field, invalid_parameter, invalid_cursor
errorobjectrequiredrequest_idstringrequiredPossible codes: authentication_required, invalid_api_key, api_key_expired, api_key_revoked, invalid_access_key
errorobjectrequiredrequest_idstringrequiredPossible codes: insufficient_scope, feature_not_available, admin_required, permission_denied
errorobjectrequiredrequest_idstringrequiredPossible codes: resource_not_found
errorobjectrequiredrequest_idstringrequiredPossible codes: conflict, assistant_has_no_resources
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large
errorobjectrequiredrequest_idstringrequiredPossible codes: request_too_large_for_plan
errorobjectrequiredrequest_idstringrequiredPossible codes: rate_limited
errorobjectrequiredrequest_idstringrequiredPossible codes: internal_error
errorobjectrequiredrequest_idstringrequired