posthubspothttp-status-code-415

Hubspot Form Submission returning 415 Unsupported Media Type


I have a simple HTML signup form posting to Hubspot. When I put the form in my website (via WordPress) it renders fine. When I enter values and press submit, the request is made, but the response keeps being a 415 "Unsupported Media Type".

Here's the relevant html of the form (id and class attributes have been removed):

<form method="POST" enctype="application/x-www-form-urlencoded" accept-charset="UTF-8" novalidate="" action="https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/49109990/6f68eafc-7fb5-46c6-ade6-96a3967e2662">
                    <input required="" placeholder="your@email.com" type="email" name="email" inputmode="email" autocomplete="email">
                    <input required="" placeholder="First Name" type="text" name="firstname" inputmode="text" autocomplete="given-name">
                    <input required="" placeholder="Last Name" type="text" name="lastname" inputmode="text" autocomplete="family-name">
                    <button data-slot="button" type="submit" value="Submit">Subscribe</button>
</form>

Here are the Request Headers:

    POST /submissions/v3/public/submit/formsnext/multipart/49109990/6f68eafc-7fb5-46c6-ade6-96a3967e2662 HTTP/3
    Host: forms.hsforms.com
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-US,en;q=0.5
    Accept-Encoding: gzip, deflate, br, zstd
    Referer: https://integrate-ed.org/
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 62
    Origin: https://integrate-ed.org
    DNT: 1
    Connection: keep-alive
    Cookie: _cfuvid=j2i2MKFliRHQZNCjR2ulXTUv7VMaTb7yvk3oJUEp_T4-1744995552742-0.0.1.1-604800000; __cf_bm=GrlGyMDPZTtk1bubUCfnxfuDbgEMV1inx5d.y18S4tk-1745001493-1.0.1.1-hqL0bqpkQlz0tXocL5TTSg1zAcCjOja0eOkTKV2vM8kE_QhTlC0_BJe.b9NmaJme01hSDU39dOUP7ZhSS_.Ih8Hvw5sOuB2S49DnSNHNYWU
    Upgrade-Insecure-Requests: 1
    Sec-Fetch-Dest: iframe
    Sec-Fetch-Mode: navigate
    Sec-Fetch-Site: cross-site
    Sec-Fetch-User: ?1
    Priority: u=6

The Request payload is:

email=test_german%40nowhere.com&firstname=Test&lastname=German

I've looked up possible solutions, and tried several, most notably:

In case this is useful, the Response Headers are:

POST
https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/49109990/6f68eafc-7fb5-46c6-ade6-96a3967e2662
[HTTP/3 415  164ms]

    
POST
    https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart/49109990/6f68eafc-7fb5-46c6-ade6-96a3967e2662
Status
415
VersionHTTP/3
Transferred1.23 kB (237 B size)
Referrer Policystrict-origin-when-cross-origin
DNS ResolutionDNS over HTTPS
Blocking
Enhanced Tracking Protection
This URL matches a known tracker and it would be blocked with Content Blocking enabled.

        
    HTTP/3 415 

    date: Fri, 18 Apr 2025 18:45:02 GMT

    content-type: text/html;charset=iso-8859-1

    cache-control: max-age=0, no-cache, no-store

    access-control-allow-origin: https://integrate-ed.org

    access-control-allow-methods: OPTIONS, POST

    access-control-allow-headers: *

    access-control-allow-credentials: false

    vary: origin

    x-content-type-options: nosniff

    x-envoy-upstream-service-time: 2

    x-evy-trace-route-service-name: envoyset-translator

    x-evy-trace-virtual-host: all

    x-hubspot-correlation-id: d5fa1e17-d5a8-406e-802f-abcbcef0ec12

    x-evy-trace-served-by-pod: iad02/star-hubspot-td/envoy-proxy-5c76648889-lj6zk

    x-evy-trace-listener: listener_https

    x-evy-trace-route-configuration: listener_https/all

    x-request-id: d5fa1e17-d5a8-406e-802f-abcbcef0ec12

    cf-cache-status: DYNAMIC

    priority: u=6,i=?0

    strict-transport-security: max-age=31536000; includeSubDomains; preload

    server: cloudflare

    cf-ray: 9326511f585f6204-ORD

    alt-svc: h3=":443"; ma=86400

    server-timing: cfExtPri
        
    Accept
        text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Encoding
        gzip, deflate, br, zstd
    Accept-Language
        en-US,en;q=0.5
    Connection
        keep-alive
    Content-Length
        62
    Content-Type
        application/x-www-form-urlencoded
    Cookie
        _cfuvid=j2i2MKFliRHQZNCjR2ulXTUv7VMaTb7yvk3oJUEp_T4-1744995552742-0.0.1.1-604800000; __cf_bm=GrlGyMDPZTtk1bubUCfnxfuDbgEMV1inx5d.y18S4tk-1745001493-1.0.1.1-hqL0bqpkQlz0tXocL5TTSg1zAcCjOja0eOkTKV2vM8kE_QhTlC0_BJe.b9NmaJme01hSDU39dOUP7ZhSS_.Ih8Hvw5sOuB2S49DnSNHNYWU
    DNT
        1
    Host
        forms.hsforms.com
    Origin
        https://integrate-ed.org
    Priority
        u=6
    Referer
        https://integrate-ed.org/
    Sec-Fetch-Dest
        iframe
    Sec-Fetch-Mode
        navigate
    Sec-Fetch-Site
        cross-site
    Sec-Fetch-User
        ?1
    Upgrade-Insecure-Requests
        1
    User-Agent
        Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:137.0) Gecko/20100101 Firefox/137.0

Can someone please help me figure out why the request is not successful?


Solution

  • After sleeping on it, I went back to the old website with the form that worked and checked the Request and Response Headers there. There was no difference anywhere I could see between the Headers on the old website's form and the new website's form.

    Then I looked at the POST attributes, and the single difference was that the old working form said "Version: HTTP/2" while my new form said "Version: HTTP/3". After some research, it turns out Hubspot does not support HTTP/3 unless you are using AJAX!

    THE SOLUTION: Was to switch my form to POST to Hubspot's v2 API using forms.hubspot.com/uploads/form/v2
    and NOT use the v3 API of https://forms.hsforms.com/submissions/v3/public/submit/formsnext/multipart