Design packs
Named collections of swipe file designs you can reuse across campaigns, and hand to Studio in one mention.
A design pack groups swipe file designs under a name, so a set you reuse (for example "Summer Tees") lives in one place instead of a list of
sf_ids. Mention it in Studio as@dp_…to build from every design in it.
Mental model
- A pack is org-wide. Anyone in your organization can rename it, add designs, or remove them.
- A design can be in many packs. Adding a design to a pack never copies or moves it.
- Packs can hold your own uploads and designs from data sources you subscribe to.
- If a design is archived, or a data source is turned off, its designs drop out of your packs. Turn the source back on and they return.
- A pack holds up to 500 designs. Packs are free.
ID prefix: dp_.
Fields
| Field | Type | Description |
|---|---|---|
id | string | dp_… |
title | string | 1-80 characters. Titles do not need to be unique. |
description | string | null | Up to 500 characters, for teammates browsing packs |
is_managed | boolean | True for packs curated by Static Ads Lab (read-only). Packs you create are false. |
item_count | number | Designs in the pack your organization can currently see |
previews | object[] | Up to 4 of the most recently added designs (swipe_file_id, image_url, width, height), for a cover |
matched_item_count | number | Only when listing with a swipe file filter: how many designs match |
created_by | object | null | { profile_id, name } of the teammate who created the pack |
archived_at | string | null | Set while the pack is archived |
created_at / updated_at | string | ISO timestamps. Adding or removing designs updates updated_at. |
Endpoints
| Method | Path | Purpose |
|---|---|---|
GET | /v1/design-packs | List packs, most recently updated first |
POST | /v1/design-packs | Create a pack, optionally with designs |
GET | /v1/design-packs/:id | Get a pack |
PATCH | /v1/design-packs/:id | Rename it or change its description |
DELETE | /v1/design-packs/:id | Delete a pack (its designs stay in your swipe file) |
POST | /v1/design-packs/:id/archive | Archive a pack |
POST | /v1/design-packs/:id/unarchive | Restore an archived pack |
GET | /v1/design-packs/:id/items | List the pack's designs (same filters and pagination as GET /v1/swipe-files) |
POST | /v1/design-packs/:id/items | Add designs, up to 100 per call |
DELETE | /v1/design-packs/:id/items | Remove designs, up to 100 per call |
GET /v1/swipe-files and POST /v1/swipe-files/search also accept design_pack_id, so you can filter or search within a pack.
Reading packs requires the design_packs:read scope; creating and changing them requires design_packs:write.
Create a pack
const response = await fetch("https://api.staticadslab.com/v1/design-packs", {
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({
title: "Summer Tees",
description: "Bold type, flat product shots.",
swipe_file_ids: ["sf_a1b2c3d4e5f67890", "sf_f9e8d7c6b5a43210"],
}),
});
const { data: pack } = await response.json();
console.log(pack.id, pack.item_count);Add designs
Adding is idempotent: designs already in the pack come back in already_present.
const response = await fetch(
"https://api.staticadslab.com/v1/design-packs/dp_a1b2c3d4e5f67890/items",
{
method: "POST",
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json",
},
body: JSON.stringify({ swipe_file_ids: ["sf_0a1b2c3d4e5f6789"] }),
},
);
const { data } = await response.json();
// { added: ["sf_0a1b2c3d4e5f6789"], already_present: [], item_count: 3 }Find packs that contain a design
Pass swipe file filters to GET /v1/design-packs to list only packs with a match. Each pack then reports matched_item_count.
const params = new URLSearchParams({ aspect_ratio: "4:5" });
const response = await fetch(
`https://api.staticadslab.com/v1/design-packs?${params}`,
{ headers: { "X-API-Key": "YOUR_API_KEY" } },
);
const { data: packs } = await response.json();
for (const pack of packs) {
console.log(`${pack.title}: ${pack.matched_item_count} of ${pack.item_count} match`);
}Errors
| Code | When |
|---|---|
DESIGN_PACK_NOT_FOUND | The pack does not exist or belongs to another organization |
SWIPE_FILE_NOT_FOUND | One or more swipe_file_ids are not in your library. details lists each one. |
DESIGN_PACK_FULL | Adding the designs would take the pack past 500 |