Skip to Content
Référence APIShare links

Share links

Attributs

  • idstring

    Identifiant unique de l'objet (préfixé, opaque).

  • objectstring

    share_link

  • brandstring

    La marque à laquelle l'objet appartient (br_…).

  • kindenum

    What a public link opens: a dated snapshot of the brand's visibility report (report, the apex page /r/{token}), or a live SVG badge to put on a site or a signature (badge, served by the API).

    Valeurs possibles : report · badge

  • market_codestring
  • urlstring

    A report: its public page. A badge: the page its image links to (the brand's active report, else skoup.ai).

  • badge_urlstringnullable

    The SVG image — badges only.

  • embedstringnullable

    The <a><img></a> to paste — badges only.

  • snapshot_atstringnullable

    When the report was frozen — null for a badge, which is live.

  • expires_atstringnullable
  • revoked_atstringnullable

    Set once revoked: the page and the badge answer 410.

  • viewsinteger
  • livemodeboolean

    true pour les données réelles, false pour le bac à sable du mode test.

  • createdinteger

    Time at which the object was created (unix timestamp, seconds).

L'objet Share link
{ "id": "shl_034IhuucUGXrYD1T0nHfUT", "object": "share_link", "brand": "br_034CyfRFSXUqzrbzV6MAfZ", "kind": "report", "market_code": "string", "url": "https://hooks.example.com/skoup", "badge_url": "string", "embed": "string", "snapshot_at": "2026-09-21T02:40:00Z", "expires_at": "2026-09-21T02:40:00Z", "revoked_at": "2026-09-21T02:40:00Z", "views": 12, "livemode": true, "created": 1790000000 }

POST/v1/brands/{brand}/share-links

A report link freezes the brand’s visibility on market (default: the primary market) right now — never a live view, never a competitor or a query; parameter_invalid on market while nothing was measured there. A badge reads the share live, cached an hour. No expiry unless expires_at is given.

Paramètres

  • brandstringobligatoire

    Brand id (br_…).

  • kindenumobligatoire

    What a public link opens: a dated snapshot of the brand's visibility report (report, the apex page /r/{token}), or a live SVG badge to put on a site or a signature (badge, served by the API).

    Valeurs possibles : report · badge

  • marketstringnullable

    Code du marché (pays ISO, par ex. FR).

  • expires_atstringnullable

Retour

Renvoie l’objet share_link créé. Lève une erreur en cas de problème.

curl -X POST https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/share-links \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc" \ -H "Content-Type: application/json" \ -d '{"kind":"report","market":"FR"}'
Réponse
{ "id": "shl_034IhuucUGXrYD1T0nHfUT", "object": "share_link", "brand": "br_034CyfRFSXUqzrbzV6MAfZ", "kind": "report", "market_code": "string", "url": "https://hooks.example.com/skoup", "badge_url": "string", "embed": "string", "snapshot_at": "2026-09-21T02:40:00Z", "expires_at": "2026-09-21T02:40:00Z", "revoked_at": "2026-09-21T02:40:00Z", "views": 12, "livemode": true, "created": 1790000000 }

GET/v1/brands/{brand}/share-links

The brand’s public links, active and revoked, newest first: a report is a dated snapshot anyone opens at its url without an account, a badge an SVG image (badge_url) with the HTML to paste (embed).

Paramètres

  • brandstringobligatoire

    Brand id (br_…).

  • limitinteger

    Nombre d'objets à renvoyer, entre 1 et 100 (20 par défaut).

  • starting_afterstring

    Curseur : l'id du dernier objet de la page précédente.

Retour

Un dictionnaire dont la propriété data contient jusqu’à limit objets share_link, du plus récent au plus ancien, et has_more indique s’il reste une page. Lève une erreur en cas de problème.

curl https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/share-links?limit=3 \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Réponse
{ "object": "list", "url": "/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/share-links", "has_more": false, "data": [ { "id": "shl_034IhuucUGXrYD1T0nHfUT", "object": "share_link", "brand": "br_034CyfRFSXUqzrbzV6MAfZ", "kind": "report", "market_code": "string", "url": "https://hooks.example.com/skoup", "badge_url": "string", "embed": "string", "snapshot_at": "2026-09-21T02:40:00Z", "expires_at": "2026-09-21T02:40:00Z", "revoked_at": "2026-09-21T02:40:00Z", "views": 12, "livemode": true, "created": 1790000000 } ] }

DELETE/v1/brands/{brand}/share-links/{share_link}

Its page and its badge answer 410 from now on. The link stays listed with revoked_at set; revoking twice changes nothing.

Paramètres

  • brandstringobligatoire

    Brand id (br_…).

  • share_linkstringobligatoire

    Share Link id (shl_…).

Retour

Renvoie un objet avec deleted: true. Lève une erreur en cas de problème.

curl -X DELETE https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/share-links/shl_034IhuucUGXrYD1T0nHfUT \ -H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"
Réponse
{ "id": "shl_034IhuucUGXrYD1T0nHfUT", "object": "share_link", "deleted": true }
Last updated on