Update Devin CLI Team Permission Rules
curl --request PUT \
--url https://server.codeium.com/api/v2alpha/cli-permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"allow": [
"<string>"
],
"ask": [
"<string>"
],
"deny": [
"<string>"
]
}
'import requests
url = "https://server.codeium.com/api/v2alpha/cli-permissions"
payload = {
"allow": ["<string>"],
"ask": ["<string>"],
"deny": ["<string>"]
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({allow: ['<string>'], ask: ['<string>'], deny: ['<string>']})
};
fetch('https://server.codeium.com/api/v2alpha/cli-permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.codeium.com/api/v2alpha/cli-permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allow' => [
'<string>'
],
'ask' => [
'<string>'
],
'deny' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v2alpha/cli-permissions"
payload := strings.NewReader("{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://server.codeium.com/api/v2alpha/cli-permissions")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2alpha/cli-permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyAPI Reference
Update Devin CLI Team Permission Rules
Replace your team’s account-wide Devin CLI permission rules (allow, ask, and deny) with ETag concurrency control via the API.
PUT
/
api
/
v2alpha
/
cli-permissions
Update Devin CLI Team Permission Rules
curl --request PUT \
--url https://server.codeium.com/api/v2alpha/cli-permissions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'If-Match: <if-match>' \
--data '
{
"allow": [
"<string>"
],
"ask": [
"<string>"
],
"deny": [
"<string>"
]
}
'import requests
url = "https://server.codeium.com/api/v2alpha/cli-permissions"
payload = {
"allow": ["<string>"],
"ask": ["<string>"],
"deny": ["<string>"]
}
headers = {
"If-Match": "<if-match>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {
'If-Match': '<if-match>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({allow: ['<string>'], ask: ['<string>'], deny: ['<string>']})
};
fetch('https://server.codeium.com/api/v2alpha/cli-permissions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://server.codeium.com/api/v2alpha/cli-permissions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'allow' => [
'<string>'
],
'ask' => [
'<string>'
],
'deny' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"If-Match: <if-match>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://server.codeium.com/api/v2alpha/cli-permissions"
payload := strings.NewReader("{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("If-Match", "<if-match>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://server.codeium.com/api/v2alpha/cli-permissions")
.header("If-Match", "<if-match>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://server.codeium.com/api/v2alpha/cli-permissions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["If-Match"] = '<if-match>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"allow\": [\n \"<string>\"\n ],\n \"ask\": [\n \"<string>\"\n ],\n \"deny\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_bodyOverview
Replaces your team’s account-wide Devin CLI permission rules — the same Terminal Permissions configured in team settings. To prevent overwriting concurrent changes, pass theETag from Get CLI Permissions in the If-Match header. If the rules changed in the meantime, the request fails with 412.
This endpoint is in alpha (
v2alpha). The request and response shape may change.Authentication
Pass a Devin service user API key (cog_...) in the Authorization header:
Authorization: Bearer <api-key>
403.
Request
Actions Devin CLI approves automatically without prompting. Pass
[] for an empty list.400. Fetch(...) URL patterns are not validated by this endpoint — Devin CLI ignores patterns it cannot compile.
Example Request
ETAG=$(curl -s -D - -o /dev/null https://server.codeium.com/api/v2alpha/cli-permissions \
-H "Authorization: Bearer $DEVIN_API_KEY" | awk 'tolower($1)=="etag:" {print $2}' | tr -d '\r')
curl -X PUT https://server.codeium.com/api/v2alpha/cli-permissions \
-H "Authorization: Bearer $DEVIN_API_KEY" \
-H "If-Match: $ETAG" \
-H "Content-Type: application/json" \
-d '{"allow": ["Exec(git)", "Read(**)"], "ask": ["Fetch(domain:*)"], "deny": ["ExecExact(rm -rf /)"]}'
Response
Returns the updatedallow, ask, and deny lists with a new ETag header, matching Get CLI Permissions. Successful updates are recorded in the team audit log.
Error Responses
Errors are returned as{"error": "<message>"}.
| Status | Cause |
|---|---|
400 | Invalid JSON, unknown fields, missing allow, ask, or deny, or an unparseable permission rule |
401 | Missing or invalid API key, or a legacy Windsurf API key (only Devin cog_... service user keys are accepted) |
403 | Personal token used instead of a service user key, missing Devin Desktop access or account.windsurf.admin permission, or account is not on a Teams or Enterprise plan |
412 | If-Match does not match the current ETag; fetch the rules again and retry |
428 | Missing If-Match header |
429 | Rate limit exceeded; retry after the Retry-After header |

