Turn a skill on or off for your org's agents, built-in or custom. Repeating the same switch changes nothing. Needs a key with the `skills:write` scope.
curl --request PATCH \
--url https://api.spiral.ai/v1/skills/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.spiral.ai/v1/skills/{name}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.spiral.ai/v1/skills/{name}', 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.spiral.ai/v1/skills/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
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.spiral.ai/v1/skills/{name}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.spiral.ai/v1/skills/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spiral.ai/v1/skills/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "skill",
"name": "<string>",
"description": "<string>",
"version": "<string>",
"source": "built-in",
"enabled": true,
"category": "llm",
"title": "<string>",
"capabilities": [
{
"provider": "fal",
"model": "<string>"
}
],
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}Skills
Turn a skill on or off
PATCH
/
v1
/
skills
/
{name}
Turn a skill on or off for your org's agents, built-in or custom. Repeating the same switch changes nothing. Needs a key with the `skills:write` scope.
curl --request PATCH \
--url https://api.spiral.ai/v1/skills/{name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api.spiral.ai/v1/skills/{name}"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api.spiral.ai/v1/skills/{name}', 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.spiral.ai/v1/skills/{name}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true
]),
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.spiral.ai/v1/skills/{name}"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.spiral.ai/v1/skills/{name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.spiral.ai/v1/skills/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"object": "skill",
"name": "<string>",
"description": "<string>",
"version": "<string>",
"source": "built-in",
"enabled": true,
"category": "llm",
"title": "<string>",
"capabilities": [
{
"provider": "fal",
"model": "<string>"
}
],
"files": [
{
"path": "<string>",
"content": "<string>"
}
]
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}{
"type": "<string>",
"title": "<string>",
"status": 0,
"detail": "<string>",
"code": "<string>",
"retryable": true,
"request_id": "<string>",
"errors": [
{
"pointer": "<string>",
"message": "<string>",
"reason": "unknown_field",
"expected": "<string>",
"received": "<string>",
"allowed": [
"<string>"
]
}
],
"retry_after_seconds": 0
}Authorizations
Body
application/json
Response
The skill as your org now sees it, with its ETag.
SKILL.md's category, one of the tool categories; null when it names none.
Available options:
llm, image, video, 3d, audio, web, data, social-media, e-commerce, finance, lead-gen, public-records, listings, maps-reviews, seo, news-media, developer, sports, industry-data, health