Samplings
Events associés : sampling.completed · sampling.failed
L’objet Sampling
Attributs
idstringIdentifiant unique de l'objet (préfixé, opaque).
objectstringsamplingmarketstringCode du marché (pays ISO, par ex.
FR).triggerenumWhat started a sampling.
onboardingis the first sampling of a brand, launched when the owner closes the stepper (day 0).targetedre-runs a single query from the query drawer — it always carries aprompt_id.prospectingis the single measure of a prospect workspace, started by the panel (Prospecting\Actions\Workspace) — or again by « Remesurer » once the team reworked the queries: never charged, never batched (ClaudeBatch is for the Monday cycle), capped byprospecting.workspace.daily_cap.on_demandis a full sampling of one market a member starts with « Lancer un sampling » (Le E, 2026-11-03): paid like any action on demand (refused when nothing is left to spend, never batched), a measure like the others except that it never counts towards resolving a treated alert.Valeurs possibles :
onboarding·scheduled·manual·targeted·prospecting·on_demandstatusenumValeurs possibles :
queued·running·completed·failedquerystringnullableweek_starts_onstringmodelsarray of objectqueries_countintegerqueries_enabledintegernullableruns_totalintegerruns_completedintegerruns_failedintegerbrand_shareobjectShare (%) of the answers citing the brand — null until the sampling is finalized.
by_modelarray of objectAfficher les attributs enfants
modelstringrunsintegerhitsintegeravg_positionnumbernullable
errorstringnullablestarted_atstringnullablefinished_atstringnullablelivemodebooleantruepour les données réelles,falsepour le bac à sable du mode test.createdintegerTime at which the object was created (unix timestamp, seconds).
{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}Start a sampling
POST/v1/brands/{brand}/samplings
Measures every enabled query of one market now, on the brand’s AIs,
on top of its automatic cadence. Paid like any action on demand
(€0.02 per answer × the AI’s multiplier, Claude ×3): answers 202 with
the sampling (trigger: on_demand), then sampling.completed when it
ends. 422 sampling_in_progress while a sampling of the market runs,
credits when nothing is left to spend. It never resolves an alert.
Paramètres
brandstringobligatoireBrand id (
br_…).marketstringobligatoireAn activated market of the brand (ISO 3166-1 alpha-2).
Retour
Renvoie l’objet sampling créé. Lève une erreur en cas de problème.
curl
curl -X POST https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc" \
-H "Content-Type: application/json" \
-d '{"market":"FR"}'{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}Retrieve a sampling
GET/v1/brands/{brand}/samplings/{sampling}
Paramètres
brandstringobligatoireBrand id (
br_…).samplingstringobligatoireSampling id (
smp_…).
Retour
Renvoie l’objet sampling. Lève une erreur en cas de problème.
curl
curl https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings/smp_034EPf7p3si7LL82NkYBhb \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}List samplings
GET/v1/brands/{brand}/samplings
The measurements of the brand, newest first: the samplings of each market at the brand’s cadence, the ones started on demand and the targeted re-samplings of a single query.
Paramètres
brandstringobligatoireBrand id (
br_…).marketstringstatusstringlimitintegerNombre d'objets à renvoyer, entre 1 et 100 (20 par défaut).
starting_afterstringCurseur : l'
iddu dernier objet de la page précédente.
Retour
Un dictionnaire dont la propriété data contient jusqu’à limit objets sampling, 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
curl https://api.skoup.ai/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings?limit=3 \
-H "Authorization: Bearer skoup_test_4eC39HqLyjWDarjtT1zdp7dc"{
"object": "list",
"url": "/v1/brands/br_034CyfRFSXUqzrbzV6MAfZ/samplings",
"has_more": false,
"data": [
{
"id": "smp_031DIivuBKog78mwjgnZUv",
"object": "sampling",
"market": "FR",
"trigger": "scheduled",
"status": "completed",
"query": null,
"week_starts_on": "2026-09-21",
"models": [
"chatgpt",
"claude",
"gemini",
"perplexity"
],
"queries_count": 40,
"runs_total": 640,
"runs_completed": 635,
"runs_failed": 5,
"brand_share": 31.9,
"by_model": [
{
"model": "chatgpt",
"runs": 160,
"hits": 61,
"avg_position": 2.4
},
{
"model": "claude",
"runs": 158,
"hits": 49,
"avg_position": 2.9
},
{
"model": "gemini",
"runs": 157,
"hits": 38,
"avg_position": 3.1
},
{
"model": "perplexity",
"runs": 160,
"hits": 55,
"avg_position": 2.2
}
],
"error": null,
"started_at": "2026-09-21T02:00:04Z",
"finished_at": "2026-09-21T02:41:37Z",
"livemode": true,
"created": 1790042400
}
]
}