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: <x-bot-id>' \
--data '
{
"rows": [
{
"id": 123
}
],
"keyColumn": "id",
"waitComputed": true
}
'{
"inserted": [
{
"id": 123,
"computed": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stale": [
"<string>"
],
"similarity": 123
}
],
"updated": [
{
"id": 123,
"computed": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stale": [
"<string>"
],
"similarity": 123
}
],
"warnings": [
"<string>"
],
"errors": [
"<string>"
]
}Inserts or updates rows based on a key. If a row exists, it is updated; otherwise, a new row is created.
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: <x-bot-id>' \
--data '
{
"rows": [
{
"id": 123
}
],
"keyColumn": "id",
"waitComputed": true
}
'{
"inserted": [
{
"id": 123,
"computed": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stale": [
"<string>"
],
"similarity": 123
}
],
"updated": [
{
"id": 123,
"computed": {},
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"stale": [
"<string>"
],
"similarity": 123
}
],
"warnings": [
"<string>"
],
"errors": [
"<string>"
]
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Bot id
Integration id
Integration alias
Integration name
User Id
User Role
The table's name or unique identifier for targeting specific table operations.
Rows for insertion or update, with a key column to determine action. Supports partial successes.
Determines if a row is inserted or updated. Defaults to "id".
1 - 30Ensure computed columns are fully processed before returning the result. This is applicable only when the number of rows involved is fewer than 1.
Summary of insertions and updates, including any warnings or errors.
Show child attributes
Unique identifier for the row.
Timestamp of row creation.
Timestamp of the last row update.
[Read-only] List of stale values that are waiting to be recomputed.
Optional numeric value indicating similarity, when using findTableRows.
Show child attributes
Unique identifier for the row.
Timestamp of row creation.
Timestamp of the last row update.
[Read-only] List of stale values that are waiting to be recomputed.
Optional numeric value indicating similarity, when using findTableRows.
Alerts for minor issues that don't block the operation but suggest possible improvements.
Critical issues in specific elements that prevent their successful processing, allowing partial operation success.
Was this page helpful?