POST
/
v1
/
tables
/
{table}
curl --request POST \
  --url https://api.botpress.cloud/v1/tables/{table} \
  --header 'Content-Type: application/json' \
  --data '{
  "factor": 1,
  "frozen": true,
  "schema": {},
  "tags": {},
  "isComputeEnabled": true
}'
{
  "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"
  },
  "created": true,
  "rows": 123,
  "stale": 123,
  "indexing": 123
}

Path Parameters

table
string
required

The table's name or unique identifier for targeting specific table operations.

Body

application/json
Schema defining the structure of the table
schema
object
required

Provide an object or a JSON schema to define the columns of the table. A maximum of 20 keys in the object/schema is allowed.

factor
number
default:1

The 'factor' multiplies the row's data storage limit by 4KB and its quota count, but can only be set at table creation and not modified later. For instance, a factor of 2 increases storage to 8KB but counts as 2 rows in your quota. The default factor is 1.

Required range: 1 <= x <= 30
frozen
boolean

A table designated as "frozen" is immutable in terms of its name and schema structure; modifications to its schema or a renaming operation are not permitted. The only action that can be taken on such a table is deletion. The schema established at the time of creation is locked in as the final structure. To implement any changes, the table must be duplicated with the desired alterations.

tags
object

Optional tags to help organize your tables. These should be passed here as an object representing key/value pairs.

isComputeEnabled
boolean

Indicates if the table is enabled for computation.

Response

200
application/json
The retrieved or created table object.
table
object
required
created
boolean
required

Flag indicating if the table was newly created.

rows
number
required

The total number of rows present in the table.

stale
number
required

The number of stale rows that are waiting to be processed

indexing
number
required

The number of rows that are waiting to be indexed (for search)