Update evaluation configuration
curl --request PUT \
--url https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"judgeModel": "openai/gpt-4o",
"cadence": {
"frequency": "weekly",
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": [
"TUESDAY"
]
}
}
'import requests
url = "https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config"
payload = {
"enabled": True,
"judgeModel": "openai/gpt-4o",
"cadence": {
"frequency": "weekly",
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": ["TUESDAY"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
judgeModel: 'openai/gpt-4o',
cadence: {
frequency: 'weekly',
timeOfDay: '09:00',
timezone: 'America/New_York',
weekdays: ['TUESDAY']
}
})
};
fetch('https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config', 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.getmodus.com/api/v1/scopes/{id}/evaluations/config",
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([
'enabled' => true,
'judgeModel' => 'openai/gpt-4o',
'cadence' => [
'frequency' => 'weekly',
'timeOfDay' => '09:00',
'timezone' => 'America/New_York',
'weekdays' => [
'TUESDAY'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.getmodus.com/api/v1/scopes/{id}/evaluations/config"
payload := strings.NewReader("{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://api.getmodus.com/api/v1/scopes/{id}/evaluations/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"notifications": {
"recipients": [
{
"clerkUserId": "<string>",
"email": "<string>",
"name": {}
}
],
"channels": {
"email": true,
"slack": {
"nangoConnectionId": "<string>",
"slackUserIdByRecipient": {}
}
}
},
"cadence": {
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": [
"MONDAY",
"WEDNESDAY"
],
"dayOfMonth": 16,
"cronExpression": "0 9 * * 1-5"
},
"judgeModel": "openai/gpt-4o",
"judgeGuidance": "<string>"
}{
"error": {
"code": "BAD_REQUEST",
"status": "INVALID_ARGUMENT",
"message": "Invalid value for query parameter `pageSize`.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": "UNAUTHENTICATED",
"message": "Missing or invalid access token.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "FORBIDDEN",
"status": "PERMISSION_DENIED",
"message": "Missing required scope(s) for this operation.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS",
"info": {
"missing": [
"<required-scope>"
]
}
}
}{
"error": {
"code": "NOT_FOUND",
"status": "NOT_FOUND",
"message": "Resource not found.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "CONFLICT",
"status": "ALREADY_EXISTS",
"message": "A resource with that identifier already exists.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "VALIDATION",
"status": "INVALID_ARGUMENT",
"message": "Updates that would revoke your own access are not allowed.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"status": "INTERNAL",
"message": "An unexpected error occurred.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}Scopes
Update evaluation configuration
Updates the evaluation configuration for a scope. Changes to the schedule cadence are synced automatically.
Requires: scopes:write
PUT
/
api
/
v1
/
scopes
/
{id}
/
evaluations
/
config
Update evaluation configuration
curl --request PUT \
--url https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"judgeModel": "openai/gpt-4o",
"cadence": {
"frequency": "weekly",
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": [
"TUESDAY"
]
}
}
'import requests
url = "https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config"
payload = {
"enabled": True,
"judgeModel": "openai/gpt-4o",
"cadence": {
"frequency": "weekly",
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": ["TUESDAY"]
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
judgeModel: 'openai/gpt-4o',
cadence: {
frequency: 'weekly',
timeOfDay: '09:00',
timezone: 'America/New_York',
weekdays: ['TUESDAY']
}
})
};
fetch('https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config', 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.getmodus.com/api/v1/scopes/{id}/evaluations/config",
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([
'enabled' => true,
'judgeModel' => 'openai/gpt-4o',
'cadence' => [
'frequency' => 'weekly',
'timeOfDay' => '09:00',
'timezone' => 'America/New_York',
'weekdays' => [
'TUESDAY'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://api.getmodus.com/api/v1/scopes/{id}/evaluations/config"
payload := strings.NewReader("{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}")
req, _ := http.NewRequest("PUT", url, payload)
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://api.getmodus.com/api/v1/scopes/{id}/evaluations/config")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getmodus.com/api/v1/scopes/{id}/evaluations/config")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"judgeModel\": \"openai/gpt-4o\",\n \"cadence\": {\n \"frequency\": \"weekly\",\n \"timeOfDay\": \"09:00\",\n \"timezone\": \"America/New_York\",\n \"weekdays\": [\n \"TUESDAY\"\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"enabled": true,
"notifications": {
"recipients": [
{
"clerkUserId": "<string>",
"email": "<string>",
"name": {}
}
],
"channels": {
"email": true,
"slack": {
"nangoConnectionId": "<string>",
"slackUserIdByRecipient": {}
}
}
},
"cadence": {
"timeOfDay": "09:00",
"timezone": "America/New_York",
"weekdays": [
"MONDAY",
"WEDNESDAY"
],
"dayOfMonth": 16,
"cronExpression": "0 9 * * 1-5"
},
"judgeModel": "openai/gpt-4o",
"judgeGuidance": "<string>"
}{
"error": {
"code": "BAD_REQUEST",
"status": "INVALID_ARGUMENT",
"message": "Invalid value for query parameter `pageSize`.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "UNAUTHORIZED",
"status": "UNAUTHENTICATED",
"message": "Missing or invalid access token.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "FORBIDDEN",
"status": "PERMISSION_DENIED",
"message": "Missing required scope(s) for this operation.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS",
"info": {
"missing": [
"<required-scope>"
]
}
}
}{
"error": {
"code": "NOT_FOUND",
"status": "NOT_FOUND",
"message": "Resource not found.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "CONFLICT",
"status": "ALREADY_EXISTS",
"message": "A resource with that identifier already exists.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "VALIDATION",
"status": "INVALID_ARGUMENT",
"message": "Updates that would revoke your own access are not allowed.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}{
"error": {
"code": "INTERNAL_ERROR",
"status": "INTERNAL",
"message": "An unexpected error occurred.",
"requestId": "req_01HQ7K8ABCDEFGHIJKLMNOPQRS"
}
}Authorizations
A Modus personal access token (modus_<orgUuid>_<prefix>_<secret>) or an OAuth 2.1 access token, sent as Authorization: Bearer <token>.
Path Parameters
Scope ID
Example:
42
Body
application/json
Whether scheduled evaluations are enabled
Schedule cadence configuration
Show child attributes
Show child attributes
Model ID for the judge LLM
Custom guidance for the judge LLM
Regression notification settings
Show child attributes
Show child attributes
Response
Whether scheduled evaluations are enabled
Regression notification settings
Show child attributes
Show child attributes
Schedule cadence configuration
Show child attributes
Show child attributes
Model ID for the judge LLM
Example:
"openai/gpt-4o"
Custom guidance for the judge LLM
⌘I