# Workflow Enrollment returns 204 even when Workflow is inactive

**URL:** <https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169>\
**Category:** APIs & Integrations\
**Tags:** workflows\
**Created:** [November 12, 2019, 6:12pm UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169 "2019-11-12T18:12:16Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![iamEAP](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/iameap/32/55403_2.png) [@iamEAP](https://community.hubspot.com/u/iamEAP)\
**Post date:** [November 12, 2019, 6:12pm UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/1 "2019-11-12T18:12:16Z")

</div>

I’m working on a HubSpot integration which allows HubSpot Contacts to be enrolled in specified Workflows. In the course of testing, I’ve discovered that the [Enroll a contact into a workflow](https://developers.hubspot.com/docs/methods/workflows/add_contact) endpoint will return a 204 response, even when the given Workflow is inactive.

When immediately [checking the Contact’s enrollments](https://developers.hubspot.com/docs/methods/workflows/current_enrollments) thereafter, the Workflow does not appear in the list. Also, none of the actions in the Workflow (e.g. property updates, email sends, etc.) are executed.

I would have expected a non-200 response code in the case above. Is this a bug?

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [November 13, 2019, 3:18am UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/2 "2019-11-13T03:18:53Z")

</div>

Hi @iamEAP,

I’m also seeing that if I enroll a contact into an inactive workflow using this [endpoint](https://developers.hubspot.com/docs/methods/workflows/add_contact) \> I received a 204 response. I would expect a 4xx errors as the contacts didn’t get enrolled into the workflow successfully (as workflow is inactive) and so I’ll have to check in with my team on this. Keep you posted!

---

<div class="post-metadata">

**Author:** ![iamEAP](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/iameap/32/55403_2.png) [@iamEAP](https://community.hubspot.com/u/iamEAP)\
**Post date:** [November 26, 2019, 9:53pm UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/3 "2019-11-26T21:53:44Z")

</div>

Thanks for the quick response, Wendy. Curious to hear if there are any updates on this.

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [November 27, 2019, 1:42am UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/4 "2019-11-27T01:42:37Z")

</div>

Hi @iamEAP,

Our team is still working on a fix for this and I’ll definitely keep you posted when I’ve updates on this. Thank you for your patience!

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [December 18, 2019, 4:09am UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/5 "2019-12-18T04:09:33Z")

</div>

Hey @iamEAP,

Thank you for your patience! Here’s an update:

When trying to enroll contact into an **inactive** workflow via the [Enroll a contact into a workflow | Workflows API](https://developers.hubspot.com/docs/methods/workflows/add_contact), it’ll return with a 412 with the following error message:

`message:"Workflow is OFF"`

On my end, I have tested it out and I’m able to confirm that it works.

Do let me know if it’s working well for you and/or if there’s any question on this!

---

<div class="post-metadata">

**Author:** ![iamEAP](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/iameap/32/55403_2.png) [@iamEAP](https://community.hubspot.com/u/iamEAP)\
**Post date:** [December 19, 2019, 4:46am UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/6 "2019-12-19T04:46:16Z")

</div>

Confirmed the fix on our end as well! Closing out our [downstream issue](https://github.com/run-crank/cog-hubspot/issues/19) as a result.

Thanks @WendyGoh for confirming, reporting, and following-up. And please pass along my thanks to those who implemented the fix in the API.

This all gives me huge confidence (and warm fuzzies) about HubSpot as a product, service, and brand.

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [December 20, 2019, 9:20am UTC](https://community.hubspot.com/t/workflow-enrollment-returns-204-even-when-workflow-is-inactive/17169/7 "2019-12-20T09:20:15Z")

</div>

Hey @iamEAP,

Glad to know that it’s working on your end as well 🙂
