How to Update a HubDB table cell?


Hi, I was wondering if anyone had any code to share to illustrate how to use the HubSpot API to update a cell in a HubDB table. If you could please include all of the code, not just the API call, that would be great.

I’m not too fussy about the code, but I’m more familiar with PHP.

Thank you!


Here’s an example which should help you start. IDs for table, row and cell are taken from the API documentation example at


// Options
$apiKey = '<YOUR_API_KEY>';
$tableId = 300081;
$rowId = 4685456343;
$cellId = 4;

// Put the URL together
$requestUrl = sprintf(

// Prepare our data for the cell
$data = [
    'value' => 'some value'

// Proceed with the API call
$ch = curl_init($requestUrl);
$dataJson = json_encode($data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PUT');
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataJson);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
$response = curl_exec($ch);

if (!$response) {



Thanks for the help!