How to Use API_CopyMasterDetail in Quickbase
Quickbase API
Detailed How-To Guide on How to Use API_CopyMasterDetail in Quickbase to Copy Parent and Child Records by Quandary Consulting Group
API_CopyMasterDetail is a Quickbase** **XML API call used to copy a master-detail record relationship, including the parent record and its related child records, in one operation.
What Does API_CopyMasterDetail Do?
Creates a new parent (master) record
Copies all related child (detail) records
Maintains the relationship between them in the new set
So instead of manually duplicating a parent record and then recreating all its related children, this API does it in one request.
Typical API_CopyMasterDetail Use Cases:
You’d use API_CopyMasterDetail when you want to:
Clone a project with all its tasks
Duplicate an order with all its line items
Copy a template record and all associated sub-records
What are the Key Inputs for API_CopyMasterDetail in Quickbase
Some important parameters include:
dbid– the table ID of the parent tablerid– the Record ID of the parent record you want to copycopy_fields(optional) – specify which fields to copyexclude_fields(optional) – fields you don’t want copiedudata(optional) – for tracking/logging
What happens Behind the Scenes
Step 1: Quickbase creates a new parent record
Step 2: It finds all related child records via the relationship
Step 3: It duplicates each child record
Step 4: It links the new children to the new parent
What are Key Important Limitations about API_CopyMasterDetail in Quickbase
Works only with master-detail relationships (not loosely related tables)
Requires proper permissions to read and add records in both tables
Field rules, formulas, and automations may still trigger on the new records
Not available in REST APIs — it’s part of the legacy XML API
**When you should use ****API_CopyMasterDetail in Quickbase**
1. Cloning structured data sets
Use it when your data is organized in a true master-detail relationship and you want a full copy.
A Project with many _Tasks vs. _Creating a new parent
An Invoice with multiple _Line Items vs. _Querying all children
A Campaign with related _Activities vs. _Recreating each child manually
2. Creating templates or reusable records
If you have “template” records that serve as a starting point:
Project templates → copy to create new projects
Checklist templates → copy with all checklist items
Standard workflows → duplicate structure instantly
3. Reducing complexity in integrations
In Quickbase, if you're building one of the following:
Scripts
Middleware (Jitterbit, Zapier, Workato, or custom apps)
Legacy integrations
This type of API avoids:
Multiple API calls
Looping through child records
Handling relationship re-linking manually
4. Preserving relationships automatically
If maintaining correct parent-child links is critical, this API is safer because:
It automatically reassigns child records to the new parent
You don’t risk orphaned or mis-linked records
When you should NOT use it API_CopyMasterDetail in Quickbase
1. You need selective or conditional copying
Avoid it if you only want:
Some child records (not all)
Filtered data (e.g., only “active” tasks)
This API copies everything in the relationship.
2. You’re using modern REST-first architecture
API_CopyMasterDetail is part of the legacy XML API.
If you're:
Standardizing on REST
Building long-term scalable integrations
You may want to do: Query → transform → recreate records manually (or use Quickbase Pipelines) instead.
3. You need to transform data during the copy
This API does a straight duplication and is not ideal to use if you need to:
Modify field values
Reset statuses
Apply business logic during duplication
4. Your relationships are not true master-detail
API_CopyMasterDetail only works with a Proper parent-child relationships in Quickbase
Do not use API_CopyMasterDetail for:
Lookup-only relationships
Loosely linked tables
Good Rule of thumb to Remember: Use API_CopyMasterDetail when: “I want an exact structural clone of a record and everything under it, fast and with minimal logic.” and Avoid using API_CopyMasterDetail when: “I need control, filtering, or transformation during the copy.”
How to Use API_CopyMasterDetail in Quickbase?
Quickbase is a relational database, meaning data is structured in parent-child relationships such as:
Projects → Tasks
Leads → Activities
Invoices → Line Items
When using the standard “Copy Record” option in Quickbase, only the parent record is duplicated. Child records are not copied.
Example: Copying an Invoice results in a new Invoice with no Line Items.
The API_CopyMasterDetail call solves this by allowing you to:
Copy the parent record
Copy selected child records
Optionally copy nested (grandchild) records
Maintain all relationships automatically
This enables true record duplication with full data integrity. Below are the two options to using the API_CopyMasterDetail in Quickbase
Option 1: Using Quickbase’s Built-In CopyMasterDetail Button
Quickbase provides a built-in configuration tool to generate a button that runs the API_CopyMasterDetail call.
**Step 1: **Navigate to: Settings → App Management → Copy master & detail records
Step 2: Select the parent table (top of your hierarchy)
- Choose Projects if copying Projects with Tasks and Activities
**Step 3: **Choose what to Copy and in Quickbase, you have several options:
**Step 3 / Option 1: **Copy the current record and its detail records
Creates a complete duplicate
Copies all fields and all related records
**Step 3 / Option 2: **Import detail records from a specific record
Allows use of a template record
Copies only the child records from a predefined source
**Step 3 / Advanced Options: **Copy the detail records from:
All relationships
Specific relationships only
**Step 4: **Copy all descendants (recursive copy)
Enabled (default): Copies all levels
Projects → Tasks → Activities
Disabled: Copies only first-level children
Projects → Tasks (no Activities)
Step 5: Final step is to name your button field
- Click Create
You can delete and recreate the button anytime if changes are needed.
**Important Limitation: **API_CopyMasterDetail does not support circular relationships. If your schema includes loops (where a child indirectly becomes a parent of the original table), the API call will fail.
Option 2: Use API_CopyMasterDetail in Custom Integrations
For advanced use cases, you can call API_CopyMasterDetail via:
HTTP requests
Webhooks
Scripts or middleware
External systems
When to Use a Custom API Call
Use this approach when you need to:
Trigger copies automatically (e.g., workflow automation)
Initiate copies from outside Quickbase
Modify records after copying (e.g., reset fields)
Chain with other API calls like
API_EditRecord
Example: Copy an Invoice with Line Items and then reset all dollar amounts via a follow-up API call
Visual Example of API Request (URL Format)
Image: Example API Request (URL Format) | Quandary Consulting Group
Best Practices for Using API_CopyMasterDetail
Use templates for consistent data structures
Limit recursion when performance is a concern
Use
relfidsto avoid copying unnecessary dataCombine with
API_EditRecordfor post-copy cleanupTest using Quickbase’s built-in button before automating
The Quickbase API_CopyMasterDetail call is a powerful tool for:
Cloning records with full relational data
Automating workflows
Building scalable Quickbase applications
Use the built-in button for simplicity, or a custom API call for flexibility and automation.
Understanding Quickbase's API_CopyMasterDetail Parameters
The Quickbase API_CopyMasterDetail call includes several unique parameters that control how parent and child records are copied. Understanding these parameters is essential for successfully duplicating records and their relationships in Quickbase.
destrid (REQUIRED)
The destrid (destination record ID) determines where the copied detail records will go.
You have two primary options:
**destrid = 0**Creates a new parent record and copies all related child records. Copy a Project and all its Tasks to create a brand-new project.**destrid = [existing Record ID]**Copies child records from the source into an existing parent record.destrid = 5will copy detail records into Project ID #5.
Best Practice:Use destrid=0 when cloning full records. Use a specific Record ID when merging or reusing detail data.
sourcerid (REQUIRED)
The sourcerid (source record ID) specifies the record you want to copy from.
To create a full duplicate → set
sourceridto the current recordTo use a template record → set
sourceridto the template’s Record ID
Example: If you maintain a “Template Project,” set sourcerid to that record to copy its structure and details.
Common Use Case: Creating standardized records from templates in Quickbase apps.
copyfid (REQUIRED)
The copyfid (field ID) determines which field will store the new record’s name.
Quickbase automatically prefixes the value with: “Copy of …”
Example: If copyfid points to Project Name:
Original: Test Project
New Record: Copy of Test Project
Use a primary or descriptive field (like Name or Title) for better data clarity.
recurse (OPTIONAL)
The recurse parameter controls whether nested child records are also copied.
recurse = 1(default) → Copies all levels of relationshipsrecurse = 0→ Copies only the first level of child records
Example hierarchy: Project → Tasks → Activities
recurse=1→ Copies Projects, Tasks, and Activitiesrecurse=0→ Copies Projects and Tasks only
Default Behavior: Recursive copying is enabled.
relfids** (OPTIONAL)**
The relfids parameter lets you control which relationships are copied.
Accepts a comma-separated list of Field IDs
Each Field ID corresponds to a Report Link field in a relationship
Example: Copy Projects and Tasks, but exclude Documents
How it works:
Quickbase creates a Report Link field for each relationship
These fields define which child records are included in the copy
Add the relevant Field IDs to
relfidsto include only those relationships
Please note: If omitted: Quickbase copies all related child records by default
Key Quickbase Parameters (short list)
**destRID**– Destination record (0 = create new)**sourcerid**– Record to copy from**copyfid**– Field to store “Copy of…” name**recurse**– Include nested child records**relfids**– Specify which relationships to copy
How Relationships Work in Quickbase with API_CopyMasterDetail
Each Quickbase relationship includes a Report Link field, which:
Connects parent and child records
Displays embedded reports on forms
Acts as the reference point for copying detail records
To control which child records are copied:
Locate the Report Link field in your relationship
Identify its Field ID
Add it to the
relfidsparameter
By combining these parameters, you can:
Clone full record hierarchies
Copy template-based structures
Control which related records are included
Limit recursion depth
This makes API_CopyMasterDetail one of the most powerful tools for automating record duplication in Quickbase.
**Important Testing Tip for When you use API_CopyMasterDetail **
If you're new to this API:
Create a button field using Quickbase’s built-in copy functionality
Open the field properties
Review the generated API call
This is a great way to understand how Quickbase structures the request.
For additional How-To guides about developing on the Quickbase platform, please visit our Quickbase Knowledge Base
Author: Logan Lott
Title: Solution Consultant | Quickbase
Email: llott@quandarycg.com
Date Published: June 4, 2026
Top FAQs about How to use API_CopyMasterDetail in Quickbase
1. What is API_CopyMasterDetail in Quickbase?
API_CopyMasterDetail is a Quickbase XML API that allows you to copy a parent record along with its related child and grandchild records in a single request.
Unlike the standard “Copy Record” feature, it preserves master-detail relationships, making it ideal for duplicating structured data such as projects with tasks or invoices with line items.
2. When should I use API_CopyMasterDetail in Quickbase?
Use API_CopyMasterDetail when you need to duplicate a record and all its related data while maintaining relationships. Common use cases include:
Cloning projects with tasks and activities
Copying invoices with line items
Creating new records from templates
It is especially useful for automation, templates, and relational data replication in Quickbase.
3. How is API_CopyMasterDetail different from Quickbase’s “Copy Record” option?
The standard “Copy Record” feature only duplicates the parent record and does not copy child records. In contrast, API_CopyMasterDetail:
Copies parent and child records together
Maintains relationships between records
Supports multi-level (recursive) copying
This makes it the preferred method for complete data duplication in relational Quickbase apps.
4. Can I control which child records are copied in API_CopyMasterDetail?
Yes. You can control which related records are copied using the relfids parameter, which specifies the relationships to include. You can also:
Use
recurse=0to prevent copying nested child recordsExclude certain tables (e.g., copy Tasks but not Documents)
This gives you flexibility to customize how data is duplicated in Quickbase.
5. Is API_CopyMasterDetail available in Quickbase REST API?
No. API_CopyMasterDetail is part of the legacy Quickbase XML API and is not currently available in the REST API.
If you are using REST-based integrations, you will need to:
Query the parent and child records
Recreate them manually using REST endpoints
Alternatively, you can use Quickbase Pipelines or XML API calls for easier implementation.