---
title: "API_CloneDatabase"
slug: "api-clonedatabase"
updated: 2025-09-16T18:59:56Z
published: 2025-09-16T18:59:56Z
---

> ## Documentation Index
> Fetch the complete documentation index at: https://help.quickbase.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API_CloneDatabase

**Don't forget to check out our**[**JSON RESTful APIs**](https://developer.quickbase.com/)**, they can help you utilize and extend Quickbase with ease.**

## Overview

Use API_CloneDatabase to make a copy of a Quickbase application. You can choose to use the **keepData**parameter if you want to copy the application's data in addition to its structure. If you want to copy data, but exclude file attachments, you can use the **excludefiles**parameter in your request. After you copy an application, changes to the source application will not affect the copy you created, and vice versa.

When you copy a Quickbase application, all users with access to the original application automatically have access to the application copy. You can choose to remove some or all of these users from the application copy using the API_RemoveUserFromRole.

> [!WARNING]
> Important
> 
> This API only works with legacy features. To copy a Quickbase app that includes non-legacy forms and dashboards, use: [https://developer.quickbase.com/operation/copyApp](https://developer.quickbase.com/operation/copyApp)

## Request parameters

| Parameter | Value | Required? |
| --- | --- | --- |
| newdbname | Specifies a name for the new application. | yes |
| newdbdesc | Specifies the description for the new application. | no |
| keepData | Set this parameter to 1 if you want to copy the application's data. Omit this parameter if you want to copy the application structure only. | no |
| excludefiles | Specifies that you do not want to copy file attachments when you copy an application. If you want to copy data, but exclude file attachments from your copy: - Set the keepData parameter to 1 and - Set the excludefiles parameter to 1 If you want to copy data, including file attachments: - Set the keepData parameter to 1 and - Omit the excludefiles parameter | no |
| ticket | A valid authentication ticket. The authentication ticket is returned via the API_Authenticate call. | yes, one of: - ticket - username/password - user token |
| usertoken | The user token is an alternative means of authentication, used for API access. User tokens cannot be used to access the Quickbase UI. | yes, one of: - ticket - username/password - user token |
| apptoken | Supply a valid application token. | yes, if the application requires application tokens |
| udata | A string value that you want returned. It will not be handled by Quickbase but it will be returned in the response. | no |
| usersandroles | Specify how users and roles are treated when copying the application. Set this parameter to 1 to copy users in their roles. Set to 0 to copy users and roles separately (that is, don't assign roles). Defaults to 0. | no |

## Response values

| Element Name | Value |
| --- | --- |
| action | Echoes the originating request, for example, API_CloneDatabase. |
| errcode | Identifies the error code, if any. (See the [Error Codes appendix](/v1/docs/error-codes) for a list of possible error codes.) 0 indicates that no error was encountered. |
| errtext | Text that explains the error code. "No error" indicates that no error was encountered. |
| udata | Optional. Contains any udata value supplied in the request. |
| newdbid | The database ID of the new database. |

## Sample XML Request

```xml
POST https://target_domain/db/target_dbid HTTP/1.0
Content-Type: application/xml
Content-Length:
QUICKBASE-ACTION: API_CloneDatabase

<qdbapi>
   <ticket>auth_ticket</ticket>
   <apptoken>app_token</apptoken>
   <udata>mydata</udata>
   <newdbname>YellowDots</newdbname>
   <newdbdesc>Database copy with no data</newdbdesc>
</qdbapi>
```

## URL alternative

```plaintext
https://target_domain/db/target_dbid?a=API_CloneDatabase
&ticket=auth_ticket&apptoken=app_token
&keepData=1&newdbname=YellowDots&newdbdesc="Database copy   with data"
```

where *target_domain* is the domain against which you are invoking this call, for example, *quickbase.com*. [Read about this notation](/v1/docs/understanding-the-api-call-reference).

## Sample response

```xml
<?xml version="1.0" ?>
<qdbapi>
   <action>API_CloneDatabase</action>
   <errcode>0</errcode>
   <errtext>No error</errtext>
   <udata>mydata</udata>
   <newdbid>bddnc6pn7</newdbid>
</qdbapi>
```
