Skip to main content

Approval Workflows

Template promotion between environments can require approval from designated reviewers. This guide covers the approval workflow for template governance.

Overview​

When a template is promoted (e.g., from development to production), an approval may be required based on your organization's governance settings. Approvers can review the template changes and approve or reject the promotion.

Listing Pending Approvals​

View approvals waiting for review. Requires docgen:read scope.

curl "https://api.propper.ai/v1/docgen/approvals/pending" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Response:

{
"data": [
{
"id": "apr_def456",
"templateId": "tmpl_abc123",
"templateName": "Welcome Letter",
"requestedBy": "user@example.com",
"targetEnvironment": "PROD",
"status": "PENDING",
"createdAt": "2024-01-15T10:00:00Z"
}
]
}

Reviewing an Approval​

Approve​

Approve a pending template promotion. Requires docgen:admin scope.

curl -X POST "https://api.propper.ai/v1/docgen/approvals/{approvalId}/approve" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"comment": "Reviewed and approved. Template content and merge fields look correct."
}'

Reject​

Reject a pending template promotion with a reason. Requires docgen:admin scope.

curl -X POST "https://api.propper.ai/v1/docgen/approvals/{approvalId}/reject" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"comment": "Template has formatting issues in the footer section. Please fix and resubmit."
}'

Approval Status Flow​

StatusDescription
PENDINGWaiting for review
APPROVEDPromotion approved, template is being promoted
REJECTEDPromotion rejected, template remains unchanged

Viewing Approval History​

List all approvals for a specific template.

curl "https://api.propper.ai/v1/docgen/approvals?templateId={templateId}" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"