Skills
Upload a Skill
POST /api/v1/skills/upload/
Code Examples
# API Call Example (Shell)
curl -X POST "https://api.maiagent.ai/api/v1/skills/upload/" \
-H "Authorization: Api-Key YOUR_API_KEY" \
-F "file=@example_file.pdf" \
-F "attached_tool_ids=Example string"
# Replace YOUR_API_KEY and verify the request data before running.const axios = require('axios');
const FormData = require('form-data');
// Create a FormData object
const formData = new FormData();
// Replace with an actual file
formData.append('file', /* Actual file object */, 'example_file.pdf');
formData.append('attached_tool_ids', 'Example string');
// Set request headers
const config = {
headers: {
'Authorization': 'Api-Key YOUR_API_KEY',
...formData.getHeaders()
}
};
axios.post("https://api.maiagent.ai/api/v1/skills/upload/", formData, config)
.then(response => {
console.log('Response received successfully:');
console.log(response.data);
})
.catch(error => {
console.error('Request failed:');
console.error(error.response?.data || error.message);
});Response Body
Status Code: 201
Example Response Schema
{
"id"?: string (uuid) // Optional
"name"?: string // Optional
"description"?: string // Optional
"attached_tools"?: [ // Names of tools automatically attached based on the skill package frontmatter (Optional)
string
]
"missing_tools"?: [ // Names of tools declared in the skill package that are not found in this organization and must be attached manually (Optional)
string
]
"message"?: string // Optional
}Example Response Values
Status Code: 400
Example Response Schema
Example Response Values
Create a Skill
POST /api/v1/skills/
Request Body
Request Parameters
name
string
Yes
description
string
Yes
whenToUse
string
No
Describe when the LLM should trigger this skill. Max 200 characters recommended.
instructions
string
No
Markdown text with instructions for the skill
attachedToolIds
array[string]
No
groups
array[IdName]
No
Groups this skill is assigned to. Non-owner members must pick at least one group they belong to.
files
array[object]
No
Optional resource files to create with the skill. Each item must include path and content. content_encoding may be "text" or "base64".
Example Request Schema
Example Request Values
Code Examples
Response Body
Status Code: 201
Example Response Schema
Example Response Values
List Skills
GET /api/v1/skills/
Parameters
isActive
❌
boolean
page
❌
integer
A page number within the paginated result set.
pageSize
❌
integer
Number of results to return per page.
search
❌
string
Code Examples
Response Body
Status Code: 200
Example Response Schema
Example Response Values
Retrieve a Specific Skill
GET /api/v1/skills/{id}/
Parameters
id
✅
string
A UUID string identifying this Skill.
Code Examples
Response Body
Status Code: 200
Example Response Schema
Example Response Values
Update Skill
PUT /api/v1/skills/{id}/
Parameters
id
✅
string
A UUID string identifying this Skill.
Request Body
Request Parameters
name
string
Yes
description
string
Yes
whenToUse
string
No
Describe when the LLM should trigger this skill. Max 200 characters recommended.
instructions
string
No
Markdown text with instructions for the skill
attachedToolIds
array[string]
No
groups
array[IdName]
No
Groups this skill is assigned to. Non-owner members must pick at least one group they belong to.
Request Schema Example
Example Request Values
Code Examples
Response Body
Status Code: 200
Response Schema Example
Example Response Values
Partially Update Skill
PATCH /api/v1/skills/{id}/
Parameters
id
✅
string
A UUID string identifying this Skill.
Request Body
Request Parameters
name
string
No
description
string
No
whenToUse
string
No
Describe when the LLM should trigger this skill. Max 200 characters recommended.
instructions
string
No
Markdown text with instructions for the skill
attachedToolIds
array[string]
No
groups
array[IdName]
No
Groups this skill is assigned to. Non-owner members must pick at least one group they belong to.
Request Schema Example
Example Request Values
Code Examples
Response Body
Status Code: 200
Response Schema Example
Example Response Values
Delete Skill
DELETE /api/v1/skills/{id}/
Parameters
id
✅
string
A UUID string identifying this Skill.
Code Examples
Response Body
204
No response body
Export Skill
GET /api/v1/skills/{id}/export/
Parameters
id
✅
string
A UUID string identifying this Skill.
Code Examples
Response Body
200
.skill file download
Browse Skill Package Directory Structure
GET /api/v1/skills/{id}/package-structure/
Parameters
id
✅
string
A UUID string identifying this Skill.
path
❌
string
Directory path to browse (defaults to the root directory)
Code Examples
Response Body
Status Code: 200
Example Response Schema
Example Response Values
Status Code: 400
Example Response Schema
Example Response Values
Reupload Skill
POST /api/v1/skills/{id}/reupload/
Parameters
id
✅
string
A UUID string identifying this Skill.
Code Examples
Response Body
Status Code: 200
Example Response Schema
Example Response Values
Status Code: 400
Example Response Schema
Example Response Values
List Skill Resources
GET /api/v1/skills/{skillPk}/resources/
Parameters
skillPk
✅
string
Code Examples
Response Body
Status Code: 200
Example Response Schema
Example Response Values
Upload Skill Resource
POST /api/v1/skills/{skillPk}/resources/
Parameters
skillPk
✅
string
Code Examples
Response Body
Status Code: 201
Example Response Schema
Example Response Values
Status Code: 400
Example Response Schema
Example Response Values
Delete Skill Resource
DELETE /api/v1/skills/{skillPk}/resources/{id}/
Parameters
id
✅
string
skillPk
✅
string
Code Examples
Response Body
204
No response body
Download Skill Resource
GET /api/v1/skills/{skillPk}/resources/{id}/download/
Parameters
id
✅
string
skillPk
✅
string
Code Examples
Response Body
200
File download
Last updated
Was this helpful?