---
title: "Update a skill"
description: "Update a custom (non-preset) skill owned by the authenticated user."
---

> Documentation Index
> Fetch the complete documentation index at: https://truememory-docs.mvstg.com/llms.txt
> Use this file to discover all available pages before exploring further.

Path: AI Gateway API › Skills

`PUT /skills/{skill_id}`

Update a custom (non-preset) skill owned by the authenticated user.

## Authentication

- `HTTPBearer`, http, header `Authorization`

## Path parameters

- `skill_id` (`update_skill.path.skill_id`; string, required)

## Header parameters

- `X-On-Behalf-Of` (`update_skill.header.X-On-Behalf-Of`; any of, optional)
  - any of: `string`, `null`
- `X-External-User-Id` (`update_skill.header.X-External-User-Id`; any of, optional)
  - any of: `string`, `null`
- `X-App-Id` (`update_skill.header.X-App-Id`; any of, optional)
  - any of: `string`, `null`

## Request body

_Required._

- `key` (`update_skill.key`; any of, optional)
  - any of: `string`, `null`
- `name` (`update_skill.name`; any of, optional)
  - any of: `string`, `null`
- `description` (`update_skill.description`; any of, optional)
  - any of: `string`, `null`
- `prompt` (`update_skill.prompt`; any of, optional)
  - any of: `string`, `null`
- `category` (`update_skill.category`; any of, optional)
  - any of: `string`, `null`
- `app_ids` (`update_skill.app_ids`; any of, optional)
  - any of: `array<string>`, `null`
- `icon` (`update_skill.icon`; any of, optional)
  - any of: `string`, `null`
- `argument_hint` (`update_skill.argument_hint`; any of, optional)
  - any of: `string`, `null`
- `allowed_tools` (`update_skill.allowed_tools`; any of, optional)
  - any of: `array<string>`, `null`
- `metadata` (`update_skill.metadata`; any of, optional)
  - any of: `object`, `null`
- `is_active` (`update_skill.is_active`; any of, optional)
  - any of: `boolean`, `null`
- `sort_order` (`update_skill.sort_order`; any of, optional)
  - any of: `integer`, `null`
- `use_case` (`update_skill.use_case`; any of, optional)
  - any of: `string`, `null`
- `detection_patterns` (`update_skill.detection_patterns`; any of, optional)
  - any of: `array<string>`, `null`
- `license` (`update_skill.license`; any of, optional)
  - any of: `string`, `null`
- `compatibility` (`update_skill.compatibility`; any of, optional)
  - any of: `string`, `null`
- `forked_from_skill_id` (`update_skill.forked_from_skill_id`; any of, optional)
  - any of: `string`, `null`
- `parent_synced_at` (`update_skill.parent_synced_at`; any of, optional) — Fork baseline: set to the preset's updated_at to mark the fork synced (e.g. after a client-side merge). Null clears it.
  - any of: `string`, `null`

## Example request

```json
{
  "key": "string",
  "name": "string",
  "description": "string",
  "prompt": "string",
  "category": "string",
  "app_ids": [
    "string"
  ],
  "icon": "string",
  "argument_hint": "string",
  "allowed_tools": [
    "string"
  ],
  "metadata": {},
  "is_active": true,
  "sort_order": 0,
  "use_case": "string",
  "detection_patterns": [
    "string"
  ],
  "license": "string",
  "compatibility": "string",
  "forked_from_skill_id": "string",
  "parent_synced_at": "2019-08-24T14:15:22Z"
}
```

## Code samples

### cURL

```bash
curl --request PUT \
  --url 'https://truememory-api.mvstg.com/skills/<skill_id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "key": "string",
  "name": "string",
  "description": "string",
  "prompt": "string",
  "category": "string",
  "app_ids": [
    "string"
  ],
  "icon": "string",
  "argument_hint": "string",
  "allowed_tools": [
    "string"
  ],
  "metadata": {},
  "is_active": true,
  "sort_order": 0,
  "use_case": "string",
  "detection_patterns": [
    "string"
  ],
  "license": "string",
  "compatibility": "string",
  "forked_from_skill_id": "string",
  "parent_synced_at": "2019-08-24T14:15:22Z"
}
'
```

### TypeScript

```typescript
const url = 'https://truememory-api.mvstg.com/skills/<skill_id>';
const options = {
  method: 'PUT',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    key: 'string',
    name: 'string',
    description: 'string',
    prompt: 'string',
    category: 'string',
    app_ids: ['string'],
    icon: 'string',
    argument_hint: 'string',
    allowed_tools: ['string'],
    metadata: {},
    is_active: true,
    sort_order: 0,
    use_case: 'string',
    detection_patterns: ['string'],
    license: 'string',
    compatibility: 'string',
    forked_from_skill_id: 'string',
    parent_synced_at: '2019-08-24T14:15:22Z'
  })
};

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

### Python

```python
import requests

url = "https://truememory-api.mvstg.com/skills/<skill_id>"

payload = {
    "key": "string",
    "name": "string",
    "description": "string",
    "prompt": "string",
    "category": "string",
    "app_ids": ["string"],
    "icon": "string",
    "argument_hint": "string",
    "allowed_tools": ["string"],
    "metadata": {},
    "is_active": True,
    "sort_order": 0,
    "use_case": "string",
    "detection_patterns": ["string"],
    "license": "string",
    "compatibility": "string",
    "forked_from_skill_id": "string",
    "parent_synced_at": "2019-08-24T14:15:22Z"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

Successful Response

#### Example

```json
{
  "id": "string",
  "user_id": "string",
  "app_ids": [
    "string"
  ],
  "key": "string",
  "name": "string",
  "description": "string",
  "prompt": "string",
  "category": "string",
  "categories": [
    {
      "id": "string",
      "name": "string"
    }
  ],
  "icon": "string",
  "argument_hint": "string",
  "allowed_tools": [
    "string"
  ],
  "metadata": {},
  "use_case": "string",
  "detection_patterns": [
    "string"
  ],
  "license": "string",
  "compatibility": "string",
  "is_preset": true,
  "is_active": true,
  "sort_order": 0,
  "forked_from_skill_id": "string",
  "usage_count": 0,
  "last_used_at": "2019-08-24T14:15:22Z",
  "parent_synced_at": "2019-08-24T14:15:22Z",
  "created_at": "2019-08-24T14:15:22Z",
  "updated_at": "2019-08-24T14:15:22Z",
  "app_id": "string"
}
```

- `id` (`update_skill.response.200.id`; string, required)
- `user_id` (`update_skill.response.200.user_id`; any of, required) — Owner user_id, NULL for presets.
  - any of: `string`, `null`
- `app_ids` (`update_skill.response.200.app_ids`; any of, required) — Apps this skill is assigned to. NULL means all apps (global/unscoped).
  - any of: `array<string>`, `null`
- `key` (`update_skill.response.200.key`; string, required)
- `name` (`update_skill.response.200.name`; string, required)
- `description` (`update_skill.response.200.description`; any of, required)
  - any of: `string`, `null`
- `prompt` (`update_skill.response.200.prompt`; string, required)
- `category` (`update_skill.response.200.category`; any of, required) — Freeform grouping label (legacy string). Distinct from `categories`.
  - any of: `string`, `null`
- `icon` (`update_skill.response.200.icon`; any of, required)
  - any of: `string`, `null`
- `argument_hint` (`update_skill.response.200.argument_hint`; any of, required)
  - any of: `string`, `null`
- `allowed_tools` (`update_skill.response.200.allowed_tools`; array<string>, required)
- `metadata` (`update_skill.response.200.metadata`; object, required)
- `is_preset` (`update_skill.response.200.is_preset`; boolean, required)
- `is_active` (`update_skill.response.200.is_active`; boolean, required)
- `sort_order` (`update_skill.response.200.sort_order`; integer, required)
- `forked_from_skill_id` (`update_skill.response.200.forked_from_skill_id`; any of, required)
  - any of: `string`, `null`
- `usage_count` (`update_skill.response.200.usage_count`; integer, required) — Global invocation count, bumped via POST /skills/{id}/usage.
- `last_used_at` (`update_skill.response.200.last_used_at`; any of, required) — When the skill was last invoked, NULL if never.
  - any of: `string`, `null`
- `parent_synced_at` (`update_skill.response.200.parent_synced_at`; any of, required) — For forks: the preset updated_at this fork is synced to. The fork is stale when its preset's updated_at is newer. NULL for non-forks.
  - any of: `string`, `null`
- `created_at` (`update_skill.response.200.created_at`; string, required)
  - format `date-time`
- `updated_at` (`update_skill.response.200.updated_at`; string, required)
  - format `date-time`
- `app_id` (`update_skill.response.200.app_id`; any of, required) — DEPRECATED, read app_ids instead. Legacy single-app scalar derived from app_ids for pre-multi-app consumers: the first app id, or null for all apps. Lossy for multi-app skills.
  - any of: `string`, `null`
- `categories` (`update_skill.response.200.categories`; array<object>, optional) — Category entities assigned via the registry. Returned by the list endpoints, the single-skill reads (user and admin) and PUT /admin/skills/{skill_id}/categories; omitted by writes.
  - `id` (`update_skill.response.200.categories.id`; string, required)
  - `name` (`update_skill.response.200.categories.name`; string, required)
- `use_case` (`update_skill.response.200.use_case`; any of, optional) — When this skill applies, in natural language. Read by skill selection.
  - any of: `string`, `null`
- `detection_patterns` (`update_skill.response.200.detection_patterns`; any of, optional) — Example utterances that should invoke this skill.
  - any of: `array<string>`, `null`
- `license` (`update_skill.response.200.license`; any of, optional) — SKILL.md `license`: a license name, or the file in the skill that holds it.
  - any of: `string`, `null`
- `compatibility` (`update_skill.response.200.compatibility`; any of, optional) — SKILL.md `compatibility`: what the skill needs to run (product, packages, network).
  - any of: `string`, `null`

### 422

Validation Error

#### Example

```json
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}
```

- `detail` (`update_skill.response.422.detail`; array<object>, optional)
  - `loc` (`update_skill.response.422.detail.loc`; array<any of>, required)
    - any of: `string`, `integer`
  - `msg` (`update_skill.response.422.detail.msg`; string, required)
  - `type` (`update_skill.response.422.detail.type`; string, required)
  - `input` (`update_skill.response.422.detail.input`; unknown, optional)
  - `ctx` (`update_skill.response.422.detail.ctx`; object, optional)


Source: https://truememory-docs.mvstg.com/api/skills/update/index.md
