Skip to main content

Assign Policy to Group

Assigns a policy to a group. All current members of the group are governed by the policy’s access rules.
POST /v1/docks/:dockId/groups/:id/assign-policy

Path Parameters

ParameterTypeDescription
dockIdstringThe dock ID
idstringThe group ID

Request Body

ParameterTypeRequiredDescription
policyIdstringRequiredThe policy ID to assign

Example Request

curl -X POST https://api.docyard.io/v1/docks/dock_01HQ3K.../groups/grp_01HQ3R.../assign-policy \
  -H "Authorization: Bearer dk_live_a1b2c3d4..." \
  -H "Content-Type: application/json" \
  -d '{ "policyId": "pol_01HQ3P..." }'

Response

{
  "success": true,
  "policyId": "pol_01HQ3P...",
  "recipientCount": 47
}

Error Handling

StatusCondition
401Missing or invalid API key
404Group, dock, or policy not found