API Reference

Retrieve published assets with a GET request, or create and update assets in bulk with a POST. Both endpoints require an API key.

Base URL

https://api.duggiecms.com

Authentication

Pass your project API key in the x-api-key request header. Keys are found on your project's Settings page. Use your Secret key for writes and draft access. Keep secure. Your Client key is for read-only access to published content. It is safer to expose.

Header
x-api-key: YOUR_API_KEY

Endpoints

GET/v1/contentRetrieve published assets. A Secret key also returns drafts

Query Parameters

ParameterRequiredDescription
languageNo Locale code matching one of your project's configured locales (e.g. en-US, fr-FR). Omit to receive the default locale.
tagsNo Filter the response to only include assets with these tags. Repeat the parameter for multiple tags (e.g. ?tags=hero-title&tags=cta-button). Omit to return all assets. Filtering is applied after the cache is read, so it does not affect cache efficiency.
duggiePreviewTokenNo Live Preview session token. When present the response includes unpublished draft content so you can preview changes before publishing. It is read-only. The batch endpoint refuses it and, like an API key, it is refused while the project is inactive.

GET Response Format

A successful response returns HTTP 200 with a JSON body. The assets object is keyed by asset tag. Text and JSON assets are returned as plain strings. Image assets are returned as an object of named variant URLs (original, large, medium, thumb).

200 OK
{
  "assets": {
    "hero-heading": "Welcome to our site",
    "nav-links": "[{\"label\":\"Home\",\"href\":\"/\"}]",
    "hero-image": {
      "original": "https://cdn.duggiecms.com/.../original/hero.jpg",
      "large":    "https://cdn.duggiecms.com/.../large/hero.jpg",
      "medium":   "https://cdn.duggiecms.com/.../medium/hero.jpg",
      "thumb":    "https://cdn.duggiecms.com/.../thumb/hero.jpg",
      "meta": { "width": 2400, "height": 1600 }
    },
    "menu-pdf": {
      "url":       "https://cdn.duggiecms.com/.../v3-a1b2/menu.pdf",
      "fileName":  "Spring Menu 2026.pdf",
      "sizeBytes": 248312
    }
  }
}

Which image variants appear depends on the original. They are never upscaled, so an image narrower than 1200 px has no large, and GIF and SVG return original only. A missing variant is undefined rather than an error, so read them as image.large ?? image.original. Limits lists the widths.

A tag can come back with a null value: that means the asset is disabled, so its content is withheld while the tag stays stable for your code. Null-check content you render rather than assuming a tag is always populated. See Assets for the full behavior, including how it differs between your Client and Secret keys.

Error Codes

StatusMeaning
401Missing or invalid x-api-key
403API key is disabled or the project is inactive
429Rate limit reached. Monthly limits apply to free projects only. Paid slots are unmetered.
500Internal server error. Contact support if this persists