# Skills

> SKILL.md procedures invoked with `/name`: 5 endpoints of the Teemli API.

Source: https://docs.teemli.com/developers/reference/skills/

Generated from [`api/openapi.yaml`](/developers/api/) (OpenAPI 3.1). Base URL: `https://api.teemli.com`. Auth: `Authorization: Bearer <token or tml_ API key>`. Errors are `application/problem+json`; writes accept an `Idempotency-Key` header.

SKILL.md procedures invoked with `/name`

## Skills

```http
GET /v1/orgs/{org}/skills
```

With `agent_id`: the skills that agent can use (agent > mine > team > org, one per
name) — use it for the `/` menu in the composer. Without: every skill I can see.

**API keys:** needs the `agents:read` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `agent_id` | query | string (uuid) |  |

**Responses**

- `200` Skills — object
- `401` Missing, invalid or expired token — Problem

## Create a skill

```http
POST /v1/orgs/{org}/skills
```

`scope: person` (all my agents) or `scope: agent` with `agent_id`. Team and org skills come with admin tools.

**API keys:** needs the `agents:write` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |

**Request body** (JSON)

| Field | Type | Description |
|---|---|---|
| `name` (required) | string | Invoked as /name |
| `description` | string |  |
| `skill_md` (required) | string |  |
| `scope` | `person`, `agent` |  |
| `agent_id` | string (uuid) |  |
| `status` | `draft`, `published` |  |

**Responses**

- `201` Created — Skill
- `401` Missing, invalid or expired token — Problem
- `403` Authenticated but not allowed (e.g. unverified email, not the agent's controller, card routed to someone else) — Problem
- `409` Conflicting state (card already answered, duplicate in flight, name taken) — Problem
- `422` Invalid input — Problem

## One skill

```http
GET /v1/orgs/{org}/skills/{skill}
```

**API keys:** needs the `agents:read` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `skill` (required) | path | string (uuid) |  |

**Responses**

- `200` The skill — Skill
- `401` Missing, invalid or expired token — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem

## Edit a skill

```http
PATCH /v1/orgs/{org}/skills/{skill}
```

Changing `skill_md` bumps `version`.

**API keys:** needs the `agents:write` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `skill` (required) | path | string (uuid) |  |

**Request body** (JSON)

| Field | Type | Description |
|---|---|---|
| `name` | string |  |
| `description` | string |  |
| `skill_md` | string |  |
| `status` | `draft`, `published` |  |

**Responses**

- `200` Updated — Skill
- `401` Missing, invalid or expired token — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
- `422` Invalid input — Problem

## Delete a skill

```http
DELETE /v1/orgs/{org}/skills/{skill}
```

**API keys:** needs the `agents:write` scope.

| Parameter | In | Type | Description |
|---|---|---|---|
| `org` (required) | path | string (uuid) | The caller's organisation id. |
| `skill` (required) | path | string (uuid) |  |

**Responses**

- `200` Deleted — object
- `401` Missing, invalid or expired token — Problem
- `404` Not found (also returned for rows the caller may not see, and for disabled features) — Problem
