# Unable to PATCH Schema

**URL:** <https://community.hubspot.com/t/unable-to-patch-schema/123590>\
**Category:** APIs & Integrations\
**Tags:** php, sdk\
**Created:** [January 9, 2025, 2:02pm UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590 "2025-01-09T14:02:28Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Graham-OUB](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Graham-OUB](https://community.hubspot.com/u/Graham-OUB)\
**Post date:** [January 9, 2025, 2:02pm UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/1 "2025-01-09T14:02:28Z")

</div>

Hello everyone

I’m encountering an issue with a Custom Schema update while using the HubSpot PHP SDK (v10). I’ve been successfully using this functionality for years, but today it suddenly stopped working, and I’m now receiving a 404 error related to an unrecognised scope.

The URL I am using:

`PATCH https://api.hubapi.com/crm/v3/schemas/{objectName}`

The (partial) error response:

`{"status": "error","message": "cobject-edit-all-1 is not a valid scope"}`

At random intervals, I’ve also seen a similar 404 error with the following message:

`{"status": "error","message": "cobject-edit-team-owned-1 is not a valid scope"}`

I’m struggling to identify what these scopes (cobject-edit-all-1 and cobject-edit-team-owned-1) are or how to resolve the issue. I’ve reviewed the available scopes in HubSpot’s documentation but haven’t found anything that matches.

Here are the scopes currently applied:

- crm.schemas.custom.read
- crm.objects.custom.read
- crm.objects.custom.write
- crm.schemas.custom.write

Has anyone encountered this issue before or can shed light on what these error messages mean? Any guidance on how to resolve this would be greatly appreciated!

---

<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 9, 2025, 9:56pm UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/2 "2025-01-09T21:56:53Z")

</div>

Hi @Graham-OUB 👋

I’ve not come across this error message before. Would you please share an example of a request body that is leading to these errors?

---

<div class="post-metadata">

**Author:** ![Graham-OUB](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Graham-OUB](https://community.hubspot.com/u/Graham-OUB)\
**Post date:** [January 10, 2025, 9:06am UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/3 "2025-01-10T09:06:50Z")

</div>

Hi [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811) 👋

I’ve gone into the PHP SDK and dumped the JSON payload before it sends the request, below is the payload which is producing the above error.

`{"requiredProperties":[],"searchableProperties":["oub_ref","formatted_address"],"primaryDisplayProperty":"oub_ref","secondaryDisplayProperties":["formatted_address"]}`

This morning, when I attempted the request again, I got new, slightly different error message:

`cobject-delete-owned-1 is not a valid scope`

Hope that helps!  
Thanks for your help

---

<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 10, 2025, 10:25pm UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/4 "2025-01-10T22:25:48Z")

</div>

Hi @Graham-OUB 👋

Thanks for sharing the additional information. I’ve been able to replicate the issue you’re experiencing and agree there seems to be an issue with this endpoint.

[@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) [@BérangèreL](https://community.hubspot.com/t5/user/viewprofilepage/user-id/230185) Would you please take a look at this? It’s the “Update a schema” endpoint: [Schemas API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/latest/crm/objects/schemas/guide)

I’ve tried multiple different approaches, but it seems even the simplest call to update an existing custom object’s schema is resulting in an error similar to that described by @Graham-OUB. Thanks 🙌

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 10, 2025, 11:27pm UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/5 "2025-01-10T23:27:01Z")

</div>

Hey, [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811) 👋 Thanks for the tag. I’ll get this added to my tasks. I’ll update here or post any additional requests I get. — Jaycee

---

<div class="post-metadata">

**Author:** ![Graham-OUB](https://avatars.discourse-cdn.com/v4/letter/g/ed655f/32.png) [@Graham-OUB](https://community.hubspot.com/u/Graham-OUB)\
**Post date:** [January 13, 2025, 9:32am UTC](https://community.hubspot.com/t/unable-to-patch-schema/123590/6 "2025-01-13T09:32:25Z")

</div>

Thanks [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) and [@zach\_threadint](https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811) for looking into this, much appreicated.

Let me know if you need anymore information from me.
