Create or replace a skill of an uploaded plugin.
curl --request PUT \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"revision_token": "<string>"
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}"
payload = {
"content": "<string>",
"revision_token": "<string>"
}
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({content: '<string>', revision_token: '<string>'})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}",
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([
'content' => '<string>',
'revision_token' => '<string>'
]),
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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}")
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 \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bundle_id": "<string>",
"content": "<string>",
"name": "<string>",
"revision_token": "<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"
}Plugins [Beta]
Create or replace a skill of an uploaded plugin.
Write skills/{skill_name}/SKILL.md into an existing plugin.
PUT
/
v3beta1
/
organizations
/
{org_id}
/
managed-plugins
/
bundles
/
{bundle_id}
/
skills
/
{skill_name}
Create or replace a skill of an uploaded plugin.
curl --request PUT \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": "<string>",
"revision_token": "<string>"
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}"
payload = {
"content": "<string>",
"revision_token": "<string>"
}
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({content: '<string>', revision_token: '<string>'})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}",
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([
'content' => '<string>',
'revision_token' => '<string>'
]),
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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}"
payload := strings.NewReader("{\n \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\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.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/managed-plugins/bundles/{bundle_id}/skills/{skill_name}")
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 \"content\": \"<string>\",\n \"revision_token\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"bundle_id": "<string>",
"content": "<string>",
"name": "<string>",
"revision_token": "<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"
}Creates a skill in an uploaded plugin in the organization, or replaces it. Use it to keep skills up to date from automation, as the Knowledge notes API did for notes.
Permissions
Requires a service user or personal access token with theManageOrgPlugins permission for the specified organization. ManageOrgKnowledge or ManageOrgPlaybooks also grants access once the organization’s Knowledge or Playbooks have moved to skills.
Behavior
contentis the wholeSKILL.md, frontmatter included. It is stored atskills/<skill_name>/SKILL.md; the plugin’s other files are left as they are.- The plugin must already exist. To create a plugin, upload it or create it in Customize.
- Without
revision_tokenthe write replaces whatever is stored. To avoid overwriting a change you have not seen, send therevision_tokenyou last read: the write is then refused with409if the plugin has changed since. - Every write changes the plugin’s
revision_token, for all of its skills. The response returns the new one. - New sessions load the new skill. Running sessions keep what they loaded at start.
- In an enterprise, the primary organization has no plugins of its own: the request returns
400. Use the matching enterprise endpoint instead.
Status codes
400: the skill name or theSKILL.mdis not valid.403: the caller lacks the permission, uploaded plugins are disabled for the account and the skill does not exist yet, or the plugin is reserved for Devin.404: no uploaded plugin has thisbundle_id.409:revision_tokenwas sent and the plugin has changed since that revision.
Path Parameters
Body
application/json

