# Update HubDb row via API

**URL:** <https://community.hubspot.com/t/update-hubdb-row-via-api/123532>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [January 8, 2025, 9:13pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532 "2025-01-08T21:13:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ZLyons](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zlyons/32/30118_2.png) [@ZLyons](https://community.hubspot.com/u/ZLyons)\
**Post date:** [January 8, 2025, 9:13pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532/1 "2025-01-08T21:13:23Z")

</div>

Hello dev community!  
I am attempting to update a HubDb table row and receiving errors.  
I’m able to read and create rows using my API key, but receive errors using the update/delete endoints.  
I have included hubdb in my private app scope and read through the hubdb docs multiple times to sanity check but cannot find my mistake.  
Does anyone have any idea why I can read/create rows but not update/delete rows?  
// You can see the error response below:

 ![ZLyons_0-1736370170436.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/2/2e5a0849f9c87d6d35b4ce710904e8f331f6e74b.png)

// See request body:

 ![ZLyons_1-1736370242816.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/9/98d01a5bd22d6a39e5bef90d9159886665a2b3d4.png)

// Source code for posterity

 ![ZLyons_2-1736370574386.png](https://d2qpr2jzcazej7.cloudfront.net/original/1X/32c6914aa330befe385a3864db9f6fd1a35f7185.png)

I appreciate your insight, I’m puzzled!  
Zack

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [January 8, 2025, 10:38pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532/2 "2025-01-08T22:38:16Z")

</div>

@ZLyons - The only issue I can see is tha the API call URL should end with ‘/draft’

I hope it’s that simple!

Steve

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [January 8, 2025, 10:49pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532/3 "2025-01-08T22:49:23Z")

</div>

Hi @ZLyons 👋

I agree with @SteveHTM. You’ll need to use the _“Updates an existing row”_ endpoint, then (if required) publish those changes using the _“Publish a table from draft”_ endpoint. For example:

**Update HubDB table row** _(i.e. draft change)_

```lia-code-sample
curl --location --request PATCH 'https://api.hubapi.com/cms/v3/hubdb/tables/:TABLE_ID/rows/:ROW_ID/draft' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer pat-eu1-abc-xyz' \
--data '{
 "values": {
 "column_name": "example text"
 }
}'

```

**Publish drafted changes**

```lia-code-sample
curl --location --request POST 'https://api.hubapi.com/cms/v3/hubdb/tables/:TABLE_ID/draft/publish' \
--header 'Authorization: Bearer pat-eu1-abc-xyz'

```

I hope that proves helpful. Please let me know if you have any follow-up questions.

---

<div class="post-metadata">

**Author:** ![ZLyons](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zlyons/32/30118_2.png) [@ZLyons](https://community.hubspot.com/u/ZLyons)\
**Post date:** [January 8, 2025, 10:53pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532/4 "2025-01-08T22:53:26Z")

</div>

Hey Zach,  
thank you for the help! I guess I got caught by the draft vs. live feature, I should be able to accomplish what I need to now!  
I appreciate you helping me get unstuck, I was having fun learning about HubDb and the blocker was frustrating me, haha.  
Hope you have a great new year,  
another Zack

---

<div class="post-metadata">

**Author:** ![ZLyons](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zlyons/32/30118_2.png) [@ZLyons](https://community.hubspot.com/u/ZLyons)\
**Post date:** [January 8, 2025, 10:50pm UTC](https://community.hubspot.com/t/update-hubdb-row-via-api/123532/5 "2025-01-08T22:50:08Z")

</div>

Hi Steve,  
Thanks for the feedback! The live vs draft tables feature seems to have confused me, I had hoped to push to the live table and skip the /publish endpoint step, but it’s not a big deal to push to the draft table and then do the extra step of publishing it.  
I appreciate you taking time to check out my problem,  
happy new year!  
Zack
