Unenroll contacts from workflow not apparently working


I get a 204 response just like when adding to the workflow which works, but there is no visible effect on the Hubspot ui. The same two contacts are in the workflow no matter how many times i remove them via api. What does this 204 response code mean? Is this delayed? Are contacts removed form workflows as a cron job or something? here is a request/response form the logs:

{ statusCode: 204,
  body: undefined,
   { 'access-control-allow-credentials': 'false',
     'x-trace': '1B2EEBD0F162550A1E29EFF471A2292FEF746FBEE9943B853DCEB1E438',
     date: 'Fri, 04 Nov 2016 22:10:10 GMT',
     connection: 'close' },
   { uri:
      Url {
        protocol: 'https:',
        slashes: true,
        auth: null,
        host: 'api.hubapi.com',
        port: 443,
        hostname: 'api.hubapi.com',
        hash: null,
        search: null,
        query: null,
        pathname: '/automation/v2/workflows/1536062/enrollments/contacts/ralph@example.com',
        path: '/automation/v2/workflows/1536062/enrollments/contacts/ralph@example.com',
        href: 'https://api.hubapi.com/automation/v2/workflows/1536062/enrollments/contacts/ralph@example.com' },
     method: 'DELETE',
      { Authorization: 'Bearer CENSORED',
        accept: 'application/json',
        'content-length': 0 } 

Low priority, but thanks for any help.


Hi @Ralph_Samuel

Can you send me a link to the contact records and workflows that you’re seeing this with?


Here is the workflow:
It has 2 fake contacts in it. I attempted to remove them shortly after
putting them in. Not sure how to drill down to find links to the individual
contacts in there but there are only two…


Thanks @Ralph_Samuel. Looking at the history for that workflow, I do see two contacts that have been in the workflow, but I also see that both contacts were manually removed using the API, both on November 4th:

The workflow also shows 0 active contacts, and 0 contacts that have completed the workflow. Are you seeing something else that shows the contacts as still in the workflow?


Hi David–

So I think maybe i am misunderstanding the terminology used here. maybe
this endpoint doesn’t actually unenroll but rater makes then not active? I
just ran through a short test with a screencast. You can watch it here.

I am setting up the add/remove from workflow trigger action in our
automation interface. I am triggering the action in postman. (just to
give you context on what’s happening in the screen.) Basically the history
shows that a contact was unenrolled but the number of enrolled contacts
never goes down. For your info, here is the remove from workflow request
that happened along with this screen cast:

Request sent: { statusCode: 204,
body: undefined,
{ ‘access-control-allow-credentials’: ‘false’,
date: ‘Tue, 08 Nov 2016 22:16:57 GMT’,
connection: ‘close’ },
{ uri:
Url {
protocol: ‘https:’,
slashes: true,
auth: null,
host: ‘api.hubapi.com’,
port: 443,
hostname: ‘api.hubapi.com’,
hash: null,
search: null,
query: null,
pathname: ‘/automation/v2/workflows/1536062/enrollments/contacts/
path: ‘/automation/v2/workflows/1536062/enrollments/contacts/
href: ‘
method: ‘DELETE’,
{ Authorization: ‘Bearer XXX’,
accept: ‘application/json’,
‘content-length’: 0 } } }



The Total contacts enrolled count is the number of contacts that have ever started the workflow, so that count won’t go down, whether a contact finishes all of the steps or a contact is removed or unenrolled. The Active contacts count will go down, since that count tracks how many contacts are currently executing or waiting to execute steps.


Ok just a misunderstanding of terminology. Sorry about that.


Hi, thanks for this explanation, however a question for clarity: does this mean the API is not actually "unenrolling" a contact from a workflow? Will I be able to re-enroll a contact, once I've used the API to "unenroll" them from the workflow? That's my whole purpose for using the DELETE contact from a workflow so as to be able to re-enroll them into the workflow as necessary.

Thanks for any and all suggestions!


Hi @marshre,

This endpoint truly does unenroll a contact from a workflow, so you can certainly use this endpoint to re-enroll contacts.

I just tested and confirmed this works with a workflow set to manual enrollment:



Hi @Isaac_Takushi, I hadn't tried it this way around and it works out even better. Thanks for the tip to change my workflow to manual enrollment because now it isn't necessary to unenroll the contact from the workflow at all. Just using the endpoint to enroll allows my contacts to be re-enrolled to the workflow via the API endlessly.

Thanks a bunch for the advice!!!


I'm glad I could help, @marshre!