Get a user's usage policy
curl --request GET \
--url https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}', 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://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cycle_acu_limit_override": 123,
"effective_cycle_acu_limit": 123,
"email": "<string>",
"fallback_cycle_acu_limit": 123,
"fallback_tier_id": "<string>",
"fallback_tier_name": "<string>",
"limit_source": "override",
"membership": "explicit",
"name": "<string>",
"pending_request_cycle_acu_limit": 123,
"pending_request_id": "<string>",
"primary_cycle_acu_limit": 123,
"temporary_cycle_acu_limit": 123,
"tier_cycle_acu_limit": 123,
"tier_id": "<string>",
"tier_name": "<string>",
"user_id": "<string>"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Budgets (Enterprise)
Get a user's usage policy
Get the tier and per-cycle ACU limit currently enforced for a user.
Resolves the user’s tier (explicit assignment, else IdP group mapping, else the account default), their overrides, the effective limit, and any pending limit-increase request. Accepts human user ids and service-user ids; either must be an account member. Requires ManageAcuLimits because the response includes the user’s pending limit-increase request.
GET
/
v3
/
enterprise
/
usage-policies
/
budgets
/
{budget_id}
/
users
/
{user_id}
Get a user's usage policy
curl --request GET \
--url https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}', 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://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/usage-policies/budgets/{budget_id}/users/{user_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"cycle_acu_limit_override": 123,
"effective_cycle_acu_limit": 123,
"email": "<string>",
"fallback_cycle_acu_limit": 123,
"fallback_tier_id": "<string>",
"fallback_tier_name": "<string>",
"limit_source": "override",
"membership": "explicit",
"name": "<string>",
"pending_request_cycle_acu_limit": 123,
"pending_request_id": "<string>",
"primary_cycle_acu_limit": 123,
"temporary_cycle_acu_limit": 123,
"tier_cycle_acu_limit": 123,
"tier_id": "<string>",
"tier_name": "<string>",
"user_id": "<string>"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}See Budgets for field details and examples.
Permissions
Requires a service user or personal access token with theManageAcuLimits permission at the enterprise level, or delegated access to the budget.Path Parameters
Response
Successful Response
A user's resolved tier, per-cycle ACU limit, and pending request.
Why the user is in the tier: 'explicit' (directly assigned), 'idp_group' or 'university_certification' (via their winning IdP group or certification tier mapping), or 'default' (fallback to the account's default tier).
Available options:
explicit, idp_group, university_certification, default 
