Skip to content
Documentation menu

Link pages

Create a link page, its theme, its images and its translations.

Create a link page#

POST /link-pages (scope link_pages:write) creates a link page with no link: links are added afterwards with POST /link-pages/{linkPage}/links. Required: title, locale, isLogoVisible, shouldNoIndex, hasPagePassword, meta, avatar, socialLinks and theme.

{
  "title": "Chez Marie",
  "locale": "fr",
  "isLogoVisible": true,
  "shouldNoIndex": false,
  "hasPagePassword": false,
  "meta": {
    "title": null,
    "description": null
  },
  "avatar": {
    "type": "icon",
    "icon": null
  },
  "socialLinks": [],
  "theme": {
    "colorsTheme": "light"
  }
}
  • locale is the page’s default language, distinct from the interface language.
  • Hiding the badge (isLogoVisible: false), search indexing settings (shouldNoIndex: true, meta), a password, publication or expiry dates and an advanced theme depend on the plan: 402 otherwise.
  • folderId answers 422 field_not_available. Added languages and translations are set when updating.

PATCH /link-pages/{linkPage} updates a page: all fields are optional.

Theme#

theme is an object: colorsTheme (light or dark) and the background, buttons, avatar, heading and footer sections, free-form objects returned as saved.

The simplest way: design the page in the app, read its theme back with GET /link-pages/{linkPage} and send it, modified if needed, when creating or updating. The keys of the app’s theme catalog are not expanded on the server: send the complete theme.

Advanced options require link_pages.design_advanced: 402 plan_required if the plan does not include it.

Images#

The avatar image (avatar.image), the theme images and a link’s thumbnail (thumbnail.image) are the URL of a media file in the workspace’s library. The API does not accept file uploads: first add the image in the app, then use its URL.

A URL that is not a media file of the workspace is rejected by validation (422).

A page’s links are managed one by one:

  • GET /link-pages/{linkPage}/links: the links, sorted by position, not paginated.
  • POST /link-pages/{linkPage}/links: adds a link at the end. type is required; title and data (depending on the type) follow.
  • PATCH /link-pages/{linkPage}/links/{link}: updates a link, all fields are optional.
  • PATCH /link-pages/{linkPage}/links/{link}/active: enables or disables a link without touching the rest.
  • PATCH /link-pages/{linkPage}/links/reorder: order lists the link identifiers in the new order.
  • DELETE /link-pages/{linkPage}/links/{link}: deletes the link (204).

The form type does not exist in the API: 422. Embedded types (youtube, spotify…) depend on the plan (402 otherwise). Only one link can be pinned per page (highlight.pinned).

Translations#

A page can be written in several languages. languages lists the added languages (no duplicates, and not the default language) and translations carries the texts, per language. Adding a language requires a plan that includes it (402 otherwise).

On the public page, a missing field takes the default language’s value, field by field. When saved, strings are trimmed, empty strings removed and keys limited to the added languages, silently. translations is always an object, {} when empty.

A link translates its title; data only carries its type’s translatable keys:

Link typeTranslatable data keys
texttext
eventsummary, description
mailsubject, message
Other typestitle only

What the API does not cover#

  • No page deletion: DELETE /link-pages/{linkPage} does not exist (405). Delete a page in the app; only its links can be deleted through the API.
  • No folders: folderId answers 422 field_not_available.
  • No file upload: images are URLs of the workspace’s media files.
  • No link of type form.

Read next