Hi -
We’re trying to create a custom job that enrolls a specific customer based on checks we do.
Im trying to call this specific api https://api.hubapi.com/automation/v2/workflows/:workflowId/enrollments/contacts/:email
but im always getting the error. I have validated the email and workflow id to be existing and set the proper permissions for the bearer token being used.
Where did you grab the workflow ID? I did a test and used what I thought was the ID which I grabbed from the url in browser, but noticed it does not mirror the id given when I get all workflows through the API. When I used the ID given from the API, it worked. Otherwise, I received the same error that you did.
Did grabbing the ID from the workflow get api work for you? I’m using a valid ID and contact email and cannot get it to work. I get a 404 no matter which way I send the request. Could there be something else I’m missing? Thanks.
you have to fetch them through the api and get the id from the response, the id in the url is actually a different identifier which is not the identifier that the api uses.
I’ve talked with the support team and this was expected behaviour.
Thanks for getting back so quick iMarquez I started by grabbing the id from the URL, but am now using the “workflowId” variable from the get api with the same result. Must be a different problem. Maybe because I’m using the HAPI key in the url and it’s getting phased out?