`api_client.FormsApi.update()` failing for forms created via `new-editor` web UI.
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
Research direction
Start by reproducing the update with the provided Python script and equivalent curl requests for legacy and new-editor forms. Compare the v3 and v4 endpoints and record whether the allowlist response occurs independently of the SDK. Done means identifying the API-side restriction and either restoring supported updates or documenting the required access and endpoint.
Written by the indexing model from the issue text.
Description
Please note that this is an issue with the API in general, not specifically the Python SDK, as I get the same response when I run curl PUT or PATCH commands against the API.
To reproduce:
- Create a form via the web UI using the legacy editor
- Create a form via the web UI using the new editor
- Run the following script (replace placeholders)
import hubspot
from hubspot.marketing.forms import ApiException
client = hubspot.Client.create(access_token="PAT_TOKEN")
LEGACY_FORM_ID = "LEGACY_FORM_ID_HERE"
NEW_FORM_ID = "NEW_FORM_ID_HERE"
def main():
# works as expected
legacy_form_def = get_form_by_id(LEGACY_FORM_ID)
legacy_form_def.name = "UPDATED_LEGACY_FORM_NAME"
update_legacy_form_response = update_form(LEGACY_FORM_ID, legacy_form_def)
# fails
new_form_def = get_form_by_id(NEW_FORM_ID)
new_form_def.name = "UPDATED_NEW_FORM_NAME"
update_new_form_response = update_form(NEW_FORM_ID, new_form_def)
def update_form(form_id, form_data):
try:
api_response = client.marketing.forms.forms_api.update(form_id=form_id, hub_spot_form_definition_patch_request=form_data)
return api_response
except ApiException as e:
print("Exception when calling forms_api->update: %s\n" % e)
return None
def get_form_by_id(form_id):
try:
api_response = client.marketing.forms.forms_api.get_by_id(form_id=form_id)
return api_response
except ApiException as e:
print("Exception when calling forms_api->get_by_id: %s\n" % e)
return None
if __name__ == "__main__":
main()
Response when trying to update the form created via the new editor:
HTTP response body: {"status":"error","message":"The client is not allowlisted to perform an operation to v4 forms","correlationId":"4821afe0-8303-4adc-a358-55cd48a70bfb","category":"BANNED"}
What I've tried so far:
- Updated the URL from
https://api.hubapi.com/marketing/v3/forms/{form_id}tohttps://api.hubapi.com/marketing/v4/forms/{form_id} - Finding v4 marketing->form docs online (can't find them)
- Dominant language
- Python
- Stars
- 434
- Forks
- 126
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from HubSpot/hubspot-api-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
HubSpot/hubspot-api-python#497 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
HubSpot/hubspot-api-python#498 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
HubSpot/hubspot-api-python#496 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
HubSpot/hubspot-api-python#495 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
HubSpot/hubspot-api-python#494 ·
All issues in HubSpot/hubspot-api-python
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anthropics/skills#1811 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
speaches-ai/speaches#678 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
datalayer/mcp-compose#42 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
conda-forge/spacy-feedstock#177 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
UKGovernmentBEIS/inspect_evals#2523 ·