APIs & Integrations

MCarreiro
Participant

Forms API: Setting to Legacy

SOLVE

Hello,

I'm trying to use the Forms API to set my form's theme to "legacy" but I'm not having any luck.

I'm using a PATCH to the URL below:
http://api.hubapi.com/marketing/v3/forms/{form_id}

I'm receiving a 200 response, but the body does not look to be changing the theme of my form. It remains at "default_style".

 

I've attempted to change only the "theme" parameter, along with grouping it with other fields as follows:

{
"displayOptions": {
"renderRawHtml": true,
"theme": "legacy"
}
}

Does anyone have any advice on how I should be making this PATCH request to update the Form theme?


Thank you,

-Michael

1 Accepted solution
MCarreiro
Solution
Participant

Forms API: Setting to Legacy

SOLVE

Going to close this. I didn't need to set my form to "legacy" to achieve what I needed. Instead, I could just set it to raw HTML and get the intended effect.

View solution in original post

0 Upvotes
2 Replies 2
GRajput
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Forms API: Setting to Legacy

SOLVE

Hi @MCarreiro 

You can use the following curl: 

curl --location --request PUT 'https://api.hubapi.com/forms/v2/forms/27499d45-13a1-4a96-a01e-5bc6e5a15aea' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ACCESS_TOKEN' \
--data '{
    "name":"Enter form name here",
    "themeName":"legacy"
}'

 

I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!




Gaurav Rajput
Director, MarTech( Growth Natives)

Book a meeting


0 Upvotes
MCarreiro
Solution
Participant

Forms API: Setting to Legacy

SOLVE

Going to close this. I didn't need to set my form to "legacy" to achieve what I needed. Instead, I could just set it to raw HTML and get the intended effect.

0 Upvotes