Static Ads Lab
Reference

ID prefixes

Authoritative list of resource ID prefixes used across the Static Ads Lab API.

Every resource in the Static Ads Lab API has a typed ID prefix. The prefix is part of the ID — always include it.

PrefixResourceExample
brand_Brandbrand_a1b2c3d4e5f67890
prod_Productprod_a1b2c3d4e5f67890
pv_Product variantpv_a1b2c3d4e5f67890
aud_Audienceaud_a1b2c3d4e5f67890
img_Imageimg_a1b2c3d4e5f67890
dt_Design templatedt_a1b2c3d4e5f67890
ia_Image adia_a1b2c3d4e5f67890
iav_Image ad versioniav_a1b2c3d4e5f67890
sal_live_API keysal_live_…

Why prefixes

  • Cross-org safety. A prod_ from another org can never be mistaken for a brand_. The API rejects mismatches at the validation layer.
  • Debug speed. Reading prod_xyz in a log line is unambiguous. Reading xyz is not.
  • Type-friendly. Static analyzers and language tooling can constrain function arguments to a specific prefix.

TypeScript helper

type Prefixed<P extends string> = `${P}_${string}`;

type BrandId = Prefixed<"brand">;
type ProductId = Prefixed<"prod">;
type ProductVariantId = Prefixed<"pv">;
type AudienceId = Prefixed<"aud">;
type ImageId = Prefixed<"img">;
type DesignTemplateId = Prefixed<"dt">;
type ImageAdId = Prefixed<"ia">;
type ImageAdVersionId = Prefixed<"iav">;
type ApiKey = `sal_live_${string}`;

Validation

If you pass a prod_ where a brand_ is expected (or vice versa), the API returns 422 VALIDATION_ERROR. Don't strip the prefix. Don't add the prefix to a raw UUID — IDs are issued by the server, never client-generated.