Create a skill
client.promptly.skills.create(SkillCreateParams { content, name, organizationId, 6 more } body, RequestOptionsoptions?): Skill { id, content, name, 11 more }
POST/api/promptly/skills
Create a new reusable instruction set
Parameters
Returns
Create a skill
import _0ct from '0ct';
const client = new _0ct({
apiKey: process.env['0CT_API_KEY'], // This is the default and can be omitted
});
const skill = await client.promptly.skills.create({
content: 'content',
name: 'name',
organizationId: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
});
console.log(skill.id);{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"content": "content",
"name": "name",
"category": "category",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"frontmatter": {
"author": "author",
"requiredSources": [
"string"
],
"tags": [
"string"
]
},
"iconUrl": "https://example.com",
"isPublic": true,
"isUserInvocable": true,
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"updatedAt": "2019-12-27T18:11:19.117Z",
"version": 0
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"content": "content",
"name": "name",
"category": "category",
"createdAt": "2019-12-27T18:11:19.117Z",
"description": "description",
"frontmatter": {
"author": "author",
"requiredSources": [
"string"
],
"tags": [
"string"
]
},
"iconUrl": "https://example.com",
"isPublic": true,
"isUserInvocable": true,
"organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"slug": "slug",
"updatedAt": "2019-12-27T18:11:19.117Z",
"version": 0
}