POST Request for creating Tyk Policy fails

My request:

	"default": {
		"rate": 1000,
		"per": 1,
		"quota_max": 100,
		"quota_renewal_rate": 60,
		"access_rights": {
			"moo": {
				"api_name": "moo",
				"api_id": "moo",
				"versions": [
		"org_id": "moofarm",
		"hmac_enabled": false

My output that i get from running against /tyk/policies

    "status": "error",
    "message": "Failed to create file!"

Hi @IkePCampbell,
Thank you for posting your issue here.
Are you using the Open Source Tyk Gateway installed in Kubernetes?
If so, I can replicate your issue when using the Tyk Gateway installed in Kubernetes. It seems that you are running to the similar issue as this one posted in our Github page. As mentioned in the response, this is kind of expected, since in OSS version both API and Policy are files. You should get same error for API endpoint in this case. So you either mount some volume, make it writable and etc. Or create policies only as files, and do not use API, if you can’t make volume writable.

On the other hand, upon testing I can create the policy successfully when using the Tyk Gateway Open Source installed in my local docker.