Static Ads Lab
Concepts

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

FieldTypeDescription
idstringdp_…
titlestring1-80 characters. Titles do not need to be unique.
descriptionstring | nullUp to 500 characters, for teammates browsing packs
is_managedbooleanTrue for packs curated by Static Ads Lab (read-only). Packs you create are false.
item_countnumberDesigns in the pack your organization can currently see
previewsobject[]Up to 4 of the most recently added designs (swipe_file_id, image_url, width, height), for a cover
matched_item_countnumberOnly when listing with a swipe file filter: how many designs match
created_byobject | null{ profile_id, name } of the teammate who created the pack
archived_atstring | nullSet while the pack is archived
created_at / updated_atstringISO timestamps. Adding or removing designs updates updated_at.

Endpoints

MethodPathPurpose
GET/v1/design-packsList packs, most recently updated first
POST/v1/design-packsCreate a pack, optionally with designs
GET/v1/design-packs/:idGet a pack
PATCH/v1/design-packs/:idRename it or change its description
DELETE/v1/design-packs/:idDelete a pack (its designs stay in your swipe file)
POST/v1/design-packs/:id/archiveArchive a pack
POST/v1/design-packs/:id/unarchiveRestore an archived pack
GET/v1/design-packs/:id/itemsList the pack's designs (same filters and pagination as GET /v1/swipe-files)
POST/v1/design-packs/:id/itemsAdd designs, up to 100 per call
DELETE/v1/design-packs/:id/itemsRemove 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

CodeWhen
DESIGN_PACK_NOT_FOUNDThe pack does not exist or belongs to another organization
SWIPE_FILE_NOT_FOUNDOne or more swipe_file_ids are not in your library. details lists each one.
DESIGN_PACK_FULLAdding the designs would take the pack past 500