POST
/
v1
/
tables
/
{table}
/
rows
/
upsert
cURL
curl --request POST \
  --url https://api.botpress.cloud/v1/tables/{table}/rows/upsert \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-bot-id: <api-key>' \
  --data '{
  "rows": [
    {
      "id": 123
    }
  ],
  "keyColumn": "id",
  "waitComputed": true
}'
{
  "inserted": [
    {
      "id": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "computed": {},
      "stale": [
        "<string>"
      ],
      "similarity": 123
    }
  ],
  "updated": [
    {
      "id": 123,
      "createdAt": "2023-11-07T05:31:56Z",
      "updatedAt": "2023-11-07T05:31:56Z",
      "computed": {},
      "stale": [
        "<string>"
      ],
      "similarity": 123
    }
  ],
  "warnings": [
    "<string>"
  ],
  "errors": [
    "<string>"
  ]
}

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

table
string
required

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

Body

application/json

Rows for insertion or update, with a key column to determine action. Supports partial successes.

The body is of type object.

Response

Summary of insertions and updates, including any warnings or errors.

The response is of type object.