Christie Molloy
10/15/2025, 12:05 PMcurl '<https://api.permit.io/v2/projects/><proj-id>/envs/dev' -X 'PATCH' \
-H 'authorization: Bearer <my-key>'\
--data-raw '{"custom_branch_name": "development"}'Ask Inkeep
10/15/2025, 12:05 PMAsk Inkeep
10/15/2025, 12:05 PMcustom_branch_name field for an environment. (1) Your curl command syntax looks correct based on the documentation for updating an environment's custom branch name.
The correct endpoint format for updating an existing environment's custom branch name is:
curl '<https://api.permit.io/v2/projects/{project_id}/envs/{env_id}>' -X 'PATCH' \
-H 'authorization: Bearer {API_SECRET_KEY}'\
--data-raw '{"custom_branch_name": "new-env-branch-name"}'
A few things to check:
1. *GitOps Configuration*: The custom branch name feature requires GitOps to be properly configured. Make sure the Policy Repo is activated on your project for the custom branch name to work properly. (2)
2. *Repository Activation*: You need to activate your repository in Permit after configuring it. This is done with:
curl -X PUT "<https://api.permit.io/v2/projects/<your-project-id-or-key>/repos/<your-repo-id-or-key>/activate>" -H "Authorization: Bearer <your-permit-api-key>"
To help our engineers investigate this issue further, could you please provide:
1. Which Workspace / Project / Env you are using
2. What calls you are performing (as SDK code or CURL)
3. Which PDP version you are running
4. Any relevant logs from your PDP
This information will help us determine wAsk Inkeep
10/15/2025, 12:05 PMChristie Molloy
10/15/2025, 12:07 PMAlon Boshi
10/15/2025, 12:08 PMAlon Boshi
10/15/2025, 12:09 PMChristie Molloy
10/15/2025, 12:14 PM"custom_branch_name":null when I GET the envAlon Boshi
10/15/2025, 12:32 PMYou need to activate your repository in Permit after configuring it.
Christie Molloy
10/15/2025, 1:41 PMThomas
10/15/2025, 1:46 PMAlon Boshi
10/15/2025, 3:57 PMcurl <https://api.permit.io/v2/projects/default/envs/dev> \
--request PATCH \
--header 'Content-Type: application/json' \
--data '{
"name": "",
"description": "",
"custom_branch_name": "<https://my-website.com/path/to/page>",
"settings": {}
}'