Aller au contenu

Page styles

A page style brings together colours, fonts, layout and banner, shared by every page that follows it: changing it changes those pages at once. The settings are those of the page appearance; a page is linked to a style with PATCH /v1/pages/{id}/style. Creating, changing or duplicating a style depends on the plan, like components.

List the styles

GET/v1/page-styles

The seven styles provided by TinyLink first (builtin: true: default, light, dark, blue, cream, forest, plum), usable by every page but not editable, then those of the environment, in alphabetical order. pages_count counts the pages that follow the style. Read scope.

curl https://api.tinylink.fr/v1/page-styles \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "data": [
    {
      "id": "default",
      "name": "Default",
      "description": null,
      "builtin": true,
      "settings": {
        "header_layout": "classic",
        "logo_size": "medium",
        "header_text_size": "medium",
        "header_color": "#212121",
        "header_title_color": "#FFFFFF",
        "header_description_color": "#D8D8D8",
        "header_icon_color": "#FFFFFF",
        "header_title_font": "metroblack",
        "header_description_font": "robotoreg",
        "button_text_size": "medium",
        "button_color": "#FFFFFF",
        "button_title_color": "#212121",
        "button_description_color": "#888888",
        "button_title_font": "robotoreg",
        "button_description_font": "robotoreg",
        "button_radius": "rounded",
        "background_color": "#F0F0F0",
        "section_text_size": "medium",
        "section_title_color": "#212121",
        "section_title_font": "robotobold",
        "section_description_color": "#888888",
        "section_description_font": "robotoreg"
      },
      "banner": null,
      "pages_count": 0,
      "created_at": null
    },
    {
      "id": "light",
      "name": "Light",
      "description": null,
      "builtin": true,
      "settings": {
        "header_layout": "classic",
        "logo_size": "medium",
        "header_text_size": "medium",
        "header_color": "#FFFFFF",
        "header_title_color": "#212121",
        "header_description_color": "#646464",
        "header_icon_color": "#212121",
        "header_title_font": "metroblack",
        "header_description_font": "robotoreg",
        "button_text_size": "medium",
        "button_color": "#FFFFFF",
        "button_title_color": "#212121",
        "button_description_color": "#888888",
        "button_title_font": "robotoreg",
        "button_description_font": "robotoreg",
        "button_radius": "rounded",
        "background_color": "#F0F0F0",
        "section_text_size": "medium",
        "section_title_color": "#212121",
        "section_title_font": "robotobold",
        "section_description_color": "#888888",
        "section_description_font": "robotoreg"
      },
      "banner": null,
      "pages_count": 0,
      "created_at": null
    }
  ]
}

Create a style

POST/v1/page-styles

name is required (100 characters at most). Settings start from those of a new page; settings changes some of them. With from_page (id or slug of a page), the style takes that page's appearance, banner included — the page is not linked to it for all that. Write scope.

  • name — the style name
  • description — 1,000 characters at most
  • settings — appearance settings, see Page appearance
  • from_page — page whose appearance is copied
curl -X POST https://api.tinylink.fr/v1/page-styles \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Charte 2026",
    "description": "Couleurs de la marque",
    "settings": {
      "button_color": "#1E90FF",
      "button_title_color": "#FFFFFF",
      "button_radius": "circular"
    }
  }'

Possible responses

{
  "id": "PST6ad34a11d00877",
  "name": "Charte 2026",
  "description": "Couleurs de la marque",
  "builtin": false,
  "settings": {
    "header_layout": "classic",
    "logo_size": "medium",
    "header_text_size": "medium",
    "header_color": "#212121",
    "header_title_color": "#FFFFFF",
    "header_description_color": "#D8D8D8",
    "header_icon_color": "#FFFFFF",
    "header_title_font": "metroblack",
    "header_description_font": "robotoreg",
    "button_text_size": "medium",
    "button_color": "#1E90FF",
    "button_title_color": "#FFFFFF",
    "button_description_color": "#888888",
    "button_title_font": "robotoreg",
    "button_description_font": "robotoreg",
    "button_radius": "circular",
    "background_color": "#F0F0F0",
    "section_text_size": "medium",
    "section_title_color": "#212121",
    "section_title_font": "robotobold",
    "section_description_color": "#888888",
    "section_description_font": "robotoreg"
  },
  "banner": null,
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:33+02:00",
  "pages": []
}

Read a style

GET/v1/page-styles/{id}

The style and the pages that follow it. A provided style can be read too (/page-styles/dark). Read scope.

curl https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "id": "PST6ad34a11d00877",
  "name": "Charte 2026",
  "description": "Couleurs de la marque",
  "builtin": false,
  "settings": {
    "header_layout": "classic",
    "logo_size": "medium",
    "header_text_size": "medium",
    "header_color": "#212121",
    "header_title_color": "#FFFFFF",
    "header_description_color": "#D8D8D8",
    "header_icon_color": "#FFFFFF",
    "header_title_font": "metroblack",
    "header_description_font": "robotoreg",
    "button_text_size": "medium",
    "button_color": "#1E90FF",
    "button_title_color": "#FFFFFF",
    "button_description_color": "#888888",
    "button_title_font": "robotoreg",
    "button_description_font": "robotoreg",
    "button_radius": "circular",
    "background_color": "#F0F0F0",
    "section_text_size": "medium",
    "section_title_color": "#212121",
    "section_title_font": "robotobold",
    "section_description_color": "#888888",
    "section_description_font": "robotoreg"
  },
  "banner": null,
  "pages_count": 1,
  "created_at": "2026-10-17T12:12:33+02:00",
  "pages": [
    {
      "id": "P6ad34a0e4fef09",
      "name": "Ma page",
      "url": "https://tnylnk.fr/ma-page"
    }
  ]
}

Change a style

PATCH/v1/page-styles/{id}

name, description and, in settings, only the settings to change. Every page that follows the style changes with it. Write scope.

curl -X PATCH https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"settings":{"background_color":"#181818"}}'

Possible responses

{
  "id": "PST6ad34a11d00877",
  "name": "Charte 2026",
  "description": "Couleurs de la marque",
  "builtin": false,
  "settings": {
    "header_layout": "classic",
    "logo_size": "medium",
    "header_text_size": "medium",
    "header_color": "#212121",
    "header_title_color": "#FFFFFF",
    "header_description_color": "#D8D8D8",
    "header_icon_color": "#FFFFFF",
    "header_title_font": "metroblack",
    "header_description_font": "robotoreg",
    "button_text_size": "medium",
    "button_color": "#1E90FF",
    "button_title_color": "#FFFFFF",
    "button_description_color": "#888888",
    "button_title_font": "robotoreg",
    "button_description_font": "robotoreg",
    "button_radius": "circular",
    "background_color": "#181818",
    "section_text_size": "medium",
    "section_title_color": "#212121",
    "section_title_font": "robotobold",
    "section_description_color": "#888888",
    "section_description_font": "robotoreg"
  },
  "banner": null,
  "pages_count": 1,
  "created_at": "2026-10-17T12:12:33+02:00",
  "pages": [
    {
      "id": "P6ad34a0e4fef09",
      "name": "Ma page",
      "url": "https://tnylnk.fr/ma-page"
    }
  ]
}

Change a style's banner

PUT/v1/page-styles/{id}/banner

POST/v1/page-styles/{id}/banner

DELETE/v1/page-styles/{id}/banner

Same upload as the banner of a page (image, crop.classic, crop.wide); DELETE removes it. Pages that follow the style show it at once. Write scope.

curl -X PUT https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/banner \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"image":"https://example.com/banner.jpg"}'

Possible responses

{
  "id": "PST6ad34a11d00877",
  "name": "Charte 2026",
  "description": "Couleurs de la marque",
  "builtin": false,
  "settings": {
    "header_layout": "classic",
    "logo_size": "medium",
    "header_text_size": "medium",
    "header_color": "#212121",
    "header_title_color": "#FFFFFF",
    "header_description_color": "#D8D8D8",
    "header_icon_color": "#FFFFFF",
    "header_title_font": "metroblack",
    "header_description_font": "robotoreg",
    "button_text_size": "medium",
    "button_color": "#1E90FF",
    "button_title_color": "#FFFFFF",
    "button_description_color": "#888888",
    "button_title_font": "robotoreg",
    "button_description_font": "robotoreg",
    "button_radius": "circular",
    "background_color": "#181818",
    "section_text_size": "medium",
    "section_title_color": "#212121",
    "section_title_font": "robotobold",
    "section_description_color": "#888888",
    "section_description_font": "robotoreg"
  },
  "banner": {
    "classic": "https://content.tinylink.fr/page-banner/banner_6ad34a1230b69.webp",
    "wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a1230b69.webp"
  },
  "pages_count": 1,
  "created_at": "2026-10-17T12:12:33+02:00",
  "pages": [
    {
      "id": "P6ad34a0e4fef09",
      "name": "Ma page",
      "url": "https://tnylnk.fr/ma-page"
    }
  ]
}

Duplicate a style

POST/v1/page-styles/{id}/duplicate

Copies the style, banner included, under the name name (by default: the name followed by “(copy)”). A provided style can be duplicated too: the copy belongs to the environment and can be changed. Write scope.

curl -X POST https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877/duplicate \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"name":"Charte 2026 (soldes)"}'

Possible responses

{
  "id": "PST6ad34a13c32e24",
  "name": "Charte 2026 (soldes)",
  "description": "Couleurs de la marque",
  "builtin": false,
  "settings": {
    "header_layout": "classic",
    "logo_size": "medium",
    "header_text_size": "medium",
    "header_color": "#212121",
    "header_title_color": "#FFFFFF",
    "header_description_color": "#D8D8D8",
    "header_icon_color": "#FFFFFF",
    "header_title_font": "metroblack",
    "header_description_font": "robotoreg",
    "button_text_size": "medium",
    "button_color": "#1E90FF",
    "button_title_color": "#FFFFFF",
    "button_description_color": "#888888",
    "button_title_font": "robotoreg",
    "button_description_font": "robotoreg",
    "button_radius": "circular",
    "background_color": "#181818",
    "section_text_size": "medium",
    "section_title_color": "#212121",
    "section_title_font": "robotobold",
    "section_description_color": "#888888",
    "section_description_font": "robotoreg"
  },
  "banner": {
    "classic": "https://content.tinylink.fr/page-banner/banner_6ad34a13c31b2.webp",
    "wide": "https://content.tinylink.fr/page-banner/wide_banner_6ad34a13c31b2.webp"
  },
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:35+02:00",
  "pages": []
}

Delete a style

DELETE/v1/page-styles/{id}

Deletes the style and its banner; the pages that followed it get their own settings back. Delete scope.

curl -X DELETE https://api.tinylink.fr/v1/page-styles/PST6ad34a11d00877 \
  -H "Authorization: Bearer tl_your_token"

Possible responses

No content

Still stuck?

Write to us from the Support tab of your workspace, we answer within one business day.

Contact support