---
title: "createSkill"
---

> Documentation Index
> Fetch the complete documentation index at: https://agenthold.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# createSkill

Path: agenthold API › tools

`POST /workspaces/{workspaceId}/skills`

URL: `/api/v1/workspaces/{workspaceId}/skills`

Workspace admins only.

## Authentication

Requires one of the following:

- `session`, apiKey, in cookie
- `token`, http bearer, header `Authorization`

## Path parameters

- `workspaceId` (`createSkill.path.workspaceId`; string, required)

## Request body

_Required._

- `name` (`createSkill.name`; string, required) — Lowercase letters, digits and dashes.
- `description` (`createSkill.description`; string, required) — When the agent should use the skill.
- `content` (`createSkill.content`; string, required) — The SKILL.md instructions (Markdown).

## Example request

```json
{
  "name": "string",
  "description": "string",
  "content": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url '<base-url>/api/v1/workspaces/<workspaceId>/skills' \
  --header 'Content-Type: application/json' \
  --cookie 'agenthold_session=<agenthold_session>' \
  --data '
{
  "name": "string",
  "description": "string",
  "content": "string"
}
'
```

### TypeScript

```typescript
const url = '<base-url>/api/v1/workspaces/<workspaceId>/skills';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    cookie: 'agenthold_session=<agenthold_session>'
  },
  body: JSON.stringify({name: 'string', description: 'string', content: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/api/v1/workspaces/<workspaceId>/skills"

payload = {
    "name": "string",
    "description": "string",
    "content": "string"
}
headers = {
    "cookie": "agenthold_session=<agenthold_session>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 201

Created.

#### Example

```json
{
  "name": "string",
  "description": "string",
  "content": "string",
  "id": "string",
  "workspaceId": "string",
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
```

- `name` (`createSkill.response.201.name`; string, required) — Lowercase letters, digits and dashes.
- `description` (`createSkill.response.201.description`; string, required) — When the agent should use the skill.
- `content` (`createSkill.response.201.content`; string, required) — The SKILL.md instructions (Markdown).
- `id` (`createSkill.response.201.id`; string, required)
- `workspaceId` (`createSkill.response.201.workspaceId`; string, required)
- `createdAt` (`createSkill.response.201.createdAt`; string, required)
  - format: `date-time`
- `updatedAt` (`createSkill.response.201.updatedAt`; string, required)
  - format: `date-time`

### 400

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`createSkill.response.400.error`; string, required)

### 403

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`createSkill.response.403.error`; string, required)

### 404

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`createSkill.response.404.error`; string, required)

### 409

Error.

#### Example

```json
{
  "error": "string"
}
```

- `error` (`createSkill.response.409.error`; string, required)


Source: https://agenthold.dev/api/create-skill/index.md
