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.
| Prefix | Resource | Example |
|---|---|---|
brand_ | Brand | brand_a1b2c3d4e5f67890 |
prod_ | Product | prod_a1b2c3d4e5f67890 |
pv_ | Product variant | pv_a1b2c3d4e5f67890 |
aud_ | Audience | aud_a1b2c3d4e5f67890 |
img_ | Image | img_a1b2c3d4e5f67890 |
dt_ | Design template | dt_a1b2c3d4e5f67890 |
ia_ | Image ad | ia_a1b2c3d4e5f67890 |
iav_ | Image ad version | iav_a1b2c3d4e5f67890 |
sal_live_ | API key | sal_live_… |
Why prefixes
- Cross-org safety. A
prod_from another org can never be mistaken for abrand_. The API rejects mismatches at the validation layer. - Debug speed. Reading
prod_xyzin a log line is unambiguous. Readingxyzis 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.