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

# Crear atribución

Registra una respuesta de atribución autodeclarada. Úsalo para saber cómo descubrieron tu marca tus clientes: desde búsqueda con IA, orgánico, social, anuncios, referidos o cualquier canal personalizado.

Requiere el Scope `write` en tu API Key.

<ParamField path="projectId" type="string" required>
  El ID del proyecto.
</ParamField>

<ParamField body="channelId" type="string" required>
  Identificador del canal de atribución. Usa IDs estándar como `ai_search`, `ai_chatgpt`, `ai_perplexity`, `google_search`, `social_media`, `paid_ads`, `referral`, `content`, o cualquier cadena personalizada.
</ParamField>

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

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

<ParamField body="respondentExternalId" type="string">
  ID externo de tu CRM o sistema.
</ParamField>

<ParamField body="dealValue" type="number">
  Importe de ingresos atribuido a este lead.
</ParamField>

<ParamField body="dealCurrency" type="string" default="USD">
  Código de moneda ISO.
</ParamField>

<ParamField body="formId" type="string">
  Identificador del formulario de origen (p. ej. form\_id de Typeform, ID de formulario de HubSpot).
</ParamField>

<ParamField body="pageUrl" type="string">
  URL de la página donde se envió el formulario.
</ParamField>

<ParamField body="metadata" type="object">
  Datos personalizados adicionales como pares clave-valor.
</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>
