Use these endpoints to perform CRUD-style operations on key-value pairs stored in SQLite-backed databases. The KV store supports hierarchical keys (using /), JSON path extraction for nested values, optional TTL, history tracking, and atomic numeric counters.
Retrieve a value from the KV store. Supports JSON path extraction for pulling nested values from stored JSON, and time-travel queries via at_timestamp to read the value as it existed at a specific point in history.
Name In Type Required Description keypath string Yes Key name (supports / for hierarchical keys) dbquery string Yes Database file path or directory tablequery string No Custom table name (default: "kv_store") pathquery string No JSON path for nested value extraction at_timestampquery integer No Unix timestamp for time-travel query (selects handleKVAtTimestamp) rebuildquery boolean No Rebuild cache (directory mode only)
curl -G " https://api.hoody.com/api/v1/sqlite/kv/user:42:profile " \
--data-urlencode " db=app.db " \
--data-urlencode " path=/email "
const value = await client . sqlite . kvStore . get ( {
The raw stored value is returned in the response body. Metadata is provided via response headers.
Response headers:
Content-Type — MIME type of the stored value
X-Created-At — Unix timestamp when created
X-Updated-At — Unix timestamp when last updated
X-Expire-At — Unix timestamp when expires (if TTL set)
X-KV-Reference — Set to "true" if value is a KV store reference
"message" : " Invalid request parameters "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"message" : " Key not found or expired "
Error Code Title Description Resolution KEY_NOT_FOUNDKey not found The requested key does not exist in the KV store Verify the key name and database/table parameters DATABASE_NOT_FOUNDDatabase file does not exist The specified database file was not found Check the file path or use create_db_if_missing=true to create it KEY_EXPIREDKey expired The key existed but has expired due to TTL The key was automatically deleted. Store a new value if needed.
"message" : " Time-travel chain gap detected for the requested timestamp "
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
Atomically increment a numeric value stored at the key. The operation is safe for concurrent callers. Use the path parameter to target a nested numeric value inside a stored JSON object.
Name In Type Required Description keypath string Yes Key name dbquery string Yes Database file path tablequery string No Custom table name (default: "kv_store") deltaquery integer No Amount to increment (default: 1) pathquery string No JSON path to nested numeric value historyquery boolean No Enable history tracking (default: true)
curl -X POST -G " https://api.hoody.com/api/v1/sqlite/kv/visitors/counter/incr " \
--data-urlencode " db=app.db " \
--data-urlencode " delta=1 "
const result = await client . sqlite . kvStore . incr ( {
"key" : " visitors:counter " ,
"message" : " Invalid request or value not numeric "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
Atomically decrement a numeric value stored at the key. The operation is safe for concurrent callers. Use the path parameter to target a nested numeric value inside a stored JSON object.
Name In Type Required Description keypath string Yes Key name dbquery string Yes Database file path tablequery string No Custom table name (default: "kv_store") deltaquery integer No Amount to decrement (default: 1) pathquery string No JSON path to nested numeric value historyquery boolean No Enable history tracking (default: true)
curl -X POST -G " https://api.hoody.com/api/v1/sqlite/kv/inventory/seats/decr " \
--data-urlencode " db=app.db " \
--data-urlencode " delta=1 "
const result = await client . sqlite . kvStore . decr ( {
"key" : " inventory:seats " ,
"message" : " Invalid request or value not numeric "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
Store or update a value at the given key. Supports optional TTL for automatic expiration, JSON path updates to mutate nested values without rewriting the whole document, and compare-and-swap semantics via if_match for safe concurrent updates.
Name In Type Required Description keypath string Yes Key name dbquery string Yes Database file path tablequery string No Custom table name (default: "kv_store") pathquery string No JSON path for nested value update ttlquery integer No Time-to-live in seconds if_matchquery string No Current value for compare-and-swap historyquery boolean No Enable history tracking (default: true) create_db_if_missingquery boolean No Create database file if it is missing (default: false)
The request body contains the raw value to store. Send it as application/json, application/octet-stream, or any other text content type.
curl -X PUT " https://api.hoody.com/api/v1/sqlite/kv/user:42:profile?db=app.db&ttl=3600 " \
-H " Content-Type: application/json " \
-d ' {"name":"Alice","email":"alice@example.com","plan":"pro"} '
await client . sqlite . kvStore . set ({
data: ' {"name":"Alice","email":"alice@example.com","plan":"pro"} '
"key" : " user:42:profile " ,
"message" : " Invalid request parameters "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"error" : " Precondition Failed " ,
"message" : " Compare-and-swap failed: the current value does not match `if_match` "
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
Remove a key-value pair from the store. The operation is idempotent: deleting a key that has already been removed (or expired) returns 404.
Name In Type Required Description keypath string Yes Key name dbquery string Yes Database file path or directory tablequery string No Custom table name (default: "kv_store") historyquery boolean No Enable history tracking (default: true)
curl -X DELETE -G " https://api.hoody.com/api/v1/sqlite/kv/user:42:profile " \
--data-urlencode " db=app.db "
await client . sqlite . kvStore . delete ({
"key" : " user:42:profile " ,
"message" : " Invalid request parameters "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"message" : " Key not found "
Error Code Title Description Resolution KEY_NOT_FOUNDKey not found The requested key does not exist in the KV store Verify the key name and database/table parameters DATABASE_NOT_FOUNDDatabase file does not exist The specified database file was not found Check the file path or use create_db_if_missing=true to create it KEY_EXPIREDKey expired The key existed but has expired due to TTL The key was automatically deleted. Store a new value if needed.
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space
Check whether a key exists without retrieving its value. Useful as a lightweight precondition check before issuing a write, or to detect whether a TTL-bound key has expired.
Name In Type Required Description keypath string Yes Key name dbquery string Yes Database file path or directory tablequery string No Custom table name (default: "kv_store")
curl -I -G " https://api.hoody.com/api/v1/sqlite/kv/user:42:profile " \
--data-urlencode " db=app.db "
const present = await client . sqlite . kvStore . exists ( {
The key exists. No response body is returned for a HEAD request.
"message" : " Invalid request parameters "
Error Code Title Description Resolution INVALID_DB_PATHInvalid database path The provided database path is invalid or inaccessible Provide a valid absolute path, or use bare name / ./name shorthand (resolved to /hoody/databases/*.db) INVALID_PARAMETERSInvalid request parameters One or more request parameters are invalid or malformed Check parameter types and values against the API specification INVALID_SQLITE_HEADERNot a valid SQLite database The file exists but is not a valid SQLite database Ensure the file is a valid SQLite database with proper header PATH_IS_DIRECTORYPath is a directory Expected a .db file but got a directory (use table parameter for directory mode) Use a .db file path or add table parameter for directory mode KV store
"message" : " Key not found or expired "
Error Code Title Description Resolution KEY_NOT_FOUNDKey not found The requested key does not exist in the KV store Verify the key name and database/table parameters DATABASE_NOT_FOUNDDatabase file does not exist The specified database file was not found Check the file path or use create_db_if_missing=true to create it KEY_EXPIREDKey expired The key existed but has expired due to TTL The key was automatically deleted. Store a new value if needed.
"error" : " Internal Server Error " ,
"message" : " Internal server error "
Error Code Title Description Resolution DATABASE_ERRORDatabase operation failed An internal database error occurred Check server logs for details. Database may be corrupted or locked. FILE_SYSTEM_ERRORFile system error Failed to read or write filesystem in directory mode Check file permissions and disk space