The request consistently returns a 204 No Content response. For example, when I intentionally pass an invalid contact ID, I would expect to receive an error code, but the API still responds with 204.
In the HubSpot Admin panel, the enrollment appears to be skipped, even though the API call reports success.
Hi @AravinthKumar , this behavior is confusing, but it’s actually expected with the Automation v2 enrollment endpoint you’re using. A 204 No Content response from POST/automation/v2/workflows/{workflowId}/enrollments/contacts/{contactId} only means that HubSpot accepted the request, not that the contact was successfully enrolled. The API does not validate things like contact existence, enrollment criteria, suppression rules, or re-enrollment settings synchronously.
All of that logic runs later inside the workflow engine, which is why you see the enrollment marked as “skipped” in the UI even though the API call returned 204.
This also explains why passing an invalid contact ID still returns 204. The v2 endpoint does not perform strict input validation or return enrollment errors. HubSpot documents this implicitly by listing 204 as the successful response and not documenting error payloads for failed enrollments (https://developers.hubspot.com/docs/api-reference/automation-automation-v4-v4/guide )
A safer pattern is:
Validate that the contact exists first using the CRM Contacts API.
Make the enrollment call.
Then confirm enrollment status by checking workflow enrollment history or workflow logs, rather than relying on the HTTP response alone.
One quick check: is this workflow using enrollment triggers, or is it configured for manual/API enrollment only? Trigger-based workflows are the most common reason enrollments appear as “skipped” even when the API call succeeds.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
Thank you for your response. Yes, we use trigger‑based workflows. We’ve disabled reenrollment and are now looking for the API to return a response indicating that the user is already enrolled.
Hi @AravinthKumar and thanks so much for sharing those details!
A 204 (No Content) response usually means your request went through successfully, but there’s no additional data to return. For trigger-based workflows where reenrollment is disabled, the API doesn’t currently provide a specific response code or message if a contact is already enrolled.
Here are a couple of approaches you might find helpful:
- You can use the legacy endpoint GET /automation/v2/workflows/enrollments/contacts/{vid} to check which workflows a contact is already enrolled in before attempting enrollment. - Alternatively, check the contact’s enrollment status separately before making the enrollment request.
If this doesn’t quite address your needs, I’d recommend sharing this as a feature request in our Ideas Forum, the feedback is always appreciated.
Hope this helps point you in the right direction! Bérangère
This post was created with the assistance of AI tools
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.