Aller au contenu

Components

A component is a block of links and titles shared between the pages of an environment: placed on three pages, it shows identically on each, and changing it changes them all. Its links are managed with the same routes as a page's. Creating, duplicating or placing a component depends on the plan.

List the components

GET/v1/components

The components of the environment, in alphabetical order. links_count counts the non-archived links, pages_count the pages where the component is placed. Read scope.

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

Possible responses

{
  "data": [
    {
      "id": "C6ad34a13d28745",
      "name": "Mes réseaux",
      "description": "Les mêmes liens sur toutes mes pages",
      "links_count": 2,
      "pages_count": 0,
      "created_at": "2026-10-17T12:12:35+02:00",
      "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745"
    }
  ]
}

Create a component

POST/v1/components

name is required (100 characters at most), description optional (500 at most). links adds up to 100 links at once, described as on a page. Write scope.

curl -X POST https://api.tinylink.fr/v1/components \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Mes réseaux",
    "description": "Les mêmes liens sur toutes mes pages",
    "links": [
      {
        "title": "Instagram",
        "url": "https://instagram.com/exemple"
      },
      {
        "title": "YouTube",
        "url": "https://youtube.com/@exemple"
      }
    ]
  }'

Possible responses

{
  "id": "C6ad34a13d28745",
  "name": "Mes réseaux",
  "description": "Les mêmes liens sur toutes mes pages",
  "links_count": 2,
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:35+02:00",
  "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
  "links": [
    {
      "id": "L6ad34a13d2956",
      "title": "Instagram",
      "description": "",
      "url": "https://instagram.com/exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 1,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    },
    {
      "id": "L6ad34a13d2dcb",
      "title": "YouTube",
      "description": "",
      "url": "https://youtube.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 2,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    }
  ],
  "pages": []
}

Read a component

GET/v1/components/{id}

The component, its links in display order and the pages where it is placed. Read scope.

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

Possible responses

{
  "id": "C6ad34a13d28745",
  "name": "Mes réseaux",
  "description": "Les mêmes liens sur toutes mes pages",
  "links_count": 2,
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:35+02:00",
  "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
  "links": [
    {
      "id": "L6ad34a13d2956",
      "title": "Instagram",
      "description": "",
      "url": "https://instagram.com/exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 1,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    },
    {
      "id": "L6ad34a13d2dcb",
      "title": "YouTube",
      "description": "",
      "url": "https://youtube.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 2,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    }
  ],
  "pages": []
}

Change a component

PATCH/v1/components/{id}

name, description, or both. Write scope.

curl -X PATCH https://api.tinylink.fr/v1/components/C6ad34a13d28745 \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"name":"Réseaux sociaux"}'

Possible responses

{
  "id": "C6ad34a13d28745",
  "name": "Réseaux sociaux",
  "description": "Les mêmes liens sur toutes mes pages",
  "links_count": 2,
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:35+02:00",
  "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745",
  "links": [
    {
      "id": "L6ad34a13d2956",
      "title": "Instagram",
      "description": "",
      "url": "https://instagram.com/exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 1,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    },
    {
      "id": "L6ad34a13d2dcb",
      "title": "YouTube",
      "description": "",
      "url": "https://youtube.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 2,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:35+02:00"
    }
  ],
  "pages": []
}

Duplicate a component

POST/v1/components/{id}/duplicate

Copies the component and its non-archived links, images included, under the name name (by default: the name followed by “(copy)”). The copy is placed on no page. Write scope.

curl -X POST https://api.tinylink.fr/v1/components/C6ad34a13d28745/duplicate \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"name":"Réseaux (copie)"}'

Possible responses

{
  "id": "C6ad34a1406db15",
  "name": "Réseaux (copie)",
  "description": "Les mêmes liens sur toutes mes pages",
  "links_count": 3,
  "pages_count": 0,
  "created_at": "2026-10-17T12:12:36+02:00",
  "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a1406db15",
  "links": [
    {
      "id": "L6ad34a1406fb3",
      "title": "Instagram",
      "description": "",
      "url": "https://instagram.com/exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 1,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    },
    {
      "id": "L6ad34a14070bb",
      "title": "YouTube",
      "description": "",
      "url": "https://youtube.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 2,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    },
    {
      "id": "L6ad34a14071a7",
      "title": "TikTok",
      "description": "",
      "url": "https://tiktok.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 3,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    }
  ],
  "pages": []
}

Delete a component

DELETE/v1/components/{id}

Deletes the component, its links and their statistics, and removes it from every page where it was placed. Irreversible. Delete scope.

curl -X DELETE https://api.tinylink.fr/v1/components/C6ad34a13d28745 \
  -H "Authorization: Bearer tl_your_token"

Possible responses

No content

Manage a component's links

GET/v1/components/{id}/links

POST/v1/components/{id}/links

PATCH/v1/components/{id}/links

PUT/v1/components/{id}/links/order

GET/v1/components/{id}/links/{lien}

PATCH/v1/components/{id}/links/{lien}

DELETE/v1/components/{id}/links/{lien}

PUT/v1/components/{id}/links/{lien}/image

Same routes, same fields and same responses as the links of a page, replacing /pages/{id} with /components/{id}: adding (one or several), reading, changing, bulk changes, new order, image, deletion. A component also accepts integration blocks. Scope depending on the method.

curl -X POST https://api.tinylink.fr/v1/components/C6ad34a13d28745/links \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"title":"TikTok","url":"https://tiktok.com/@exemple"}'

Possible responses

{
  "id": "L6ad34a13f2dcd",
  "title": "TikTok",
  "description": "",
  "url": "https://tiktok.com/@exemple",
  "type": "url",
  "format": "LIST",
  "size": "FULL",
  "visible": true,
  "archived": false,
  "position": 3,
  "status": "active",
  "image": null,
  "created_at": "2026-10-17T12:12:35+02:00"
}

List the components of a page

GET/v1/pages/{id}/components

The components placed on the page: for each, its block in the page (block, with its position and visibility) and the component itself. The block also appears in GET /v1/pages/{id}/links, with type: "component" and component_id. Read scope.

curl https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "data": [
    {
      "block": {
        "id": "L6ad34a140effd",
        "title": "Réseaux sociaux",
        "description": null,
        "url": null,
        "type": "component",
        "format": "COMPONENT",
        "size": "FULL",
        "visible": true,
        "archived": false,
        "position": 1,
        "status": "active",
        "image": null,
        "created_at": "2026-10-17T12:12:36+02:00",
        "component_id": "C6ad34a13d28745"
      },
      "component": {
        "id": "C6ad34a13d28745",
        "name": "Réseaux sociaux",
        "description": "Les mêmes liens sur toutes mes pages",
        "links_count": 3,
        "pages_count": 1,
        "created_at": "2026-10-17T12:12:35+02:00",
        "edit_url": "https://app.tinylink.fr/component-edit?id=C6ad34a13d28745"
      }
    }
  ]
}

Place a component on a page

POST/v1/pages/{id}/components

component_id is required; the component must belong to the page's environment and not be on the page already. position places it (1 = top), otherwise it goes to the bottom. The response is the block created in the page; it is hidden, archived and moved like a link. Write scope.

curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{"component_id":"C6ad34a13d28745","position":1}'

Possible responses

{
  "id": "L6ad34a140effd",
  "title": "Réseaux sociaux",
  "description": null,
  "url": null,
  "type": "component",
  "format": "COMPONENT",
  "size": "FULL",
  "visible": true,
  "archived": false,
  "position": 1,
  "status": "active",
  "image": null,
  "created_at": "2026-10-17T12:12:36+02:00",
  "component_id": "C6ad34a13d28745"
}

Remove a component from a page

DELETE/v1/pages/{id}/components/{component}

Removes the component from the page, without touching the component or its links. Delete scope.

curl -X DELETE https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a1406db15 \
  -H "Authorization: Bearer tl_your_token"

Possible responses

No content

Detach a component

POST/v1/pages/{id}/components/{component}/detach

Replaces the component with a copy of its links, in its place and in the same order (hidden and archived included, images duplicated): they become ordinary links of the page, which changes to the component will no longer follow. The component is not touched. The response is the list of the page's links. Write scope.

curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/components/C6ad34a13d28745/detach \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "data": [
    {
      "id": "L6ad34a1426b80",
      "title": "Instagram",
      "description": "",
      "url": "https://instagram.com/exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 1,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    },
    {
      "id": "L6ad34a1426bd5",
      "title": "YouTube",
      "description": "",
      "url": "https://youtube.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 2,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    },
    {
      "id": "L6ad34a1426c29",
      "title": "TikTok",
      "description": "",
      "url": "https://tiktok.com/@exemple",
      "type": "url",
      "format": "LIST",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 3,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:36+02:00"
    },
    {
      "id": "L6ad34a0e849a2",
      "title": "Mes réseaux",
      "description": "",
      "url": null,
      "type": "title",
      "format": "TITLE",
      "size": "FULL",
      "visible": true,
      "archived": false,
      "position": 4,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:30+02:00"
    },
    {
      "id": "L6ad34a0e84122",
      "title": "Mon site",
      "description": "",
      "url": "https://exemple.fr",
      "type": "url",
      "format": "BANNER",
      "size": "HALF",
      "visible": true,
      "archived": false,
      "position": 5,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:30+02:00"
    },
    {
      "id": "L6ad34a0e8467f",
      "title": "Ma boutique",
      "description": "",
      "url": "https://exemple.fr/boutique",
      "type": "url",
      "format": "BANNER",
      "size": "HALF",
      "visible": true,
      "archived": false,
      "position": 6,
      "status": "active",
      "image": null,
      "created_at": "2026-10-17T12:12:30+02:00"
    }
  ]
}

Still stuck?

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

Contact support