# Design packs (/docs/resources/design-packs)

A **design pack** is an ordered set of swipe files, such as "Winter sale" or "Founder story". Packs make it easy to build a campaign from a consistent family of designs. ID prefix: `dp_`. Scopes: `design_packs:read` / `design_packs:write`.

StaticAds.ai publishes its own packs (`is_managed: true`). They are read-only and appear while the **StaticAds.ai Design Packs** data source is on (see [Swipe files](/docs/resources/swipe-file)). Duplicate one to get an editable copy.

## Fields

| Field                                     | Type           | Notes                                                     |
| ----------------------------------------- | -------------- | --------------------------------------------------------- |
| `id`                                      | string         | `dp_…`                                                    |
| `title`, `description`                    | string         |                                                           |
| `is_managed`                              | boolean        | `true` for StaticAds.ai packs                             |
| `item_count`                              | number         | Designs in the pack (up to 500)                           |
| `previews`                                | array          | `[{ swipe_file_id, image_url, width, height }]`           |
| `matched_item_count`                      | number         | Present when you filter the list by swipe file attributes |
| `created_by`                              | object or null | `{ profile_id, name }`                                    |
| `archived_at`, `created_at`, `updated_at` | string         |                                                           |

## Endpoints

| Method   | Path                                          | What it does                                                                                                                                                                                                        |
| -------- | --------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `GET`    | `/v1/design-packs`                            | List. Filters: `search`, `ids`, `archived`, `order_by`, `order`, and swipe file filters (`industry`, `ad_format`, `aspect_ratio`, `awareness_stage`, `swipe_file_ids`, …) to find packs containing matching designs |
| `POST`   | `/v1/design-packs`                            | Create (`title`, optional `description`, `swipe_file_ids`)                                                                                                                                                          |
| `GET`    | `/v1/design-packs/{id}`                       | Get                                                                                                                                                                                                                 |
| `PATCH`  | `/v1/design-packs/{id}`                       | Rename or change the description                                                                                                                                                                                    |
| `POST`   | `/v1/design-packs/{id}/archive` / `unarchive` |                                                                                                                                                                                                                     |
| `POST`   | `/v1/design-packs/{id}/duplicate`             | Copy any pack into one you own                                                                                                                                                                                      |
| `DELETE` | `/v1/design-packs/{id}`                       | Delete the pack. Its designs stay in your swipe file                                                                                                                                                                |
| `GET`    | `/v1/design-packs/{id}/items`                 | The pack's designs, with the same filters and pagination as `GET /v1/swipe-files`                                                                                                                                   |
| `POST`   | `/v1/design-packs/{id}/items`                 | Add `swipe_file_ids`. Designs already in the pack come back in `already_present`                                                                                                                                    |
| `DELETE` | `/v1/design-packs/{id}/items`                 | Remove `swipe_file_ids`                                                                                                                                                                                             |

## Build one ad per design in a pack

```javascript
const { data: designs } = await sal(`/v1/design-packs/${packId}/items?aspect_ratio=4:5&limit=6`);

await sal(`/v1/campaigns/${campaignId}/ads`, {
  method: "POST",
  idempotencyKey: crypto.randomUUID(),
  body: {
    ads: designs.map((design) => ({
      product_id: productId,
      audience_id: audienceId,
      reference: { swipe_file_id: design.id },
    })),
  },
});
```

To pick the closest designs in a pack for an idea, search inside it: `POST /v1/swipe-files/search` with `design_pack_id`.

## Related

* [Swipe files](/docs/resources/swipe-file)
* [Build ads in batches](/docs/guides/batch-generation)
