API Endpoints: Databases¶
Run Query¶
Request¶
POST https://webhook.site/databases/databaseId/query
query: (string, required) The SQL query to execute.params: (array|object) A list or dictionary of parameters. Can be left out if query has no parameters.
A maximum of 1000 results can be returned.
{
"query": "select * from users where email like concat('%', :domain)",
"params": {
"domain": "@example.com"
}
}
It is also possible to use a list of parameters:
params can be left out if not needed:
Response¶
result: (array) The returned data.error: (string) If the query results in an error, the error is represented here, otherwisenull.time: (float) Query execution time in milliseconds.
{
"result": [
{
"id": 1,
"name": "Jack Daniels",
"email": "jack@example.com"
},
{
"id": 2,
"name": "Elijah Craig",
"email": "eli@example.com"
},
],
"error": null,
"time": 0
}
Or, for an error:
{
"result": null,
"error": "Undefined table: 7 ERROR: relation \"nonexisting_table\" does not exist",
"time": 0
}
Create database¶
- Requires authentication
- Will return
401 Unauthorizedwhen no databases purchased in subscription
Request¶
POST https://webhook.site/databases
name(required) The name of the database.group_idEnter a group ID to attach database to a group.plan(required) Eitherdb-s,db-m,db-l.
Response¶
{
"id": "23984",
"name": "My Database",
"plan": "db-s",
"group_id": null,
"max_bytes": 104857600,
"max_tables": 1,
"team_id": 181,
"updated_at": "2025-09-24T08:52:50.000000Z",
"created_at": "2025-09-24T08:52:50.000000Z"
}
Get all databases¶
GET https://webhook.site/database?page=1&per_page=15
Response¶
{
"current_page": 1,
"data": [
{
"id": "23984",
"name": "My Database",
"plan": "db-s",
"team_id": 345987,
"group_id": null,
"max_bytes": 104857600,
"max_tables": 1,
"bytes_used": 0,
"tables_used": 1,
"created_at": "2025-09-23T10:26:51.000000Z",
"updated_at": "2025-09-23T10:26:55.000000Z",
"group": null
}
],
"first_page_url": "https:\/\/webhook.test\/databases?page=1",
"from": 1,
"last_page": 1,
"last_page_url": "https:\/\/webhook.test\/databases?page=1",
"links": [
{
"url": null,
"label": "« Previous",
"active": false
},
{
"url": "https:\/\/webhook.test\/databases?page=1",
"label": "1",
"active": true
},
{
"url": null,
"label": "Next »",
"active": false
}
],
"next_page_url": null,
"path": "https:\/\/webhook.test\/databases",
"per_page": 15,
"prev_page_url": null,
"to": 1,
"total": 1
}
Update database¶
Request¶
PUT https://webhook.site/databases
name(required) The name of the database.group_idEnter a group ID to attach database to a group.
Response¶
{
"id": "100014",
"name": "My Updated Database",
"plan": "db-s",
"team_id": 181,
"group_id": null,
"max_bytes": 104857600,
"max_tables": 1,
"bytes_used": 0,
"tables_used": 0,
"created_at": "2025-09-24T08:52:50.000000Z",
"updated_at": "2025-09-24T08:56:29.000000Z"
}
Delete database¶
Request¶
DELETE https://webhook.site/databases/databaseId
Response¶
204 No content
Last update:
October 18, 2025 10:55:54