For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
CommunityCreate AccountSign in
  • Overview
    • Welcome
    • Authentication
    • Using Environments
  • API Reference
      • GETList sheets
      • GETGet a sheet
      • DELDelete a sheet
      • POSTDuplicate a sheet
      • POSTValidate a sheet
      • GETDownload records as a CSV file
      • GETGet record counts
      • GETList calculations
      • GETGet commit versions for a sheet
      • POSTLock a sheet
      • POSTUnlock a sheet
      • GETGet record cells by field
      • PATCHUpdate a sheet
LogoLogo
LogoLogo
CommunityCreate AccountSign in
API ReferenceSheets

Duplicate a sheet

POST
https://api.x.flatfile.com/v1/sheets/:sheetId/duplicate
POST
/v1/sheets/:sheetId/duplicate
$curl -X POST https://api.x.flatfile.com/v1/sheets/us_sh_YOUR_ID/duplicate \
> -H "X-Disable-Hooks: true" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "Copy of Contacts",
> "slug": "contacts-copy"
>}'
1{
2 "data": {
3 "id": "us_sh_YOUR_ID",
4 "workbookId": "us_wb_YOUR_ID",
5 "name": "Contacts",
6 "slug": "contacts",
7 "config": {
8 "name": "Contacts",
9 "fields": [
10 {
11 "type": "string",
12 "key": "firstName",
13 "label": "First Name"
14 },
15 {
16 "type": "string",
17 "key": "lastName",
18 "label": "Last Name"
19 },
20 {
21 "type": "string",
22 "key": "email",
23 "label": "Email"
24 }
25 ],
26 "slug": "contacts",
27 "mappingConfidenceThreshold": 0.5
28 },
29 "updatedAt": "2021-08-31T18:00:00Z",
30 "createdAt": "2021-08-31T18:00:00Z",
31 "metadata": {
32 "rowHeaders": [
33 4
34 ]
35 }
36 }
37}
Creates a copy of a sheet including all its data within the same workbook
Was this page helpful?
Previous

Validate a sheet

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

sheetIdstringRequired
ID of sheet to duplicate

Headers

X-Disable-Hooks"true"Required

Request

This endpoint expects an object.
namestringOptional

Custom name for the duplicated sheet. Defaults to “Copy of [original name]”

slugstringOptional

Custom slug for the duplicated sheet. Defaults to “[original slug]-copy-[timestamp]”

Response

This endpoint returns an object.
dataobject
A place to store tabular data

Errors

400
Bad Request Error
404
Not Found Error