Policies

Attach a policy

Attach a policy to a document.

post/v1beta/documents/{document_id}/policies

Path parameters

document_idstring required

Document ID. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

Example:doc_01h2xcejqtf2nbrexx3vqjhp41

Document ID. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

Request body

policy_idstring required

Policy ID to attach. Pattern: pol_[0-9a-hjkmnp-tv-z]{26}

Example request

{
  "policy_id": "pol_01h2xcejqtf2nbrexx3vqjhp41"
}

Response

Success

attached_atstring date-time required

Timestamp when policy was attached.

document_idstring required

Document ID this policy is attached to. Pattern: doc_[0-9a-hjkmnp-tv-z]{26}

Example response

{
  "document_id": "doc_01h2xcejqtf2nbrexx3vqjhp41",
  "policy": {
    "id": "pol_01h2xcejqtf2nbrexx3vqjhp41",
    "name": "GDPR Compliance Policy"
  }
}

Changes

Changed in 1 of the 50 revisions of this API.1

    • removed the required property attached_by from the response with the 200 status

      response-required-property-removed

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog