---
title: "Apply a pack by plan"
locale: en
url: https://tlg.builera.app/en/docs/reference/rest/packs.apply
verified: 2026-10-24
app_version: "2.0"
generated: true
---

# Apply a pack by plan

Apply exactly a plan from packs_plan (expectedAccounts = its account count). Refused with revision_conflict when the pack or an account changed since the plan, plan_expired after 15 minutes, plan_used if already applied. Reports per account. More than 20 accounts must be confirmed by the user.

Apply exactly a plan from packs_plan (expectedAccounts = its account count). Refused with revision_conflict when the pack or an account changed since the plan, plan_expired after 15 minutes, plan_used if already applied. Reports per account. More than 20 accounts must be confirmed by the user.

## Overview

| Name | Value |
| --- | --- |
| Code | `packs.apply` |
| Scope needed | `automation.write` |
| Risk | Write |
| May need confirmation | Yes |
| Runs as | Answers right away |
| Needs `Idempotency-Key` | Yes |
| Member roles allowed | `owner`, `manager` |
| In the app | Automation → Config packs → Apply |

## Input fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `planId` | `uuid` | Yes |   |
| `expectedAccounts` | `integer` | Yes |   |

## Example request

```bash
curl -X POST https://tlg.builera.app/api/public/v2/ops/packs.apply \
  -H "Authorization: Bearer $TELEGRAM_AUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: <unique key per operation>" \
  -d '{"planId":"00000000-0000-0000-0000-000000000000","expectedAccounts":1}'
```

## Output fields (`data`)

| Field | Type | Required |
| --- | --- | --- |
| `ok` | `true` | Yes |
| `results` | `object[]` | Yes |

## Example answer

```json
{
  "data": {
    "ok": true,
    "results": [
      {
        "accountId": "00000000-0000-4000-8000-000000000000",
        "name": "text",
        "ok": true,
        "error": "text",
        "changed": 1
      }
    ]
  }
}
```

## Using it over MCP

Not listed on any profile: call `tools_describe` then `tools_run` with `code: "packs.apply"`. Tool name when listed: `packs_apply`.
