> ## Documentation Index
> Fetch the complete documentation index at: https://docs.finseo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Créer une attribution

Enregistrez une réponse d'attribution auto-déclarée. Utilisez cet Endpoint pour savoir comment vos clients ont découvert votre marque — via la recherche IA, le trafic organique, les réseaux sociaux, la publicité, les recommandations ou tout canal personnalisé.

Nécessite le Scope `write` sur votre clé API.

<ParamField path="projectId" type="string" required>
  L'ID du projet.
</ParamField>

<ParamField body="channelId" type="string" required>
  Identifiant du canal d'attribution. Utilisez des ID standard comme `ai_search`, `ai_chatgpt`, `ai_perplexity`, `google_search`, `social_media`, `paid_ads`, `referral`, `content`, ou toute chaîne personnalisée.
</ParamField>

<ParamField body="respondentEmail" type="string">
  Adresse e-mail du lead.
</ParamField>

<ParamField body="respondentName" type="string">
  Nom complet du lead.
</ParamField>

<ParamField body="respondentExternalId" type="string">
  ID externe issu de votre CRM ou de votre système.
</ParamField>

<ParamField body="dealValue" type="number">
  Montant de revenu attribué à ce lead.
</ParamField>

<ParamField body="dealCurrency" type="string" default="USD">
  Code de devise ISO.
</ParamField>

<ParamField body="formId" type="string">
  Identifiant du formulaire source (p. ex. form\_id Typeform, ID de formulaire HubSpot).
</ParamField>

<ParamField body="pageUrl" type="string">
  URL de la page où le formulaire a été soumis.
</ParamField>

<ParamField body="metadata" type="object">
  Données personnalisées supplémentaires sous forme de paires clé-valeur.
</ParamField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl --request POST \
    --url https://api.finseo.ai/v1/projects/PROJECT_ID/attribution \
    --header 'Authorization: Bearer sk_live_xxxxxxxx' \
    --header 'Content-Type: application/json' \
    --data '{
      "channelId": "ai_search",
      "respondentEmail": "jane@company.com",
      "respondentName": "Jane Smith",
      "dealValue": 12000,
      "dealCurrency": "EUR",
      "formId": "signup_form_v2",
      "pageUrl": "https://example.com/signup"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={"system"}
  {
    "data": {
      "id": "a1b2c3d4-...",
      "channel_id": "ai_search",
      "channel_label": "AI Search (ChatGPT, Perplexity, etc.)",
      "channel_category": "ai_search",
      "respondent_email": "jane@company.com",
      "deal_value": 12000,
      "source": "api",
      "created_at": "2026-03-15T10:30:00Z"
    }
  }
  ```
</ResponseExample>
