Bulk upload skills
curl --request POST \
--url https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload \
--header 'Content-Type: multipart/form-data' \
--header 'x-teamai-api-key: <api-key>' \
--form 'files=<string>' \
--form visibility=workspace \
--form files.items='@example-file'import requests
url = "https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"visibility": "workspace"
}
headers = {"x-teamai-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('visibility', 'workspace');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'x-teamai-api-key': '<api-key>'}};
options.body = form;
fetch('https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload', 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://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-teamai-api-key: <api-key>"
],
]);
$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://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload")
.header("x-teamai-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"created": [
{
"id": "<string>",
"name": "<string>",
"gcsPath": "<string>"
}
],
"skipped": [
{
"name": "<string>",
"reason": "<string>"
}
],
"errors": [
{}
],
"summary": {
"total": 123,
"created": 123,
"skipped": 123,
"failed": 123
}
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Skills
Bulk upload skills
Uploads skills from zip archives (containing skill directories with a SKILL.md) or standalone markdown files. Duplicate skill names are skipped. Requires a workspace API key; workspace and organization visibility require the key’s user to be a workspace admin or owner. Limits: 32MB combined upload, 200 skills per request.
POST
/
workspace
/
{workspaceId}
/
skills
/
bulk-upload
Bulk upload skills
curl --request POST \
--url https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload \
--header 'Content-Type: multipart/form-data' \
--header 'x-teamai-api-key: <api-key>' \
--form 'files=<string>' \
--form visibility=workspace \
--form files.items='@example-file'import requests
url = "https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload"
files = { "files.items": ("example-file", open("example-file", "rb")) }
payload = {
"files": "<string>",
"visibility": "workspace"
}
headers = {"x-teamai-api-key": "<api-key>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('files', '<string>');
form.append('visibility', 'workspace');
form.append('files.items', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {'x-teamai-api-key': '<api-key>'}};
options.body = form;
fetch('https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload', 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://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Content-Type: multipart/form-data",
"x-teamai-api-key: <api-key>"
],
]);
$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://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-teamai-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload")
.header("x-teamai-api-key", "<api-key>")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.teamai.com/api/v1/workspace/{workspaceId}/skills/bulk-upload")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-teamai-api-key"] = '<api-key>'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"visibility\"\r\n\r\nworkspace\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"files.items\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"data": {
"created": [
{
"id": "<string>",
"name": "<string>",
"gcsPath": "<string>"
}
],
"skipped": [
{
"name": "<string>",
"reason": "<string>"
}
],
"errors": [
{}
],
"summary": {
"total": 123,
"created": 123,
"skipped": 123,
"failed": 123
}
}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}{
"code": "bad_request",
"message": "<string>",
"details": {}
}Authorizations
Secret API key created in Workspace Settings → API Keys (workspace keys) or Organization Admin → API Keys (organization keys).
Path Parameters
Workspace ID.
Body
multipart/form-data
Response
All skills processed without errors.
Show child attributes
Show child attributes
Was this page helpful?
⌘I