From 9c2a5ae8346c1f3c6dcff016fec9ae62cd082eea Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Fri, 6 Mar 2026 11:13:16 -0600 Subject: [PATCH 1/6] Docs: Document copy_all API endpoint for reference files (FLCRM-19499) --- reference/ATTACHMENTS/_order.yaml | 1 + reference/ATTACHMENTS/copy-all-attachments.md | 23 ++++++ reference/rest-api.json | 77 +++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 reference/ATTACHMENTS/copy-all-attachments.md diff --git a/reference/ATTACHMENTS/_order.yaml b/reference/ATTACHMENTS/_order.yaml index bbe2c04..72739aa 100644 --- a/reference/ATTACHMENTS/_order.yaml +++ b/reference/ATTACHMENTS/_order.yaml @@ -3,4 +3,5 @@ - get-single-attachment - create-attachment - finalize-attachment +- copy-all-attachments - delete-attachment diff --git a/reference/ATTACHMENTS/copy-all-attachments.md b/reference/ATTACHMENTS/copy-all-attachments.md new file mode 100644 index 0000000..20e1d6b --- /dev/null +++ b/reference/ATTACHMENTS/copy-all-attachments.md @@ -0,0 +1,23 @@ +--- +title: Copy All Reference Files +excerpt: >- + Copy all reference files from one form to another. +api: + file: rest-api.json + operationId: copy-all-attachments +deprecated: false +hidden: false +metadata: + title: "" + description: "" + robots: noindex +next: + description: "" +--- + +This endpoint allows you to copy all reference files from a source form to a destination form. + +# Limits + +- **100 reference files** per form. +- **1GB** total reference file size per form. diff --git a/reference/rest-api.json b/reference/rest-api.json index 0a34228..c493025 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -511,6 +511,43 @@ }, "description": "Location metadata captured at creation or update time." }, + "AttachmentCopyAllRequest": { + "type": "object", + "required": [ + "source_parent_id", + "destination_parent_id", + "parent_type" + ], + "properties": { + "source_parent_id": { + "type": "string", + "description": "The ID of the source parent (e.g. form ID) to copy reference files from" + }, + "destination_parent_id": { + "type": "string", + "description": "The ID of the destination parent (e.g. form ID) to copy reference files to" + }, + "parent_type": { + "type": "string", + "description": "The type of the parent resource", + "enum": [ + "form" + ] + } + } + }, + "AttachmentCopyAllResponse": { + "type": "object", + "properties": { + "ref_file_mapping": { + "type": "object", + "description": "A mapping of original reference file attachment IDs to their new copies", + "additionalProperties": { + "type": "string" + } + } + } + }, "AttachmentCreateRequest": { "type": "object", "required": [ @@ -10211,6 +10248,46 @@ "deprecated": false } }, + "/v2/attachments/copy_all": { + "post": { + "summary": "Copy all reference files", + "description": "Copy all reference files from one form to another. Limits: 100 reference files per form, 1GB total per form.", + "operationId": "copy-all-attachments", + "parameters": [ + { + "name": "X-ApiToken", + "in": "header", + "description": "API Token. Required to authenticate the request.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentCopyAllRequest" + } + } + } + }, + "responses": { + "200": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/AttachmentCopyAllResponse" + } + } + } + } + } + } + }, "/v2/attachments/finalize": { "post": { "summary": "Finalize Attachment", From 6c94b2c432fc9192e6a0b9a0cb8ad5d23dc3e78d Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Fri, 6 Mar 2026 11:52:46 -0600 Subject: [PATCH 2/6] Docs: Improve copy_all API documentation with examples and consistency (FLCRM-19499) --- reference/ATTACHMENTS/copy-all-attachments.md | 24 ++++++++++++++++++- reference/rest-api.json | 18 +++++++++++++- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/reference/ATTACHMENTS/copy-all-attachments.md b/reference/ATTACHMENTS/copy-all-attachments.md index 20e1d6b..7ae980c 100644 --- a/reference/ATTACHMENTS/copy-all-attachments.md +++ b/reference/ATTACHMENTS/copy-all-attachments.md @@ -15,7 +15,29 @@ next: description: "" --- -This endpoint allows you to copy all reference files from a source form to a destination form. +This endpoint allows you to copy all reference files from a source form to a destination form. This is useful when cloning a form or moving reference data between applications. + +# Request Payload + +```json +{ + "source_parent_id": "93eb5194-472e-436f-8769-6554b5f8845c", + "destination_parent_id": "842d5194-472e-436f-8769-6554b5f8845c", + "parent_type": "form" +} +``` + +# Response + +The response includes a mapping of the original attachment IDs to the new attachment IDs created during the copy process. + +```json +{ + "ref_file_mapping": { + "ef9bc6b0-cfd2-4c3a-8189-316f1335126a": "694e1ea7-f847-4fe3-a8bb-299c50e0e6ed" + } +} +``` # Limits diff --git a/reference/rest-api.json b/reference/rest-api.json index c493025..257efce 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -10255,7 +10255,7 @@ "operationId": "copy-all-attachments", "parameters": [ { - "name": "X-ApiToken", + "name": "x-apitoken", "in": "header", "description": "API Token. Required to authenticate the request.", "required": true, @@ -10284,6 +10284,22 @@ } } } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Unauthorized" + } + } + } + } + } } } } From 568bb0c8588f7d330cb5dfe6952085cf4b4ace54 Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Fri, 6 Mar 2026 11:57:15 -0600 Subject: [PATCH 3/6] Docs: Apply Copilot suggestions for consistency --- reference/rest-api.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reference/rest-api.json b/reference/rest-api.json index 257efce..1094f72 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -518,6 +518,7 @@ "destination_parent_id", "parent_type" ], + "additionalProperties": false, "properties": { "source_parent_id": { "type": "string", @@ -10301,7 +10302,8 @@ } } } - } + }, + "deprecated": false } }, "/v2/attachments/finalize": { From 84dc1b28c397dae9e24177032db2a7c4eee6d06f Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Fri, 6 Mar 2026 12:44:51 -0600 Subject: [PATCH 4/6] Docs: Remove required: true from x-apitoken for consistency --- reference/rest-api.json | 1 - 1 file changed, 1 deletion(-) diff --git a/reference/rest-api.json b/reference/rest-api.json index 1094f72..8c517b5 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -10259,7 +10259,6 @@ "name": "x-apitoken", "in": "header", "description": "API Token. Required to authenticate the request.", - "required": true, "schema": { "type": "string" } From bc79ae880cd0d3ee2f68ff66af9870625317aa0d Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Mon, 9 Mar 2026 08:55:04 -0600 Subject: [PATCH 5/6] FLCRM-19499: address PR feedback for copy_all docs - Add 400 Bad Request response to copy_all OpenAPI operation - Add 401 response example payload for consistency - Normalize front matter quote style in copy-all-attachments.md --- reference/ATTACHMENTS/copy-all-attachments.md | 6 ++--- reference/rest-api.json | 26 +++++++++++++++++++ 2 files changed, 29 insertions(+), 3 deletions(-) diff --git a/reference/ATTACHMENTS/copy-all-attachments.md b/reference/ATTACHMENTS/copy-all-attachments.md index 7ae980c..252459b 100644 --- a/reference/ATTACHMENTS/copy-all-attachments.md +++ b/reference/ATTACHMENTS/copy-all-attachments.md @@ -8,11 +8,11 @@ api: deprecated: false hidden: false metadata: - title: "" - description: "" + title: '' + description: '' robots: noindex next: - description: "" + description: '' --- This endpoint allows you to copy all reference files from a source form to a destination form. This is useful when cloning a form or moving reference data between applications. diff --git a/reference/rest-api.json b/reference/rest-api.json index 8c517b5..20bacb4 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -10285,10 +10285,36 @@ } } }, + "400": { + "description": "400", + "content": { + "application/json": { + "examples": { + "Result": { + "value": "{\n \"error\": \"Bad Request\"\n}" + } + }, + "schema": { + "type": "object", + "properties": { + "error": { + "type": "string", + "example": "Bad Request" + } + } + } + } + } + }, "401": { "description": "Unauthorized", "content": { "application/json": { + "examples": { + "Result": { + "value": "{\n \"error\": \"Unauthorized\"\n}" + } + }, "schema": { "type": "object", "properties": { From 776a847d3cefd54e3ebd7cb773bdd5b8fc765d71 Mon Sep 17 00:00:00 2001 From: Gabriel Villalobos Date: Mon, 9 Mar 2026 09:35:15 -0600 Subject: [PATCH 6/6] FLCRM-19499: address remaining PR feedback - Change 401 description from 'Unauthorized' to '401' for consistency - Add deprecated: false to copy_all endpoint - Align with Attachments endpoints patterns --- reference/rest-api.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reference/rest-api.json b/reference/rest-api.json index 20bacb4..d28d05a 100644 --- a/reference/rest-api.json +++ b/reference/rest-api.json @@ -10307,7 +10307,7 @@ } }, "401": { - "description": "Unauthorized", + "description": "401", "content": { "application/json": { "examples": {