cURL
curl --request POST \ --url https://api.veryfront.com/projects/{project_reference}/policies \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "<string>", "is_enabled": true, "target_branch_pattern": "<string>", "required_approvals": 123, "allow_self_approval": true, "required_reviewer_ids": [ "<string>" ], "required_reviewer_roles": [ "<string>" ], "block_direct_edits": true, "auto_merge_when_approved": true, "dismiss_approvals_on_change": true } '
{ "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a", "name": "<string>", "is_enabled": true, "target_branch_pattern": "<string>", "required_approvals": 123, "allow_self_approval": true, "required_reviewer_ids": [ "<string>" ], "required_reviewer_roles": [ "<string>" ], "block_direct_edits": true, "auto_merge_when_approved": true, "dismiss_approvals_on_change": true, "created_at": "<string>", "updated_at": "<string>" }
Authentication via JWT token or API key. JWT: Get from Veryfront dashboard. API Key: Format "vf__" - create via /api-keys endpoint.
Project ID or slug
Policy created