APIs & Integrations

MCarreiro
Participante

Forms API: Setting to Legacy

resolver

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 Soluciones aceptada
MCarreiro
Solución
Participante

Forms API: Setting to Legacy

resolver

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.

Ver la solución en mensaje original publicado

0 Me gusta
2 Respuestas 2
GRajput
Asesor destacado | Partner nivel Platinum
Asesor destacado | Partner nivel Platinum

Forms API: Setting to Legacy

resolver

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 Me gusta
MCarreiro
Solución
Participante

Forms API: Setting to Legacy

resolver

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 Me gusta