Skip to content

Create policy

POST
/api/v1/organizations/{orgId}/policies
curl --request POST \
--url https://localhost:10001/api/v1/organizations/1/policies \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "controls": [ { "citations": [ { "title": "example", "url": "example" } ], "controlCode": "example", "createdAt": "example", "description": "example", "id": 1, "policyId": 1, "title": "example", "updatedAt": "example" } ], "createdAt": "example", "description": "example", "iconUrl": "example", "id": 1, "name": "example", "organizationId": 1, "slug": "example", "type": "Risk Management", "updatedAt": "example", "version": "example" }'

Create a new policy within an organization and return the persisted record

orgId
required
integer

Organization ID

Policy object

Media type application/json
object
controls

Controls within the policy, omitted but populated in list operations

Array<object>
object
citations
Array<object>
object
title
string
url
string
controlCode
string
createdAt
string
description
string
id
integer
policyId
integer
title
string
updatedAt
string
createdAt
string
description
string
iconUrl
string
id
integer
name
string
organizationId
integer
slug
string
type

Risk Management, Internal, Regulatory, Custom

string
Allowed values: Risk Management Internal Regulatory Custom
updatedAt
string
version
string

Created policy

Media type application/json
object
controls

Controls within the policy, omitted but populated in list operations

Array<object>
object
citations
Array<object>
object
title
string
url
string
controlCode
string
createdAt
string
description
string
id
integer
policyId
integer
title
string
updatedAt
string
createdAt
string
description
string
iconUrl
string
id
integer
name
string
organizationId
integer
slug
string
type

Risk Management, Internal, Regulatory, Custom

string
Allowed values: Risk Management Internal Regulatory Custom
updatedAt
string
version
string
Example
{
"type": "Risk Management"
}

Bad request - Invalid organization ID or request body

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Unauthorized - Authentication required

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Forbidden - No organization access or insufficient permissions

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Organization not found

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}

Internal server error

Media type application/json
object
key
additional properties
string
Example generated
{
"additionalProperty": "example"
}