cURL
curl --request POST \
--url https://my.orq.ai/v2/skills/{skill_id}/files:save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"display_name": "<string>",
"description": "<string>",
"instructions": "<string>"
}
'import { readFile } from 'node:fs/promises';
import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY });
const result = await orq.skills.saveFiles({
skillId: 'skill_01HZXW2K7Y8Q9M0N1P2R3S4T5V',
saveSkillFilesRequest: {
files: [
{
path: 'SKILL.md',
content: (await readFile('SKILL.md')).toString('base64'),
},
],
},
});
console.log(result);import requests
url = "https://my.orq.ai/v2/skills/{skill_id}/files:save"
payload = {
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"display_name": "<string>",
"description": "<string>",
"instructions": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"skill": {
"skill_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"instructions": "<string>",
"version": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": "<string>",
"sha256": "<string>",
"content_type": "<string>"
}
],
"has_files": true,
"repository_source": {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"commit_sha": "<string>"
},
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Skills
Save skill files atomically
Saves file drafts and optional skill metadata as one version.
POST
/
v2
/
skills
/
{skill_id}
/
files:save
cURL
curl --request POST \
--url https://my.orq.ai/v2/skills/{skill_id}/files:save \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"display_name": "<string>",
"description": "<string>",
"instructions": "<string>"
}
'import { readFile } from 'node:fs/promises';
import { Orq } from '@orq-ai/node';
const orq = new Orq({ apiKey: process.env.ORQ_API_KEY });
const result = await orq.skills.saveFiles({
skillId: 'skill_01HZXW2K7Y8Q9M0N1P2R3S4T5V',
saveSkillFilesRequest: {
files: [
{
path: 'SKILL.md',
content: (await readFile('SKILL.md')).toString('base64'),
},
],
},
});
console.log(result);import requests
url = "https://my.orq.ai/v2/skills/{skill_id}/files:save"
payload = {
"files": [
{
"path": "<string>",
"content": "<string>"
}
],
"display_name": "<string>",
"description": "<string>",
"instructions": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"skill": {
"skill_id": "<string>",
"display_name": "<string>",
"description": "<string>",
"tags": [
"<string>"
],
"project_id": "<string>",
"path": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_by_id": "<string>",
"updated_by_id": "<string>",
"instructions": "<string>",
"version": "<string>",
"files": [
{
"path": "<string>",
"size_bytes": "<string>",
"sha256": "<string>",
"content_type": "<string>"
}
],
"has_files": true,
"repository_source": {
"connection_id": "<string>",
"repository_url": "<string>",
"ref": "<string>",
"subdirectory": "<string>",
"commit_sha": "<string>"
},
"sharing": {
"all_projects": {},
"selected": {
"project_ids": [
"<string>"
]
},
"allow_version_pin": true,
"allow_fork": true,
"auto_grant_new_projects": true
}
}
}{
"message": "<string>",
"code": 123,
"details": [
"<unknown>"
]
}Related guide: Skills guide. See the Skills guide for a walkthrough with examples.
Authorizations
Body
application/json
Was this page helpful?