Edit File Text
PATCH
Saves a new version of a text File from content (the whole new text) or edits (exact old_text to new_text replacements, in order; each old_text must match one place). Needs edit access and the current revision. If people have it open, it lands live for them. Every Room with the File shows the new version.
header
AuthorizationBearer <token>A signed-in SMB user's access token. Workspace-scoped operations also require SMB-Workspace-Id.
file_id*stringStable File ID.
Match
^fil_[0-7][0-9A-HJKMNP-TV-Z]{25}$SMB-Workspace-Id*stringWorkspace where this operation runs. Required for user tokens and Workspace API keys.
Format
uuidIdempotency-Key*stringLength
8 <= length <= 200application/json- body
expected_revision?integerRange
1 <= valuecontent*stringThe whole new text, up to 1 MiB. Or use edits.
Length
1 <= length <= 1048576edits?array<>Applied in order. Copy old_text exactly, including spaces and line breaks.
Items
1 <= items <= 100summary?Summary2Optional: what changed, in a few words. Shown with the version and in Room activity.
Length
1 <= length <= 500Successful authorized response.
application/json- response
file*new_version*action_receipt*idempotent_replay*smb_v0_operations_create_list_request.__local.properties.body.__schema16request_id*stringcurl -X PATCH 'https://example.com/v1/files/string/content' \ -H 'SMB-Workspace-Id: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Idempotency-Key: stringst' \ -H 'Content-Type: application/json' \ -d '{ "expected_revision": 1}'{ "file": { "file_id": "string", "business_id": "string", "name": "string", "description": "string", "classification": "financial", "tags": [ "string" ], "origin": "upload", "lifecycle": "active", "current_version": { "file_version_id": "string", "version_number": 1, "content_type": "string", "size_bytes": 1, "sha256": "string", "processing_status": "pending_upload", "processing_error": "string", "summary": "string", "created_by": { "type": "person", "user_id": "string", "name": "string", "via": null }, "created_at": "2019-08-24T14:15:22Z", "ready_at": "2019-08-24T14:15:22Z", "protection": {}, "redacted_from": "string", "redacted_copy": "string" }, "revision": 1, "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "archived_at": "2019-08-24T14:15:22Z", "access_level": "view" }, "new_version": { "file_version_id": "string", "version_number": 1, "content_type": "string", "size_bytes": 1, "sha256": "string", "processing_status": "pending_upload", "processing_error": "string", "summary": "string", "created_by": { "type": "person", "user_id": "string", "name": "string", "via": null }, "created_at": "2019-08-24T14:15:22Z", "ready_at": "2019-08-24T14:15:22Z", "protection": {}, "redacted_from": "string", "redacted_copy": "string" }, "action_receipt": { "receipt_id": "64d0a161-468e-472a-b00e-a06ee9ab7de7", "command_id": "7d510d78-7444-4252-aeac-9e473949661e", "operation": "string", "workspace_id": "0967198e-ec7b-4c6b-b4d3-f71244cadbe9" }, "idempotent_replay": true, "request_id": "string"}