Policies

Create a policy

POST
/api/v1/policies

Create a new policy with the given name, key and description.

Authorization

AccessToken
Authorization<token>

Use access token to access this API. Example: "Authorization: api-MzQ..."

In: header

Header Parameters

Organization?string

The organization ID associated with the request. Some APIs require this header to identify the organization context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Workspace?string

The workspace ID associated with the request. Some APIs require this header to identify the workspace context. When authenticating with an Access Token, this header is automatically populated from the token and does not need to be provided manually.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

curl -X POST "https://example.com/api/v1/policies" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "errors": [    "string"  ],  "data": {    "id": "string",    "name": "string",    "key": "string",    "type": "string",    "description": "string",    "statements": [      {        "id": "string",        "resourceType": "string",        "effect": "string",        "actions": [          "string"        ],        "resources": [          "string"        ]      }    ],    "updatedAt": "2019-08-24T14:15:22Z"  }}