Accounts
Create a skill under an account
Requires skills:write. A key cannot create a public skill even with skills:write โ publishing is admin-only.
POST
/
accounts
/
{account_id_or_name}
/
skills
Create a skill under an account
curl --request POST \
--url https://api.guild.ai/v1/accounts/{account_id_or_name}/skills \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"overview": null,
"is_public": false,
"avatar_url": null
}
'import requests
url = "https://api.guild.ai/v1/accounts/{account_id_or_name}/skills"
payload = {
"name": "<string>",
"overview": None,
"is_public": False,
"avatar_url": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', overview: null, is_public: false, avatar_url: null})
};
fetch('https://api.guild.ai/v1/accounts/{account_id_or_name}/skills', 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.guild.ai/v1/accounts/{account_id_or_name}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'overview' => null,
'is_public' => false,
'avatar_url' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.guild.ai/v1/accounts/{account_id_or_name}/skills"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.guild.ai/v1/accounts/{account_id_or_name}/skills")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/accounts/{account_id_or_name}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_public": true,
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"archived_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"overview": "<string>",
"archived_by": "<unknown>",
"full_name": "<unknown>",
"latest_version": "<unknown>",
"likes_count": "<unknown>",
"owner": "<unknown>",
"type": "<unknown>",
"viewer_can_edit": "<unknown>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Account API key: key id as the username, secret as the password.
Path Parameters
Body
application/json
Response
Successful response
Whether the asset is visible to the community or only its owner.
Unique name identifying the asset within the owner account.
Maximum string length:
100The account that owns this entity.
Maximum string length:
255Optional human-facing overview for display and indexing. Falls back to the latest version description if not set.
โI
Create a skill under an account
curl --request POST \
--url https://api.guild.ai/v1/accounts/{account_id_or_name}/skills \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"overview": null,
"is_public": false,
"avatar_url": null
}
'import requests
url = "https://api.guild.ai/v1/accounts/{account_id_or_name}/skills"
payload = {
"name": "<string>",
"overview": None,
"is_public": False,
"avatar_url": None
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', overview: null, is_public: false, avatar_url: null})
};
fetch('https://api.guild.ai/v1/accounts/{account_id_or_name}/skills', 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.guild.ai/v1/accounts/{account_id_or_name}/skills",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'overview' => null,
'is_public' => false,
'avatar_url' => null
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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.guild.ai/v1/accounts/{account_id_or_name}/skills"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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.post("https://api.guild.ai/v1/accounts/{account_id_or_name}/skills")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.guild.ai/v1/accounts/{account_id_or_name}/skills")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"overview\": null,\n \"is_public\": false,\n \"avatar_url\": null\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"is_public": true,
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"archived_at": "2023-11-07T05:31:56Z",
"archived_by_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"avatar_url": "<string>",
"overview": "<string>",
"archived_by": "<unknown>",
"full_name": "<unknown>",
"latest_version": "<unknown>",
"likes_count": "<unknown>",
"owner": "<unknown>",
"type": "<unknown>",
"viewer_can_edit": "<unknown>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}