# Create a UI skill

Creates a UI skill.

```http
POST https://api.pozy.ai/v1/accounts/{accountId}/business-agent/ui-skills
```

- Area: WhatsApp / Business Agent
- Auth: Authorization: Bearer pz_live_...

## Path parameters

- `accountId` (string, required)

## Request body

Content type: `application/json`

- `title`, string
- `component_type`, string, required: One of `carousel_quick_reply`, `carousel_url`, `cta_url`, `flow`, `image`, `interactive_list`, `interactive_reply_buttons`, `location`, `location_request`
- `status`, string, required: One of `enabled`, `disabled`
- `instruction`, string, required
- `flow_id`, integer

## Example request

```bash
curl -X POST "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/business-agent/ui-skills" \
  -H "Authorization: Bearer $POZY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "component_type": "carousel_quick_reply",
  "status": "enabled",
  "instruction": "string"
}'
```

```ts
const res = await fetch("https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/business-agent/ui-skills", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.POZY_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    component_type: "carousel_quick_reply",
    status: "enabled",
    instruction: "string"
  }),
});
const data = await res.json();
if (!res.ok) throw new Error(data?.error ?? `Request failed with status ${res.status}`);
console.log(data);
```

```python
import os
import requests

resp = requests.post(
    "https://api.pozy.ai/v1/accounts/696e0b682d0a31188e7a2ba9/business-agent/ui-skills",
    headers={"Authorization": f"Bearer {os.environ['POZY_API_KEY']}"},
    json={
        "component_type": "carousel_quick_reply",
        "status": "enabled",
        "instruction": "string",
    },
    timeout=30,
)
resp.raise_for_status()
print(resp.json())
```

## Response 201

- `title`, string
- `component_type`, string, required: One of `carousel_quick_reply`, `carousel_url`, `cta_url`, `flow`, `image`, `interactive_list`, `interactive_reply_buttons`, `location`, `location_request`
- `status`, string, required: One of `enabled`, `disabled`
- `instruction`, string, required
- `flow_id`, integer
- `id`, string, required
- `created_at`, integer
- `updated_at`, integer

```json
{
  "title": "Launch day",
  "component_type": "carousel_quick_reply",
  "status": "enabled",
  "instruction": "string",
  "flow_id": 1,
  "id": "6bfebd43ddc270f6d2c56fc5",
  "created_at": 1,
  "updated_at": 1
}
```
