> ## 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.

# Crea un'attribuzione

Registra una risposta di attribuzione self-reported. Usa questo Endpoint per tracciare come i clienti hanno scoperto il tuo brand — da AI search, organico, social, annunci, referral o qualsiasi canale personalizzato.

Richiede lo Scope `write` sulla tua API Key.

<ParamField path="projectId" type="string" required>
  L'ID del progetto.
</ParamField>

<ParamField body="channelId" type="string" required>
  Identificatore del canale di attribuzione. Usa gli ID standard come `ai_search`, `ai_chatgpt`, `ai_perplexity`, `google_search`, `social_media`, `paid_ads`, `referral`, `content`, oppure una stringa personalizzata qualsiasi.
</ParamField>

<ParamField body="respondentEmail" type="string">
  Indirizzo email del lead.
</ParamField>

<ParamField body="respondentName" type="string">
  Nome completo del lead.
</ParamField>

<ParamField body="respondentExternalId" type="string">
  ID esterno proveniente dal tuo CRM o dal tuo sistema.
</ParamField>

<ParamField body="dealValue" type="number">
  Importo di ricavo attribuito a questo lead.
</ParamField>

<ParamField body="dealCurrency" type="string" default="USD">
  Codice valuta ISO.
</ParamField>

<ParamField body="formId" type="string">
  Identificatore del form di origine (es. form\_id di Typeform, ID del form HubSpot).
</ParamField>

<ParamField body="pageUrl" type="string">
  URL della pagina in cui è stato inviato il form.
</ParamField>

<ParamField body="metadata" type="object">
  Dati personalizzati aggiuntivi come coppie chiave-valore.
</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>
