c# – Azure Custom Vision Api POST Request error, even correct ID’s

I’m trying to publish my Custom Vision Iteration after I trained it. But I always get a “Bad Request” Error.

I’m trying with the following line of code:

trainingApi.PublishIteration(ProjectID, iteration.Id, "Model", predictionResourceId);

It should Publish my Iteration but I just get an error.

I re-checked all my ID’s but everything looks fine. Has the model name be something specific (start with lower letter or something)?

I tried it now with a POST Request in Postman but now I receive:

    "code": "BadRequestInvalidPublishTarget",
    "message": "Invalid prediction resource id"

But I re-checked my Prediction Resource ID and it’s correct.