Website API: assets, shared sections and redirects
Use API introduction for connection details and shared conventions, and Publish pages for the revision workflow. Paths below are relative to https://activitymessenger.com/api/v1/organization/{organization}/websites/{website}.
Upload and reference images
GET /assetslists uploaded assets using the Website pagination rules. Add?sha256=<lowercase 64-character SHA-256>to find an exact file hash.POST /assetsuploads a PNG, JPEG, or WebP in multipart fieldfile, up to 15 MB. It returns an assetid,sha256, andurl. Uploading identical bytes again reuses the organization's asset.
Add every image used by a page or shared section to its document's assets list. Use the returned ID and hash:
{"path":"assets/en/screen.png","id":123,"sha256":"<64-character lowercase hash>"}
Reference the same path in Markdown or HTML and provide meaningful nonempty alt text. The asset path must match the content language: use assets/en/ in English and assets/fr/ in French. A declared asset URL may also be referenced in the matching language. Images outside the manifest, missing alt text, mismatched hashes, or assets owned by another organization are rejected. Assets may be reused across the organization's websites and are not deleted when a page changes.
Publish a reusable sidebar
The API's shared sidebar is an existing Website builder reusable section linked to pages. Editing the source updates all of its placements, including placements on other websites where an administrator has linked the same source. It is not a copied block. Below 992 pixels, the sidebar stacks above the page content.
- Call
GET /shared-section-keys/{key}. Its response containsshared_keyandshared_section; an unused key hasshared_section: null. An existing source includes its ID,edit_version,checksum, snapshot, and affected placements/pages/websites. - Call
POST /shared-sections/revisionswith the page-revision envelope:operation: "shared_upsert", stablepage_key,name,expected_checksum("missing"for creation, current checksum for updates), anddocument. The document contains exactly onesingle-columnsection, content for every enabled locale, and any declared assets. The page metadata and visibility fields required by the envelope do not create a page or control shared visibility. A sidebar inside a sidebar is rejected. - Review
GET /revisions/{revision}, including the compiled source and the full before snapshot and placement list. Publish withPOST /revisions/{revision}/publishand that revision's exactcontent_checksum. The result includesmicrosite_reusable_section_id. - Add
"sidebar": {"id": 123, "edit_version": 1}to each normal page document that should show it. Stage, review, and publish those page revisions separately.
The source must have been published through this website's shared API and belong to the route organization. Ownership mismatches return 404; version mismatches return 409. Omit sidebar or set it to null in a page replacement to remove that placement. Other pages and the shared source remain. A hidden or removed placement falls back to the ordinary page layout. A shared-source publication atomically updates linked placements and records affected page history. A changed source or placement list between review and publication returns 409. Shared updates change the checksums of linked pages, so read their current snapshots before later page revisions. This API does not delete shared sources or adopt arbitrary existing reusable sections.
Help presentation
For a Help Center page, a normal page document may set "presentation": "help". It is a page-level, versioned opt-in; omit it or set it to null on replacement to remove it. It adds scoped typography, spacing, responsive tables, and callouts without changing ordinary website pages or the shared source itself. A Markdown blockquote beginning [!NOTE], [!TIP], [!IMPORTANT], or [!WARNING] becomes a labeled callout. For a dynamic Help sidebar, use a translated nested Markdown list with plain-text categories and root-relative article links. The current page is highlighted and its ancestors expand; on mobile, the list starts behind a Browse help control. Up to six nesting levels are rendered. This presentation does not synchronize the legacy Help search or support vector store.
Replace redirects
GET /redirects returns the redirect rows, public URL, and current revision hash. PUT /redirects applies a complete replacement immediately, unlike page publication. Read the current map, keep rows owned by other integrations, and submit all desired rows with the current revision:
{
"revision": "<hash from GET /redirects>",
"redirects": [
{"source": "/old-guide", "destination": "/guides/getting-started/"}
]
}
The API checks duplicate sources, path collisions, and redirect chains. A stale revision conflicts. At most 2,000 redirects are accepted. Redirects for a former domain must also be configured on the server or website still handling that domain.