Error Adding New App Policy

Trying to use this curl script:

curl -X POST “{my-zone-id}/access/apps/{my-app-id}/policies” ^
-H “Authorization: Bearer {my-token}” ^
-H “Content-Type: application/json” ^
–data ‘{“decision”:“allow”,“name”:“Test Policy”,“include”:[{“email”:{“email":"[email protected]”}}]}’

I’m getting the following response:

“result”: null,
“success”: false,
“errors”: [
“code”: 11017,
“message”: “access.api.error.invalid_policy”

I’ve already run other curl scripts to verify that my {zone-id} and {app-id} are correct and I’m able to fetch the access policies already assigned to my app. I just can’t add a new one…Incidentally, I also get the same error message if I try to update an existing access policy using the PUT method (and associated {policy-id}.

According to the API docs, I’m including all of the required parameters…Thoughts on what I could be doing wrong?

1 Like

Same here. Did you find a resolution?