@model-match/api 3.100.0 → 3.102.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/openapi.json CHANGED
@@ -27702,7 +27702,7 @@
27702
27702
  "File": {
27703
27703
  "properties": {
27704
27704
  "class": {
27705
- "description": "`standard` (the default) or `protected`. Protected files are not available yet.",
27705
+ "description": "`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation. Not every organization can create protected files yet (`protected_not_enabled`).",
27706
27706
  "enum": [
27707
27707
  "standard",
27708
27708
  "protected"
@@ -27826,17 +27826,106 @@
27826
27826
  ],
27827
27827
  "type": "object"
27828
27828
  },
27829
+ "FileAccessLogEntry": {
27830
+ "properties": {
27831
+ "actor": {
27832
+ "additionalProperties": {
27833
+ "nullable": true
27834
+ },
27835
+ "description": "Who: `userId`, `mode` (`user`, `agent`, `agent_with_user`, `system`), and the agent, chat, run and case when there was one.",
27836
+ "type": "object"
27837
+ },
27838
+ "app": {
27839
+ "nullable": true,
27840
+ "type": "string"
27841
+ },
27842
+ "event": {
27843
+ "description": "`viewed`, `download_minted`, `downloaded`, `shared`, `unshared`, `linked`, `unlinked`, `updated`, `class_raised`, `retention_changed`, `deleted`, `created`, `derived`, `revised`, `agent_approved`.",
27844
+ "type": "string"
27845
+ },
27846
+ "fileId": {
27847
+ "type": "string"
27848
+ },
27849
+ "fileName": {
27850
+ "nullable": true,
27851
+ "type": "string"
27852
+ },
27853
+ "id": {
27854
+ "type": "string"
27855
+ },
27856
+ "ip": {
27857
+ "nullable": true,
27858
+ "type": "string"
27859
+ },
27860
+ "occurredAt": {
27861
+ "type": "string"
27862
+ },
27863
+ "reason": {
27864
+ "description": "Why it was denied (`no_access`, `insufficient_role`, `agent_not_approved`, `human_required`, `share_scope`, `token_used`, `token_expired`, `token_revoked`), or a note on an allowed entry (`org_admin`).",
27865
+ "nullable": true,
27866
+ "type": "string"
27867
+ },
27868
+ "result": {
27869
+ "enum": [
27870
+ "allowed",
27871
+ "denied"
27872
+ ],
27873
+ "type": "string"
27874
+ },
27875
+ "userAgent": {
27876
+ "nullable": true,
27877
+ "type": "string"
27878
+ }
27879
+ },
27880
+ "required": [
27881
+ "id",
27882
+ "fileId",
27883
+ "fileName",
27884
+ "event",
27885
+ "result",
27886
+ "reason",
27887
+ "actor",
27888
+ "app",
27889
+ "ip",
27890
+ "userAgent",
27891
+ "occurredAt"
27892
+ ],
27893
+ "type": "object"
27894
+ },
27895
+ "FileAgentApprovalCreate": {
27896
+ "additionalProperties": false,
27897
+ "properties": {
27898
+ "chatId": {
27899
+ "description": "The conversation the agent may open it in.",
27900
+ "pattern": "^[A-Za-z0-9_.:-]{1,200}$",
27901
+ "type": "string"
27902
+ }
27903
+ },
27904
+ "required": [
27905
+ "chatId"
27906
+ ],
27907
+ "type": "object"
27908
+ },
27829
27909
  "FileCreate": {
27830
27910
  "additionalProperties": false,
27831
27911
  "properties": {
27832
27912
  "class": {
27833
- "description": "`standard` (the default) or `protected`. Protected files are not available yet.",
27913
+ "description": "`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation. Not every organization can create protected files yet (`protected_not_enabled`).",
27834
27914
  "enum": [
27835
27915
  "standard",
27836
27916
  "protected"
27837
27917
  ],
27838
27918
  "type": "string"
27839
27919
  },
27920
+ "derivedFrom": {
27921
+ "description": "Ids of the files this one was made from. If any is protected, the new file is protected too. You must be able to open each one.",
27922
+ "items": {
27923
+ "pattern": "^file_[0-9a-f]{32}$",
27924
+ "type": "string"
27925
+ },
27926
+ "maxItems": 20,
27927
+ "type": "array"
27928
+ },
27840
27929
  "kind": {
27841
27930
  "description": "Defaults from the type and extension.",
27842
27931
  "pattern": "^[a-z][a-z0-9_]{0,31}$",
@@ -27844,7 +27933,7 @@
27844
27933
  },
27845
27934
  "links": {
27846
27935
  "items": {
27847
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
27936
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
27848
27937
  "example": "ask_chat:chat_123",
27849
27938
  "maxLength": 220,
27850
27939
  "minLength": 3,
@@ -27907,7 +27996,7 @@
27907
27996
  "FileError": {
27908
27997
  "properties": {
27909
27998
  "code": {
27910
- "description": "Stable code: `not_found`, `forbidden`, `no_organization`, `unauthenticated`, `invalid_request`, `invalid_cursor`, `invalid_principal`, `principal_not_in_organization`, `invalid_link_target`, `link_target_not_supported`, `link_not_found`, `share_not_found`, `upload_missing`, `upload_rejected`, `size_mismatch`, `checksum_mismatch`, `not_ready`, `legal_hold`, `retention`, `protected_not_enabled`, `storage_unavailable`, `membership_unavailable`.",
27999
+ "description": "Stable code: `not_found`, `forbidden`, `no_organization`, `unauthenticated`, `invalid_request`, `invalid_cursor`, `invalid_principal`, `principal_not_in_organization`, `invalid_link_target`, `link_target_not_supported`, `link_not_found`, `share_not_found`, `upload_missing`, `upload_rejected`, `size_mismatch`, `checksum_mismatch`, `not_ready`, `legal_hold`, `retention`, `protected_not_enabled`, `protected_share_scope`, `agent_not_approved`, `human_required`, `not_protected`, `invalid_derived_from`, `malware`, `scan_failed`, `access_log_unavailable`, `scan_pending`, `revision_pending`, `storage_unavailable`, `membership_unavailable`.",
27911
28000
  "type": "string"
27912
28001
  },
27913
28002
  "error": {
@@ -27925,7 +28014,7 @@
27925
28014
  "additionalProperties": false,
27926
28015
  "properties": {
27927
28016
  "target": {
27928
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
28017
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
27929
28018
  "example": "ask_chat:chat_123",
27930
28019
  "maxLength": 220,
27931
28020
  "minLength": 3,
@@ -27941,12 +28030,16 @@
27941
28030
  "additionalProperties": false,
27942
28031
  "properties": {
27943
28032
  "class": {
27944
- "description": "Raise the class to protected. It can never be lowered.",
28033
+ "description": "Raise the class to protected (the owner only). It can never be lowered. Team and organization shares are removed.",
27945
28034
  "enum": [
27946
28035
  "protected"
27947
28036
  ],
27948
28037
  "type": "string"
27949
28038
  },
28039
+ "legalHold": {
28040
+ "description": "Put the file under a legal hold, or lift it (the owner or an organization admin). A file under a hold cannot be deleted.",
28041
+ "type": "boolean"
28042
+ },
27950
28043
  "metadata": {
27951
28044
  "additionalProperties": {
27952
28045
  "nullable": true
@@ -27957,6 +28050,12 @@
27957
28050
  "maxLength": 255,
27958
28051
  "minLength": 1,
27959
28052
  "type": "string"
28053
+ },
28054
+ "retainUntil": {
28055
+ "description": "Keep the file until this time (the owner or an organization admin); `null` clears it. The file cannot be deleted before then.",
28056
+ "format": "date-time",
28057
+ "nullable": true,
28058
+ "type": "string"
27960
28059
  }
27961
28060
  },
27962
28061
  "type": "object"
@@ -57540,7 +57639,7 @@
57540
57639
  "info": {
57541
57640
  "description": "ModelMatch API — mortgage and real-estate market data.\n\n## Bulk delivery limits\n\nThe `POST /{entity}/bulk-delivery` endpoints export a full result set to\nS3 as NDJSON, JSON, CSV, or Parquet.\n\n- **Up to 5,000 rows per delivery: no entitlement required.** Available to\n every authenticated caller.\n- **Above 5,000 rows: requires the entity's `bulk-delivery.{entity}`\n entitlement** (e.g. `bulk-delivery.loans`). The grant's scope sets your\n row ceiling and may also restrict which rows and fields you receive.\n\nA delivery that would exceed the limit available to you is rejected with\n`403 entitlement_missing`, reporting the matched row count and the ceiling\nthat applied. To stay under the limit, pass `limit` — the job then delivers\n(and bills for) only the first `limit` rows of a broader query.\n\n**Need a higher limit?** Email support@modelmatch.com to request the\nentitlement. Limits are raised per organization and per entity.\n\nBulk delivery is billed at 1 credit per delivered row whether or not\nan entitlement is held.\n\nInstead of a download, a delivery can be sent to a push target configured\non your workspace: pass `destination: { type: \"push-target\", targetId }`.\nThe same limits and billing apply.",
57542
57641
  "title": "ModelMatch API",
57543
- "version": "3.196.0"
57642
+ "version": "3.198.0"
57544
57643
  },
57545
57644
  "openapi": "3.1.0",
57546
57645
  "paths": {
@@ -83934,7 +84033,7 @@
83934
84033
  },
83935
84034
  "/v1/files": {
83936
84035
  "get": {
83937
- "description": "Files you own and files shared with you, newest first. Filter by origin, kind, class, status, what a file is linked to (`linkedTo`), or only files others shared with you (`sharedWithMe=true`). Pass `facets=true` for counts per origin and kind. Page with `cursor` (from `nextCursor`). Organization admins can pass `scope=org` to list every file in the organization. Free.",
84036
+ "description": "Files you own and files shared with you, newest first. Filter by origin, kind, class, status, what a file is linked to (`linkedTo`), or only files others shared with you (`sharedWithMe=true`). Pass `facets=true` for counts per origin and kind. Page with `cursor` (from `nextCursor`). Organization admins can pass `scope=org` to list every file in the organization. With `linkedTo=crm_record:<id>` you must be able to see that CRM record (otherwise 404); you then get every standard file linked to it, the protected files linked to it that you can open, and `hiddenProtectedCount` for the protected ones you cannot. Free.",
83938
84037
  "operationId": "listFiles",
83939
84038
  "parameters": [
83940
84039
  {
@@ -83980,12 +84079,12 @@
83980
84079
  }
83981
84080
  },
83982
84081
  {
83983
- "description": "`standard` (the default) or `protected`. Protected files are not available yet.",
84082
+ "description": "`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation. Not every organization can create protected files yet (`protected_not_enabled`).",
83984
84083
  "in": "query",
83985
84084
  "name": "class",
83986
84085
  "required": false,
83987
84086
  "schema": {
83988
- "description": "`standard` (the default) or `protected`. Protected files are not available yet.",
84087
+ "description": "`standard` (the default) or `protected`. A protected file is shared with named people only, opens through a one-time link, records every access in its access log, and an agent can open it only after the person approves it in that conversation. Not every organization can create protected files yet (`protected_not_enabled`).",
83989
84088
  "enum": [
83990
84089
  "standard",
83991
84090
  "protected"
@@ -84005,12 +84104,12 @@
84005
84104
  }
84006
84105
  },
84007
84106
  {
84008
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
84107
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
84009
84108
  "in": "query",
84010
84109
  "name": "linkedTo",
84011
84110
  "required": false,
84012
84111
  "schema": {
84013
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
84112
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
84014
84113
  "example": "ask_chat:chat_123",
84015
84114
  "maxLength": 220,
84016
84115
  "minLength": 3,
@@ -84118,6 +84217,10 @@
84118
84217
  ],
84119
84218
  "type": "object"
84120
84219
  },
84220
+ "hiddenProtectedCount": {
84221
+ "description": "Only when `linkedTo` is a CRM record: how many protected files are linked to it that you cannot open. Protected files are shared person by person; seeing the record does not open them.",
84222
+ "type": "integer"
84223
+ },
84121
84224
  "nextCursor": {
84122
84225
  "nullable": true,
84123
84226
  "type": "string"
@@ -84211,7 +84314,7 @@
84211
84314
  }
84212
84315
  }
84213
84316
  },
84214
- "description": "Storage unavailable"
84317
+ "description": "Storage or the access log unavailable"
84215
84318
  }
84216
84319
  },
84217
84320
  "summary": "Your files",
@@ -84369,7 +84472,7 @@
84369
84472
  }
84370
84473
  }
84371
84474
  },
84372
- "description": "Storage unavailable"
84475
+ "description": "Storage or the access log unavailable"
84373
84476
  }
84374
84477
  },
84375
84478
  "summary": "Start an upload",
@@ -84378,47 +84481,104 @@
84378
84481
  ]
84379
84482
  }
84380
84483
  },
84381
- "/v1/files/search": {
84484
+ "/v1/files/access-report": {
84382
84485
  "get": {
84383
- "description": "Files you can see whose name contains `q`, names that start with it first. Free.",
84384
- "operationId": "searchFiles",
84486
+ "description": "Organization admins: the access log across every protected file in the organization, newest first. Filter by file, person, event, result and time; pass `format=csv` for a spreadsheet. Free.",
84487
+ "operationId": "getFilesAccessReport",
84385
84488
  "parameters": [
84386
84489
  {
84387
84490
  "in": "query",
84388
- "name": "q",
84389
- "required": true,
84491
+ "name": "limit",
84492
+ "required": false,
84493
+ "schema": {
84494
+ "default": 100,
84495
+ "maximum": 500,
84496
+ "minimum": 1,
84497
+ "type": "integer"
84498
+ }
84499
+ },
84500
+ {
84501
+ "in": "query",
84502
+ "name": "cursor",
84503
+ "required": false,
84390
84504
  "schema": {
84391
84505
  "maxLength": 200,
84506
+ "type": "string"
84507
+ }
84508
+ },
84509
+ {
84510
+ "description": "The file's id.",
84511
+ "in": "query",
84512
+ "name": "fileId",
84513
+ "required": false,
84514
+ "schema": {
84515
+ "description": "The file's id.",
84516
+ "example": "file_3f2a…",
84517
+ "pattern": "^file_[0-9a-f]{32}$",
84518
+ "type": "string"
84519
+ }
84520
+ },
84521
+ {
84522
+ "in": "query",
84523
+ "name": "userId",
84524
+ "required": false,
84525
+ "schema": {
84526
+ "maxLength": 128,
84392
84527
  "minLength": 1,
84393
84528
  "type": "string"
84394
84529
  }
84395
84530
  },
84396
84531
  {
84397
84532
  "in": "query",
84398
- "name": "limit",
84533
+ "name": "event",
84399
84534
  "required": false,
84400
84535
  "schema": {
84401
- "default": 20,
84402
- "maximum": 50,
84403
- "minimum": 1,
84404
- "type": "integer"
84536
+ "pattern": "^[a-z_]{1,40}$",
84537
+ "type": "string"
84405
84538
  }
84406
84539
  },
84407
84540
  {
84408
84541
  "in": "query",
84409
- "name": "kind",
84542
+ "name": "result",
84410
84543
  "required": false,
84411
84544
  "schema": {
84412
- "maxLength": 512,
84545
+ "enum": [
84546
+ "allowed",
84547
+ "denied"
84548
+ ],
84413
84549
  "type": "string"
84414
84550
  }
84415
84551
  },
84416
84552
  {
84417
84553
  "in": "query",
84418
- "name": "origin",
84554
+ "name": "from",
84419
84555
  "required": false,
84420
84556
  "schema": {
84421
- "maxLength": 512,
84557
+ "format": "date-time",
84558
+ "type": "string"
84559
+ }
84560
+ },
84561
+ {
84562
+ "in": "query",
84563
+ "name": "to",
84564
+ "required": false,
84565
+ "schema": {
84566
+ "format": "date-time",
84567
+ "type": "string"
84568
+ }
84569
+ },
84570
+ {
84571
+ "description": "`csv` answers a spreadsheet of up to 10,000 entries.",
84572
+ "in": "query",
84573
+ "name": "format",
84574
+ "required": false,
84575
+ "schema": {
84576
+ "default": "json",
84577
+ "description": "`csv` answers a spreadsheet of up to 10,000 entries.",
84578
+ "enum": [
84579
+ "json",
84580
+ "csv"
84581
+ ],
84422
84582
  "type": "string"
84423
84583
  }
84424
84584
  }
@@ -84431,19 +84591,29 @@
84431
84591
  "properties": {
84432
84592
  "data": {
84433
84593
  "items": {
84434
- "$ref": "#/components/schemas/File"
84594
+ "$ref": "#/components/schemas/FileAccessLogEntry"
84435
84595
  },
84436
84596
  "type": "array"
84597
+ },
84598
+ "nextCursor": {
84599
+ "nullable": true,
84600
+ "type": "string"
84437
84601
  }
84438
84602
  },
84439
84603
  "required": [
84440
- "data"
84604
+ "data",
84605
+ "nextCursor"
84441
84606
  ],
84442
84607
  "type": "object"
84443
84608
  }
84609
+ },
84610
+ "text/csv": {
84611
+ "schema": {
84612
+ "type": "string"
84613
+ }
84444
84614
  }
84445
84615
  },
84446
- "description": "Matching files"
84616
+ "description": "Access log entries"
84447
84617
  },
84448
84618
  "400": {
84449
84619
  "content": {
@@ -84523,29 +84693,102 @@
84523
84693
  }
84524
84694
  }
84525
84695
  },
84526
- "description": "Storage unavailable"
84696
+ "description": "Storage or the access log unavailable"
84527
84697
  }
84528
84698
  },
84529
- "summary": "Search your files by name",
84699
+ "summary": "Who opened which protected files",
84530
84700
  "tags": [
84531
84701
  "Files"
84532
84702
  ]
84533
84703
  }
84534
84704
  },
84535
- "/v1/files/{id}": {
84536
- "delete": {
84537
- "description": "The owner or an organization admin can delete a file. Its contents are removed; a record that it existed is kept. Refused while a retention date or a legal hold applies. Data already loaded from the file elsewhere (a Studio table) is not deleted. Free.",
84538
- "operationId": "deleteFile",
84705
+ "/v1/files/d/{token}": {
84706
+ "get": {
84707
+ "description": "The link a protected file's content request hands out. It works once, within 5 minutes, needs no sign-in (the link itself is the permission) and redirects to a download that lasts at most a minute. A second use answers 410. Free.",
84708
+ "operationId": "redeemFileDownload",
84539
84709
  "parameters": [
84540
84710
  {
84541
- "description": "The file's id.",
84711
+ "description": "The one-time link's token.",
84542
84712
  "in": "path",
84543
- "name": "id",
84713
+ "name": "token",
84544
84714
  "required": true,
84545
84715
  "schema": {
84546
- "description": "The file's id.",
84547
- "example": "file_3f2a…",
84548
- "pattern": "^file_[0-9a-f]{32}$",
84716
+ "description": "The one-time link's token.",
84717
+ "maxLength": 100,
84718
+ "minLength": 1,
84719
+ "type": "string"
84720
+ }
84721
+ }
84722
+ ],
84723
+ "responses": {
84724
+ "302": {
84725
+ "description": "Redirect to the download",
84726
+ "headers": {
84727
+ "location": {
84728
+ "required": true,
84729
+ "schema": {
84730
+ "type": "string"
84731
+ }
84732
+ }
84733
+ }
84734
+ },
84735
+ "404": {
84736
+ "description": "No such link"
84737
+ },
84738
+ "410": {
84739
+ "description": "The link was already used or has expired"
84740
+ },
84741
+ "503": {
84742
+ "description": "Not available right now"
84743
+ }
84744
+ },
84745
+ "summary": "Open a protected file's one-time link",
84746
+ "tags": [
84747
+ "Files"
84748
+ ]
84749
+ }
84750
+ },
84751
+ "/v1/files/search": {
84752
+ "get": {
84753
+ "description": "Files you can see whose name contains `q`, names that start with it first. Free.",
84754
+ "operationId": "searchFiles",
84755
+ "parameters": [
84756
+ {
84757
+ "in": "query",
84758
+ "name": "q",
84759
+ "required": true,
84760
+ "schema": {
84761
+ "maxLength": 200,
84762
+ "minLength": 1,
84763
+ "type": "string"
84764
+ }
84765
+ },
84766
+ {
84767
+ "in": "query",
84768
+ "name": "limit",
84769
+ "required": false,
84770
+ "schema": {
84771
+ "default": 20,
84772
+ "maximum": 50,
84773
+ "minimum": 1,
84774
+ "type": "integer"
84775
+ }
84776
+ },
84777
+ {
84778
+ "in": "query",
84779
+ "name": "kind",
84780
+ "required": false,
84781
+ "schema": {
84782
+ "maxLength": 512,
84783
+ "type": "string"
84784
+ }
84785
+ },
84786
+ {
84787
+ "in": "query",
84788
+ "name": "origin",
84789
+ "required": false,
84790
+ "schema": {
84791
+ "maxLength": 512,
84549
84792
  "type": "string"
84550
84793
  }
84551
84794
  }
@@ -84557,22 +84800,10 @@
84557
84800
  "schema": {
84558
84801
  "properties": {
84559
84802
  "data": {
84560
- "properties": {
84561
- "deleted": {
84562
- "enum": [
84563
- true
84564
- ],
84565
- "type": "boolean"
84566
- },
84567
- "id": {
84568
- "type": "string"
84569
- }
84803
+ "items": {
84804
+ "$ref": "#/components/schemas/File"
84570
84805
  },
84571
- "required": [
84572
- "id",
84573
- "deleted"
84574
- ],
84575
- "type": "object"
84806
+ "type": "array"
84576
84807
  }
84577
84808
  },
84578
84809
  "required": [
@@ -84582,7 +84813,7 @@
84582
84813
  }
84583
84814
  }
84584
84815
  },
84585
- "description": "Deleted"
84816
+ "description": "Matching files"
84586
84817
  },
84587
84818
  "400": {
84588
84819
  "content": {
@@ -84662,7 +84893,146 @@
84662
84893
  }
84663
84894
  }
84664
84895
  },
84665
- "description": "Storage unavailable"
84896
+ "description": "Storage or the access log unavailable"
84897
+ }
84898
+ },
84899
+ "summary": "Search your files by name",
84900
+ "tags": [
84901
+ "Files"
84902
+ ]
84903
+ }
84904
+ },
84905
+ "/v1/files/{id}": {
84906
+ "delete": {
84907
+ "description": "The owner or an organization admin can delete a file. Its contents are removed; a record that it existed is kept. Refused while a retention date or a legal hold applies. Data already loaded from the file elsewhere (a Studio table) is not deleted. Free.",
84908
+ "operationId": "deleteFile",
84909
+ "parameters": [
84910
+ {
84911
+ "description": "The file's id.",
84912
+ "in": "path",
84913
+ "name": "id",
84914
+ "required": true,
84915
+ "schema": {
84916
+ "description": "The file's id.",
84917
+ "example": "file_3f2a…",
84918
+ "pattern": "^file_[0-9a-f]{32}$",
84919
+ "type": "string"
84920
+ }
84921
+ }
84922
+ ],
84923
+ "responses": {
84924
+ "200": {
84925
+ "content": {
84926
+ "application/json": {
84927
+ "schema": {
84928
+ "properties": {
84929
+ "data": {
84930
+ "properties": {
84931
+ "deleted": {
84932
+ "enum": [
84933
+ true
84934
+ ],
84935
+ "type": "boolean"
84936
+ },
84937
+ "id": {
84938
+ "type": "string"
84939
+ }
84940
+ },
84941
+ "required": [
84942
+ "id",
84943
+ "deleted"
84944
+ ],
84945
+ "type": "object"
84946
+ }
84947
+ },
84948
+ "required": [
84949
+ "data"
84950
+ ],
84951
+ "type": "object"
84952
+ }
84953
+ }
84954
+ },
84955
+ "description": "Deleted"
84956
+ },
84957
+ "400": {
84958
+ "content": {
84959
+ "application/json": {
84960
+ "schema": {
84961
+ "$ref": "#/components/schemas/FileError"
84962
+ }
84963
+ }
84964
+ },
84965
+ "description": "Invalid request"
84966
+ },
84967
+ "401": {
84968
+ "content": {
84969
+ "application/json": {
84970
+ "schema": {
84971
+ "$ref": "#/components/schemas/FileError"
84972
+ }
84973
+ }
84974
+ },
84975
+ "description": "Not signed in"
84976
+ },
84977
+ "403": {
84978
+ "content": {
84979
+ "application/json": {
84980
+ "schema": {
84981
+ "$ref": "#/components/schemas/FileError"
84982
+ }
84983
+ }
84984
+ },
84985
+ "description": "Not allowed"
84986
+ },
84987
+ "404": {
84988
+ "content": {
84989
+ "application/json": {
84990
+ "schema": {
84991
+ "$ref": "#/components/schemas/FileError"
84992
+ }
84993
+ }
84994
+ },
84995
+ "description": "No such file"
84996
+ },
84997
+ "409": {
84998
+ "content": {
84999
+ "application/json": {
85000
+ "schema": {
85001
+ "$ref": "#/components/schemas/FileError"
85002
+ }
85003
+ }
85004
+ },
85005
+ "description": "Conflicts with the file's state"
85006
+ },
85007
+ "422": {
85008
+ "content": {
85009
+ "application/json": {
85010
+ "schema": {
85011
+ "$ref": "#/components/schemas/FileError"
85012
+ }
85013
+ }
85014
+ },
85015
+ "description": "The upload did not match"
85016
+ },
85017
+ "502": {
85018
+ "content": {
85019
+ "application/json": {
85020
+ "schema": {
85021
+ "$ref": "#/components/schemas/FileError"
85022
+ }
85023
+ }
85024
+ },
85025
+ "description": "Could not check membership"
85026
+ },
85027
+ "503": {
85028
+ "content": {
85029
+ "application/json": {
85030
+ "schema": {
85031
+ "$ref": "#/components/schemas/FileError"
85032
+ }
85033
+ }
85034
+ },
85035
+ "description": "Storage or the access log unavailable"
84666
85036
  }
84667
85037
  },
84668
85038
  "summary": "Delete a file",
@@ -84799,7 +85169,7 @@
84799
85169
  }
84800
85170
  }
84801
85171
  },
84802
- "description": "Storage unavailable"
85172
+ "description": "Storage or the access log unavailable"
84803
85173
  }
84804
85174
  },
84805
85175
  "summary": "One file: its details, shares and links",
@@ -84931,7 +85301,7 @@
84931
85301
  }
84932
85302
  }
84933
85303
  },
84934
- "description": "Storage unavailable"
85304
+ "description": "Storage or the access log unavailable"
84935
85305
  }
84936
85306
  },
84937
85307
  "summary": "Rename a file or edit its metadata",
@@ -84940,6 +85310,312 @@
84940
85310
  ]
84941
85311
  }
84942
85312
  },
85313
+ "/v1/files/{id}/access-log": {
85314
+ "get": {
85315
+ "description": "Every access to a protected file, newest first: who opened, downloaded, shared or changed it, from which app, and every refused attempt. The owner and organization admins only. Free.",
85316
+ "operationId": "getFileAccessLog",
85317
+ "parameters": [
85318
+ {
85319
+ "description": "The file's id.",
85320
+ "in": "path",
85321
+ "name": "id",
85322
+ "required": true,
85323
+ "schema": {
85324
+ "description": "The file's id.",
85325
+ "example": "file_3f2a…",
85326
+ "pattern": "^file_[0-9a-f]{32}$",
85327
+ "type": "string"
85328
+ }
85329
+ },
85330
+ {
85331
+ "in": "query",
85332
+ "name": "limit",
85333
+ "required": false,
85334
+ "schema": {
85335
+ "default": 100,
85336
+ "maximum": 500,
85337
+ "minimum": 1,
85338
+ "type": "integer"
85339
+ }
85340
+ },
85341
+ {
85342
+ "in": "query",
85343
+ "name": "cursor",
85344
+ "required": false,
85345
+ "schema": {
85346
+ "maxLength": 200,
85347
+ "type": "string"
85348
+ }
85349
+ }
85350
+ ],
85351
+ "responses": {
85352
+ "200": {
85353
+ "content": {
85354
+ "application/json": {
85355
+ "schema": {
85356
+ "properties": {
85357
+ "data": {
85358
+ "items": {
85359
+ "$ref": "#/components/schemas/FileAccessLogEntry"
85360
+ },
85361
+ "type": "array"
85362
+ },
85363
+ "nextCursor": {
85364
+ "nullable": true,
85365
+ "type": "string"
85366
+ }
85367
+ },
85368
+ "required": [
85369
+ "data",
85370
+ "nextCursor"
85371
+ ],
85372
+ "type": "object"
85373
+ }
85374
+ }
85375
+ },
85376
+ "description": "Access log entries"
85377
+ },
85378
+ "400": {
85379
+ "content": {
85380
+ "application/json": {
85381
+ "schema": {
85382
+ "$ref": "#/components/schemas/FileError"
85383
+ }
85384
+ }
85385
+ },
85386
+ "description": "Invalid request"
85387
+ },
85388
+ "401": {
85389
+ "content": {
85390
+ "application/json": {
85391
+ "schema": {
85392
+ "$ref": "#/components/schemas/FileError"
85393
+ }
85394
+ }
85395
+ },
85396
+ "description": "Not signed in"
85397
+ },
85398
+ "403": {
85399
+ "content": {
85400
+ "application/json": {
85401
+ "schema": {
85402
+ "$ref": "#/components/schemas/FileError"
85403
+ }
85404
+ }
85405
+ },
85406
+ "description": "Not allowed"
85407
+ },
85408
+ "404": {
85409
+ "content": {
85410
+ "application/json": {
85411
+ "schema": {
85412
+ "$ref": "#/components/schemas/FileError"
85413
+ }
85414
+ }
85415
+ },
85416
+ "description": "No such file"
85417
+ },
85418
+ "409": {
85419
+ "content": {
85420
+ "application/json": {
85421
+ "schema": {
85422
+ "$ref": "#/components/schemas/FileError"
85423
+ }
85424
+ }
85425
+ },
85426
+ "description": "Conflicts with the file's state"
85427
+ },
85428
+ "422": {
85429
+ "content": {
85430
+ "application/json": {
85431
+ "schema": {
85432
+ "$ref": "#/components/schemas/FileError"
85433
+ }
85434
+ }
85435
+ },
85436
+ "description": "The upload did not match"
85437
+ },
85438
+ "502": {
85439
+ "content": {
85440
+ "application/json": {
85441
+ "schema": {
85442
+ "$ref": "#/components/schemas/FileError"
85443
+ }
85444
+ }
85445
+ },
85446
+ "description": "Could not check membership"
85447
+ },
85448
+ "503": {
85449
+ "content": {
85450
+ "application/json": {
85451
+ "schema": {
85452
+ "$ref": "#/components/schemas/FileError"
85453
+ }
85454
+ }
85455
+ },
85456
+ "description": "Storage or the access log unavailable"
85457
+ }
85458
+ },
85459
+ "summary": "A protected file's access log",
85460
+ "tags": [
85461
+ "Files"
85462
+ ]
85463
+ }
85464
+ },
85465
+ "/v1/files/{id}/agent-approvals": {
85466
+ "post": {
85467
+ "description": "You approve an agent to open this protected file in the conversation `chatId`, and nowhere else. Only you can approve, from your own session: an agent cannot approve itself. Each approval is recorded in the file's access log. Free.",
85468
+ "operationId": "approveFileForAgent",
85469
+ "parameters": [
85470
+ {
85471
+ "description": "The file's id.",
85472
+ "in": "path",
85473
+ "name": "id",
85474
+ "required": true,
85475
+ "schema": {
85476
+ "description": "The file's id.",
85477
+ "example": "file_3f2a…",
85478
+ "pattern": "^file_[0-9a-f]{32}$",
85479
+ "type": "string"
85480
+ }
85481
+ }
85482
+ ],
85483
+ "requestBody": {
85484
+ "content": {
85485
+ "application/json": {
85486
+ "schema": {
85487
+ "$ref": "#/components/schemas/FileAgentApprovalCreate"
85488
+ }
85489
+ }
85490
+ },
85491
+ "required": true
85492
+ },
85493
+ "responses": {
85494
+ "201": {
85495
+ "content": {
85496
+ "application/json": {
85497
+ "schema": {
85498
+ "properties": {
85499
+ "data": {
85500
+ "properties": {
85501
+ "approvedAt": {
85502
+ "type": "string"
85503
+ },
85504
+ "chatId": {
85505
+ "type": "string"
85506
+ },
85507
+ "fileId": {
85508
+ "type": "string"
85509
+ },
85510
+ "userId": {
85511
+ "type": "string"
85512
+ }
85513
+ },
85514
+ "required": [
85515
+ "fileId",
85516
+ "chatId",
85517
+ "userId",
85518
+ "approvedAt"
85519
+ ],
85520
+ "type": "object"
85521
+ }
85522
+ },
85523
+ "required": [
85524
+ "data"
85525
+ ],
85526
+ "type": "object"
85527
+ }
85528
+ }
85529
+ },
85530
+ "description": "Approved"
85531
+ },
85532
+ "400": {
85533
+ "content": {
85534
+ "application/json": {
85535
+ "schema": {
85536
+ "$ref": "#/components/schemas/FileError"
85537
+ }
85538
+ }
85539
+ },
85540
+ "description": "Invalid request"
85541
+ },
85542
+ "401": {
85543
+ "content": {
85544
+ "application/json": {
85545
+ "schema": {
85546
+ "$ref": "#/components/schemas/FileError"
85547
+ }
85548
+ }
85549
+ },
85550
+ "description": "Not signed in"
85551
+ },
85552
+ "403": {
85553
+ "content": {
85554
+ "application/json": {
85555
+ "schema": {
85556
+ "$ref": "#/components/schemas/FileError"
85557
+ }
85558
+ }
85559
+ },
85560
+ "description": "Not allowed"
85561
+ },
85562
+ "404": {
85563
+ "content": {
85564
+ "application/json": {
85565
+ "schema": {
85566
+ "$ref": "#/components/schemas/FileError"
85567
+ }
85568
+ }
85569
+ },
85570
+ "description": "No such file"
85571
+ },
85572
+ "409": {
85573
+ "content": {
85574
+ "application/json": {
85575
+ "schema": {
85576
+ "$ref": "#/components/schemas/FileError"
85577
+ }
85578
+ }
85579
+ },
85580
+ "description": "Conflicts with the file's state"
85581
+ },
85582
+ "422": {
85583
+ "content": {
85584
+ "application/json": {
85585
+ "schema": {
85586
+ "$ref": "#/components/schemas/FileError"
85587
+ }
85588
+ }
85589
+ },
85590
+ "description": "The upload did not match"
85591
+ },
85592
+ "502": {
85593
+ "content": {
85594
+ "application/json": {
85595
+ "schema": {
85596
+ "$ref": "#/components/schemas/FileError"
85597
+ }
85598
+ }
85599
+ },
85600
+ "description": "Could not check membership"
85601
+ },
85602
+ "503": {
85603
+ "content": {
85604
+ "application/json": {
85605
+ "schema": {
85606
+ "$ref": "#/components/schemas/FileError"
85607
+ }
85608
+ }
85609
+ },
85610
+ "description": "Storage or the access log unavailable"
85611
+ }
85612
+ },
85613
+ "summary": "Let an agent open a protected file in one conversation",
85614
+ "tags": [
85615
+ "Files"
85616
+ ]
85617
+ }
85618
+ },
84943
85619
  "/v1/files/{id}/complete": {
84944
85620
  "post": {
84945
85621
  "description": "Call after the bytes were PUT to the upload URL. The size and SHA-256 are checked; a match makes the file ready (`200`), or `scanning` while it is checked for malware (`202`, call again shortly). A mismatch answers `422` and the upload must be started again. Calling it again is safe. Free.",
@@ -85073,7 +85749,7 @@
85073
85749
  }
85074
85750
  }
85075
85751
  },
85076
- "description": "Storage unavailable"
85752
+ "description": "Storage or the access log unavailable"
85077
85753
  }
85078
85754
  },
85079
85755
  "summary": "Finish an upload",
@@ -85139,13 +85815,18 @@
85139
85815
  "expiresAt": {
85140
85816
  "type": "string"
85141
85817
  },
85818
+ "oneTime": {
85819
+ "description": "`true` for a protected file: the link opens once, within 5 minutes, and only for you.",
85820
+ "type": "boolean"
85821
+ },
85142
85822
  "url": {
85143
85823
  "type": "string"
85144
85824
  }
85145
85825
  },
85146
85826
  "required": [
85147
85827
  "url",
85148
- "expiresAt"
85828
+ "expiresAt",
85829
+ "oneTime"
85149
85830
  ],
85150
85831
  "type": "object"
85151
85832
  }
@@ -85248,7 +85929,7 @@
85248
85929
  }
85249
85930
  }
85250
85931
  },
85251
- "description": "Storage unavailable"
85932
+ "description": "Storage or the access log unavailable"
85252
85933
  }
85253
85934
  },
85254
85935
  "summary": "Open a file",
@@ -85259,7 +85940,7 @@
85259
85940
  },
85260
85941
  "/v1/files/{id}/links": {
85261
85942
  "delete": {
85262
- "description": "The owner or an editor removes a link. Free.",
85943
+ "description": "The owner or an editor removes a link. Removing a CRM record link also needs you to be able to see the record. Free.",
85263
85944
  "operationId": "unlinkFile",
85264
85945
  "parameters": [
85265
85946
  {
@@ -85275,12 +85956,12 @@
85275
85956
  }
85276
85957
  },
85277
85958
  {
85278
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
85959
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
85279
85960
  "in": "query",
85280
85961
  "name": "target",
85281
85962
  "required": true,
85282
85963
  "schema": {
85283
- "description": "What the file belongs to, as `<type>:<id>`: `studio_table`, `ask_chat`, `ask_project` or `export_job`.",
85964
+ "description": "What the file belongs to, as `<type>:<id>`: `crm_record` (a CRM person or company, by its record id, e.g. `crm_record:lo:123`), `studio_table`, `ask_chat`, `ask_project` or `export_job`. You must be able to see a CRM record to link a file to it, and anyone who can see the record can view the standard files linked to it.",
85284
85965
  "example": "ask_chat:chat_123",
85285
85966
  "maxLength": 220,
85286
85967
  "minLength": 3,
@@ -85388,7 +86069,7 @@
85388
86069
  }
85389
86070
  }
85390
86071
  },
85391
- "description": "Storage unavailable"
86072
+ "description": "Storage or the access log unavailable"
85392
86073
  }
85393
86074
  },
85394
86075
  "summary": "Detach a file",
@@ -85397,7 +86078,7 @@
85397
86078
  ]
85398
86079
  },
85399
86080
  "post": {
85400
- "description": "The owner or an editor attaches a file to a Studio table, a chat, a project or an export. A link does not share the file with anyone. Free.",
86081
+ "description": "The owner or an editor attaches a file to a CRM record, a Studio table, a chat, a project or an export. Linking to a CRM record needs you to be able to see the record, and lets anyone who can see the record view the file if it is standard (a protected file stays shared person by person). Other links share the file with no one. Free.",
85401
86082
  "operationId": "linkFile",
85402
86083
  "parameters": [
85403
86084
  {
@@ -85523,7 +86204,7 @@
85523
86204
  }
85524
86205
  }
85525
86206
  },
85526
- "description": "Storage unavailable"
86207
+ "description": "Storage or the access log unavailable"
85527
86208
  }
85528
86209
  },
85529
86210
  "summary": "Attach a file to something",
@@ -85697,7 +86378,7 @@
85697
86378
  }
85698
86379
  }
85699
86380
  },
85700
- "description": "Storage unavailable"
86381
+ "description": "Storage or the access log unavailable"
85701
86382
  }
85702
86383
  },
85703
86384
  "summary": "Replace a file's contents",
@@ -85837,7 +86518,7 @@
85837
86518
  }
85838
86519
  }
85839
86520
  },
85840
- "description": "Storage unavailable"
86521
+ "description": "Storage or the access log unavailable"
85841
86522
  }
85842
86523
  },
85843
86524
  "summary": "Stop sharing a file",
@@ -85972,7 +86653,7 @@
85972
86653
  }
85973
86654
  }
85974
86655
  },
85975
- "description": "Storage unavailable"
86656
+ "description": "Storage or the access log unavailable"
85976
86657
  }
85977
86658
  },
85978
86659
  "summary": "Share a file",