Offer a skill only to the agents that use it
curl --request POST \
--url https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in', 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.decimal.ai/api/v1/skills/{skill_id}/make-opt-in",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.decimal.ai/api/v1/skills/{skill_id}/make-opt-in"
req, _ := http.NewRequest("POST", 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.post("https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"skill": {},
"kind": "owned",
"window_days": 123,
"keep": [
"<string>"
],
"already_assigned": [
"<string>"
],
"loses_count": 123,
"loses_sample": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}skills
Offer a skill only to the agents that use it
Stop offering a skill to every agent; keep it on the agents that use it.
Every agent that loaded the skill in the last 30 days is assigned it by name first, so none of them loses it. Agents it was removed from stay without it. Every other agent stops getting it; each gets an automatic config version saying so. Works on the org’s own skills offered to every agent and on registry skills linked for every agent.
POST
/
api
/
v1
/
skills
/
{skill_id}
/
make-opt-in
Offer a skill only to the agents that use it
curl --request POST \
--url https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in', 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.decimal.ai/api/v1/skills/{skill_id}/make-opt-in",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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.decimal.ai/api/v1/skills/{skill_id}/make-opt-in"
req, _ := http.NewRequest("POST", 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.post("https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/skills/{skill_id}/make-opt-in")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"status": "ok",
"skill": {},
"kind": "owned",
"window_days": 123,
"keep": [
"<string>"
],
"already_assigned": [
"<string>"
],
"loses_count": 123,
"loses_sample": [
"<string>"
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Enter your API key (e.g. dai_sk_test_key_001)
Headers
Path Parameters
The skill's stable ID (prefixed 'sk_').
Example:
"sk_abc123"
Query Parameters
Say who keeps and who loses the skill; change nothing.
Cookies
Response
Done, or (with dry_run) what would happen.
Available options:
ok, dry_run Show child attributes
Show child attributes
Available options:
owned, linked