Aller au contenu

Integrations

The accounts connected in Library → Integrations (YouTube, Shopify, Instagram, RSS…) feed page blocks that update themselves: the latest video, a product, the next event. Accounts are connected in the app; the API reads them and places their blocks, on a page as in a component.

List the integrations

GET/v1/integrations

The connected accounts of the environment, most recent first. status is active, reconnect_required (authorisation to renew in the app) or error; suspended flags an account beyond the plan limit; used says whether a block shows it. Read scope.

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

Possible responses

{
  "data": [
    {
      "id": "Int_6aac6c7feedf0",
      "platform": "youtube",
      "platform_name": "YouTube",
      "name": "Axton",
      "handle": "@axton_99",
      "profile_url": "https://www.youtube.com/@axton_99",
      "status": "active",
      "suspended": false,
      "used": false,
      "last_synced_at": "2026-10-17T12:10:33+02:00",
      "created_at": "2026-09-18T00:41:03+02:00"
    },
    {
      "id": "Int_6aa862f59643e",
      "platform": "shopify",
      "platform_name": "Shopify",
      "name": "POW'HER",
      "handle": "powher.shop",
      "profile_url": "https://powher.shop",
      "status": "active",
      "suspended": false,
      "used": true,
      "last_synced_at": "2026-10-17T12:10:54+02:00",
      "created_at": "2026-09-14T23:11:17+02:00"
    }
  ]
}

Read an integration

GET/v1/integrations/{id}

The account and its sources: for each, its variables (fields, to cite in templates), its default template and what it asks for — none, rank (a rank, 1 to 5) or required (a specific element). Read scope.

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

Possible responses

{
  "id": "Int_6aac6c7feedf0",
  "platform": "youtube",
  "platform_name": "YouTube",
  "name": "Axton",
  "handle": "@axton_99",
  "profile_url": "https://www.youtube.com/@axton_99",
  "status": "active",
  "suspended": false,
  "used": false,
  "last_synced_at": "2026-10-17T12:10:33+02:00",
  "created_at": "2026-09-18T00:41:03+02:00",
  "sources": [
    {
      "id": "chaine",
      "label": "The channel",
      "element": "none",
      "fields": [
        {
          "name": "name",
          "label": "Name",
          "type": "text"
        },
        {
          "name": "handle",
          "label": "Handle",
          "type": "text"
        },
        {
          "name": "description",
          "label": "Description",
          "type": "text"
        },
        {
          "name": "subscribers",
          "label": "Subscribers",
          "type": "number"
        },
        {
          "name": "videos",
          "label": "Number of videos",
          "type": "number"
        },
        {
          "name": "views",
          "label": "Total views",
          "type": "number"
        },
        {
          "name": "avatar",
          "label": "Profile picture",
          "type": "image"
        },
        {
          "name": "url",
          "label": "Address",
          "type": "url"
        },
        {
          "name": "app_name",
          "label": "Service name",
          "type": "text"
        }
      ],
      "default_template": {
        "title": "{{name}}",
        "description": "{{subscribers}} Subscribers",
        "image": "{{avatar}}"
      }
    },
    {
      "id": "derniere_video",
      "label": "The latest video",
      "element": "rank",
      "fields": [
        {
          "name": "title",
          "label": "Title",
          "type": "text"
        },
        {
          "name": "description",
          "label": "Description",
          "type": "text"
        },
        {
          "name": "date",
          "label": "Publication date",
          "type": "date"
        },
        {
          "name": "channel",
          "label": "Channel name",
          "type": "text"
        },
        {
          "name": "views",
          "label": "Views",
          "type": "number"
        },
        {
          "name": "likes",
          "label": "Likes",
          "type": "number"
        },
        {
          "name": "comments",
          "label": "Comments",
          "type": "number"
        },
        {
          "name": "thumbnail",
          "label": "Thumbnail",
          "type": "image"
        },
        {
          "name": "url",
          "label": "Address",
          "type": "url"
        },
        {
          "name": "app_name",
          "label": "Service name",
          "type": "text"
        }
      ],
      "default_template": {
        "title": "{{title}}",
        "description": "{{channel}}",
        "image": "{{thumbnail}}"
      }
    }
  ]
}

List the elements of a source

GET/v1/integrations/{id}/elements?source=

For a source with an element, the elements the account offers (products of a shop, videos of a channel…): their id is the value of element. An empty list is not an error: some shops close their catalogue, and the element's address still works. Read scope.

curl "https://api.tinylink.fr/v1/integrations/Int_6aa862f59643e/elements?source=produit" \
  -H "Authorization: Bearer tl_your_token"

Possible responses

{
  "data": [
    {
      "id": "pack-explorher",
      "title": "Pack Explor'HER",
      "detail": "99,50 €",
      "image": "https://cdn.shopify.com/s/files/1/0966/8814/4724/files/Les_indispensables_le_Pack_Explor_HER_POW_HER.png?v=1762246179"
    },
    {
      "id": "pack-routine-skincare",
      "title": "Pack ROUTINE SKINCARE",
      "detail": "86,70 €",
      "image": "https://cdn.shopify.com/s/files/1/0966/8814/4724/files/Pack_Skincare_POWHER_Routine_anti-age_Clean_Exfoli_Lift.png?v=1763384467"
    }
  ]
}

Add an integration block

POST/v1/pages/{id}/links

The route that adds a link, with integration_id and source. The block counts among the plan's links. The response gives the current content (title, url, image) and, in integration, the templates. Write scope.

  • integration_id — the connected account, required
  • source — what the block shows (derniere_video, chaine, produit…), see the account's sources
  • element — for a source with an element ("element": "required"): the id or address of the element; for a ranked source ("rank"): 1 (the latest, by default) to 5
  • title, description — templates with the source's variables, such as {{title}}; by default those of default_template. 100 and 200 characters at most
  • image_template — an image variable of the source ({{thumbnail}}), or null for no image
  • format — LIST, BANNER or SQUARE; size, visible, position as for a link
  • No url: the address comes from the source (the video, the product…).
curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/links \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": "Int_6aac6c7feedf0",
    "source": "derniere_video",
    "format": "BANNER"
  }'

Possible responses

{
  "id": "L6ad34a155e711",
  "title": "TurboBringue 2026 (22:22, Axton, Roi Rufus, One-T)",
  "description": "Axton",
  "url": "https://www.youtube.com/watch?v=_t55GnPn3bo",
  "type": "integration",
  "format": "BANNER",
  "size": "FULL",
  "visible": true,
  "archived": false,
  "position": 1,
  "status": "active",
  "image": "https://content.tinylink.fr/page-image/integ_Int_6aac6c7feedf0_derniere_video_thumbnail.webp",
  "created_at": "2026-10-17T12:12:37+02:00",
  "integration": {
    "id": "Int_6aac6c7feedf0",
    "platform": "youtube",
    "source": "derniere_video",
    "element": null,
    "title_template": "{{title}}",
    "description_template": "{{channel}}",
    "image_template": "{{thumbnail}}",
    "image_source": "platform"
  }
}

Block for a specific element

POST/v1/pages/{id}/links

A source with an element asks for element: it is fetched from the platform at once, and refused if it cannot be found. Here a Shopify product, with a composed title. Write scope.

curl -X POST https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/links \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "integration_id": "Int_6aa862f59643e",
    "source": "produit",
    "element": "pack-explorher",
    "title": "{{title}} — {{price}}",
    "description": ""
  }'

Possible responses

{
  "id": "L6ad34a1de7ebe",
  "title": "Pack Explor'HER — 99,50 €",
  "description": "",
  "url": "https://powher.shop/products/pack-explorher",
  "type": "integration",
  "format": "LIST",
  "size": "FULL",
  "visible": true,
  "archived": false,
  "position": 2,
  "status": "active",
  "image": "https://content.tinylink.fr/page-image/integ_Int_6aa862f59643e_produit-pack-explorher_thumbnail.webp",
  "created_at": "2026-10-17T12:12:45+02:00",
  "integration": {
    "id": "Int_6aa862f59643e",
    "platform": "shopify",
    "source": "produit",
    "element": "pack-explorher",
    "title_template": "{{title}} — {{price}}",
    "description_template": "",
    "image_template": "{{thumbnail}}",
    "image_source": "platform"
  }
}

Change an integration block

PATCH/v1/pages/{id}/links/{link}

title, description, image_template, element, plus the fields of any link (format, size, visible, archived, position, image). The account and source do not change: to show something else, add a block. An image sent replaces the platform's; removing it also removes the image template. Write scope.

curl -X PATCH https://api.tinylink.fr/v1/pages/P6ad34a0e4fef09/links/L6ad34a1de7ebe \
  -H "Authorization: Bearer tl_your_token" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "{{title}}",
    "description": "{{price}}",
    "format": "SQUARE"
  }'

Possible responses

{
  "id": "L6ad34a1de7ebe",
  "title": "Pack Explor'HER",
  "description": "99,50 €",
  "url": "https://powher.shop/products/pack-explorher",
  "type": "integration",
  "format": "SQUARE",
  "size": "FULL",
  "visible": true,
  "archived": false,
  "position": 2,
  "status": "active",
  "image": "https://content.tinylink.fr/page-image/integ_Int_6aa862f59643e_produit-pack-explorher_thumbnail.webp",
  "created_at": "2026-10-17T12:12:45+02:00",
  "integration": {
    "id": "Int_6aa862f59643e",
    "platform": "shopify",
    "source": "produit",
    "element": "pack-explorher",
    "title_template": "{{title}}",
    "description_template": "{{price}}",
    "image_template": "{{thumbnail}}",
    "image_source": "platform"
  }
}

Still stuck?

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

Contact support