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!
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?
Hi @zach_threadint 
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
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 @BérangèreL Would you please take a look at this? It’s the “Update a schema” endpoint: Accounts Dashboard | HubSpot
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 
Hey, @zach_threadint
Thanks for the tag. I’ll get this added to my tasks. I’ll update here or post any additional requests I get. — Jaycee
Thanks @Jaycee_Lewis and @zach_threadint for looking into this, much appreicated.
Let me know if you need anymore information from me.