APIs & Integrations

Venkateshwar
Participant | Partner
Participant | Partner

How to show response successful message for 204 status

Hi I have used the submit data to the form API.

https://developers.hubspot.com/docs/methods/forms/submit_form the POST data successfully passed to HubSpot list need to show a success message while posting the data. Now no content on body.

How to so any content while posting the data.

0 Upvotes
5 Replies 5
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

How to show response successful message for 204 status

Hi @Venkatesh_Srikanth,

The form submission endpoint doesn't give you any information if the submission is successful; whether or not the contact exists doesn't affect the response. The response from the form submission endpoint can be any of the following:

  • 204 when the form submissions is successful
  • 302 when the form submissions is successful and a redirectUrl is included or set in the form settings.
  • 404 when the Form GUID is not found for the provided Portal ID
  • 500 when an internal server error occurs
0 Upvotes
Venkateshwar
Participant | Partner
Participant | Partner

How to show response successful message for 204 status

If Posting same email same contact also return 204 status it does't show the contact already exists. How to show different status ?

  1. Already Exists
  2. Error
  3. Invalid email
  4. Success
0 Upvotes
Venkateshwar
Participant | Partner
Participant | Partner

How to show response successful message for 204 status

Please response something

0 Upvotes
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

How to show response successful message for 204 status

Hi @Venkatesh_Srikanth,

I'm not sure I'm clear on the issue you're describing; a 204 No Content is the expected success response for this endpoint; if you receive a 204, you can assume that the form submission was accepted. What is the data that you need?

0 Upvotes
Venkateshwar
Participant | Partner
Participant | Partner

How to show response successful message for 204 status

On the body part need some text like Success / Failed messages.

0 Upvotes