POST
/
v1
/
tables
/
{sourceTableId}
/
duplicate
cURL
curl --request POST \
  --url https://api.botpress.cloud/v1/tables/{sourceTableId}/duplicate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-bot-id: <api-key>' \
  --data '{
  "tableName": "<string>",
  "schemaOnly": true,
  "factor": 123
}'
{
  "table": {
    "id": "<string>",
    "name": "<string>",
    "factor": 1,
    "frozen": true,
    "schema": {
      "$schema": "<string>",
      "properties": {},
      "additionalProperties": true,
      "required": [
        "<string>"
      ],
      "type": "object"
    },
    "tags": {},
    "isComputeEnabled": true,
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z"
  },
  "rows": 123
}

Authorizations

Authorization
string
header
required

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

x-bot-id
string
header
required

Your bot ID.

Path Parameters

sourceTableId
string
required

The table's unique identifier

Body

application/json

Parameters for the duplication operation.

tableName
string
schemaOnly
boolean

Only duplicate the schema, not the content

factor
number

Use a different factor for the table. Leave empty to use the same as the duplicated table.

Response

200
application/json

The created table object.

table
object
required
rows
number
required

The total number of rows present in the table.