1. Assets
Backoffice API
  • Welcome to Omerlo CMS backoffice API
  • AdOps
    • Advertisers
      • Paginated Advertisers
      • Create Advertiser
      • Advertiser by id
      • Update Advertiser by id
    • Ads
      • Paginated Ads in Advertiser
      • Create Ad in Advertiser
      • Ad by id
      • Update Ad by id
      • Place an Ad in Issue or Media
    • Creatives
      • All creatives in Ad
      • Create Creative in Ad
      • Creative by id
      • Update Creative by id
      • Upload Creative image by id
      • Remove Creative by id
    • Categories
      • Paginated Categories
      • Create Category
      • Category by id
      • Update Category by id
      • Delete Category by id
  • Assets
    • How to upload an image and use it
    • Upload Asset Image
      POST
    • Get Asset Image by key
      GET
  • Community
    • Events
      • Blocks
        • Event blocks by id
        • Manage Event blocks by id
        • Event Block entries by ids
        • Manage Event Block entries by ids
      • Sessions
        • Event sessions by event_id
        • Create Event session
        • Event session by id
        • Update Event session by id
        • Remove Event session by id
      • Metadata
        • All Event Metadata
        • Update all Event Metadata
      • List events
      • Create Event
      • Event by id
      • Update Event by id
      • Remove Event by id
      • Event occurrences by id
      • Update Event Block by ids
      • Switch Profile Type by Event id
      • Change event's workspace
    • Organizations
      • Blocks
        • Organization blocks by id
        • Manage Organization blocks by id
        • Organization Block entries by ids
        • Manage Organization Block entries by ids
      • Metadata
        • All Organization Metadata
        • Update all Organization Metadata
      • List organizations
      • Create Organization
      • Organization by id
      • Update Organization by id
      • Remove Organization by id
      • Update Organization Block by ids
      • Switch Profile Type by Organization id
      • Change organization's workspace
    • People
      • Blocks
        • Person blocks by id
        • Manage Person blocks by id
        • Person Block entries by ids
        • Manage Person Block entries by ids
      • Metadata
        • All Person Metadata
        • Update all Person Metadata
      • List people
      • Create Person
      • Person by id
      • Update Person by id
      • Remove Person by id
      • Update Person Block by ids
      • Switch Profile Type by Person id
      • Change person's workspace
    • Projects
      • Blocks
        • Project blocks by id
        • Manage Project blocks by id
        • Project Block entries by ids Copy
        • Manage Project Block entries by ids
      • Metadata
        • All Project Metadata
        • Update all Project Metadata
      • List projects
      • Create Project
      • Project by id
      • Update Project by id
      • Remove Project by id
      • Update Project Block by ids
      • Switch Profile Type by Project id
      • Change project's workspace
  • Composer
    • Workspaces
      • Paginated workspaces
      • Get workspace by id
  • Core
    • Assets
      • Images
        • Create Asset Image
        • Asset Image by id
        • Asset Image by key
        • Asset Image by hash
        • Delete Asset Image by id
        • Restore soft deleted Asset image by id
    • Categories
      • Paginated Categories
      • Create Category
      • Category by id
      • Update Category by id
      • Delete Category by id
      • Restore soft deleted Category by id
    • References
      • Create Reference
      • Reference by ref
      • Remove Reference by ref
      • Lookup References
  • Docs
    • ContentTypes
      • Paginated ContentTypes
      • Create ContentType
      • ContentType by id
      • Update ContentType by id
      • Remove ContentType by id
    • Templates
      • Paginated Templates
      • Create Template
      • Template by id
      • Update Template by id
      • Remove Template by id
    • Contents
      • Paginated Contents
      • Create Content
      • Content by id
      • Update Content by id
      • Delete Content by id
      • Restore soft deleted Content by id
      • Switch Content Template by id
      • Change Content's Workspace
    • Metadata
      • All Content Metadata
      • Update all Content Metadata
    • Blocks
      • All blocks by Content id
      • Create Block in a Content Locale
      • Update Block by id
      • Remove Block by id
  • Magazines
    • Issues
      • List Issues by Workspace id
      • Create Issue in Workspace
      • Issue by id
      • Update Issue by id
      • Delete Issue by id
      • Restore soft deleted Issue by id
    • Sections
      • All sections by Issue id
      • Create Section in Issue
      • Section by id
      • Update Section by id
      • Remove Section by id
      • Section contents by Section id
    • Blocks
      • All blocks by Section id
      • Bulk update blocks by Section id
      • Block by id
      • Update Block by id
    • Slots
      • All slots by Block id
      • Bulk update slots by Block id
    • SectionContents
      • List SectionContents by Issue id
      • Search SectionContents by Issue id
      • Create SectionContent in Section
      • Remove SectionContent by id
  • Messenger
    • SES
      • SES Webhook for mail events
    • Mailinglists
      • Paginated subscriptions by mailinglist id
  • Publisher
    • BlockConfigs
      • All Block Configurations
      • Create Block Configuration
      • Get Block Configuration by id
      • Update Block Configuration by id
    • Blocks
      • Create Media Block HTML
      • Media Block by id
      • Update Media Block HTML by id
    • Publications
      • Create Publication
      • Publication by id
      • Remove Publication by id
  • ReaderHub
    • Readers
      • Create Reader entitlement
    • SES
      • SES Webhook for mail events
    • Mailinglists
      • Paginated subscriptions by mailinglist id
      • Subscribe by mailinglist id
  • Webhooks
    • Webhook Security
    • Events
      • Event Invitation Created
      • Participant Created
      • Participant Removed
  • Schemas
    • AdOps
      • Ad
      • Advertiser
      • Advertiser (summary)
      • Category
      • Creative
    • Community
      • Event
      • Event (summary)
      • Event Schedule
      • Event Session
      • Event Session (summary)
      • Organization
      • Organization (summary)
      • Person
      • Person (summary)
      • Project
      • Project (summary)
      • Profile
      • Profile (summary)
      • Profile Address
      • Profile Block
      • Profile Block (summary)
      • Profile BlockEntry
      • Profile BlockEntry (summary)
      • Profile Contact
      • Profile Description
      • Profile Metadata
    • Composer
      • Workspace
      • Workspace (summary)
      • Status (summary)
    • Core
      • Visual
        • Image
        • Slideshow
        • Video
        • Visual Image
        • Visual Slideshow
        • Visual Video
        • Visual None
      • Asset
      • Category
      • Reference
      • Paging Metadata
      • Visual
    • Docs
      • Content
        • Content
        • Content (summary)
        • Content Metadata
        • Content Block
      • Blocks
        • Quote Block
        • Question Block
        • Data Block
        • HTML Block
        • Image Block
        • Related Content Block
        • Profiles Block
        • Richtext Block
        • Slideshow Block
        • Video Block
      • ContentType
        • ContentType
        • ContentTemplate (summary)
        • ContentTemplate
    • Magazines
      • Issue
      • Issue (summary)
      • Section
      • Section Block
      • Section Block (summary)
      • Block Slot
      • SectionContent
    • Publisher
      • Publication
      • Reader subscription (summary)
      • Media Block Configuration (summary)
      • Media Block Configuration
    • ReaderHub
      • Entitlement
  1. Assets

How to upload an image and use it

Image upload flow#

How an image gets from a local file to a stored field such as a person's profile_image_key.
This is a workflow guide, not a reference: parameters, headers and error payloads for each
endpoint are documented in the Backoffice API reference.

Two calls, two different keys#

No endpoint takes a binary and a resource in one call. Uploading and attaching are separate:
1.
Upload sends the binary and returns a temporary key.
2.
Attach sends that key as a field of the resource, and returns the permanent key that was
stored.
   ①  POST assets.<host>/upload/image        ②  PATCH /api/community/v2/people/:id
                                                 { "profile_image_key": <key from ①> }

  jane.jpg ──────────►  uploads/<tenant_id>/<uuid>.jpg  ──────────►  <tenant_id>/community/<uuid>.jpg
                        temporary                                    permanent, stored on the person
The key from step ① is not the key that ends up stored. Only the one returned by step ② is
durable — that is the one to persist on your side and to build display URLs from.

Step ① — upload#

POST /upload/image on the assets host (assets.localhost:4000 in development,
assets.<cms-host> elsewhere), multipart/form-data, field named image. Every other call in
this workflow goes to the regular API host under /api.
{ "data": { "key": "uploads/3f1c8a9e-…/9b7c1d2e-….jpg" } }
The field is key here; each resource that accepts it in step ② names its own field ..._key.
This key is short-lived. Attach it in the same sequence of calls — do not store a uploads/…
key on your side to attach it later.

Step ② — attach#

Send the key as the resource's image field. For a person's profile picture:
The response carries a different key — the permanent one:
{
  "data": {
    "id": "6a1b2c3d-…",
    "first_name": "Jane",
    "profile_image_key": "3f1c8a9e-…/community/4e5f6a7b-….jpg"
  }
}
Replacing an image is the same call with a new uploaded key — nothing to delete on your side.

Rules#

SituationResult
The key was already attached somewhere (<tenant_id>/community/….jpg)400 — {"errors": {"profile_image_key": ["not uploaded file"]}}. A permanent key can never be attached again.
The uploaded key expired, or is a typo400 — {"errors": {"profile_image_key": ["not found"]}}
You update other fields and want to keep the current imageOmit the field. PATCH only applies what you send.
You want the same image on two resourcesUpload it once per attach.

The same two calls everywhere#

Step ① never changes. Step ② is whichever endpoint owns the field:
ResourceField(s)Attach endpoint
Person, Organization, Project, Eventprofile_image_key, cover_image_keyPOST /api/community/v2/workspaces/:workspace_id/<resources> (create) or PATCH /api/community/v2/<resources>/:id (update)
Asset library imagefile_keyPOST /api/core/v2/assets/images
One exception. Ad creatives do both in a single call:
PUT /api/ad-ops/v2/creatives/:creative_id/upload takes the multipart image directly and sets
the creative's image_key. No intermediate key is returned.

Attaching to the asset library instead#

Attaching directly to a resource suits a visual owned by that resource alone — a profile picture, a
cover. For an image that has to be reusable, searchable, captioned and credited, attach it to the
asset library instead: POST /api/core/v2/assets/images with the uploaded key plus name,
gravity and per-locale caption_html / credit. Same two calls, except you get back an Image
with an id you can reference.
Posting a file already present in the library returns 409 Conflict with the existing image in
data
— treat it as a success and use the id and file_key it returns.

Displaying the image#

A stored key becomes a URL by prefixing it with the assets host. No API key is needed, and the
image is resized on the fly through quality (ld, md default, hd, original) and format
(webp, png, jpg, gif, otherwise negotiated from the Accept header):
https://assets.<cms-host>/3f1c8a9e-…/community/4e5f6a7b-….jpg?quality=hd

End to end#

Modified at 2026-10-02 06:51:20
Previous
Delete Category by id
Next
Upload Asset Image
Built with