Skip to main content
POST
/
v1
/
admin
/
legal
/
policies
/
assignments
Create a policy assignment
curl --request POST \
  --url https://{operatorDomain}/v1/admin/legal/policies/assignments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "<string>",
  "policyId": "<string>",
  "targetType": "product",
  "targetId": "<string>"
}
'
{
  "data": {
    "id": "<string>",
    "policyId": "<string>",
    "targetType": "product",
    "targetId": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Staff session or API token issued by your Voyant app.

Body

application/json
id
string
required
policyId
string
required
targetType
string
Example:

"product"

targetId
string

Response

201 - application/json

Created assignment

data
object